This Wiki is a work space for old notes and new ideas. DO NOT RELY on anything you find on this Wiki!
Official Gluu Server documentation is at https://gluu.org/docs.
The Gluu Support site is https://support.gluu.org.

User Tools

Site Tools


oxd:home

Need support? Check our public knowledge base or contact us for enterprise support pricing.

oxD

oxd - mediator between the mod_ox Apache plugins and OpenID Connect & UMA Authorization server (oxAuth). oxd is java application. Learn more at oxd.gluu.org

References

Introduction

oxD is designed to work as standalone application (without Web Application Container, e.g. tomcat). It communicates with plugin(s) via socket. oxD is restricted to localhost only.

Please check communication protocol for more details : oxD Communication Protocol.

oxD Run

To run oxD you have to:

  • Download oxD distribution package from Maven repo oxd-server-1.0.6-master-SNAPSHOT-distribution.zip
  • Unzip it to folder “oxd-server” (or any other folder, for simplicity we are referring to “oxd-server” folder)
  • Run oxd:
    • Windows
      oxd-server/bin/oxd-start.bat
    • Unix
      oxd-server/bin/oxd-start.sh

oxd distribution package overview

oxD Server configuration

Configuration file is located in “conf/configuration.json” file in distribution package.

(Save this as a file called configuration.json)

configuration.json
{
    "port":8099,
    "localhost_only":true,
    "time_out_in_seconds":0,
    "register_client_app_type":"web",
    "register_client_response_types":"code id_token token",
    "use_client_authentication_for_pat":true,
    "trust_all_certs":true,
    "trust_store_path":"",
    "license_server_endpoint":"",
    "license_id":"",
    "license_check_period_in_hours": 24,
    "public_key":"",
    "public_password":"",
    "license_password":""
}
  • port - port of oxd socket
  • localhost_only - flag to restrict communication to localhost only (if false then it's not restricted to localhost only)
  • time_out_in_seconds - time out for oxd socket in seconds
  • register_client_app_type - dynamic client registration application type
  • register_client_response_types - dynamic client registration response types

Build oxD

oxD use Maven build system. To build it

  • sync code from (Github)
  • run in oxD folder Maven command:
    mvn clean package

(If you don't have Maven installed please download it and install as described here).

Run oxD Manually (Advanced)

  1. Download and unzip the oxd distribution with dependencies from Gluu maven repo.
  2. Run it with following command:
java -cp bcprov-jdk16-1.46.jar;resteasy-jaxrs-2.3.4.Final.jar;oxd-server-1.3-SNAPSHOT-jar-with-dependencies.jar org.xdi.oxd.server.ServerLauncher

Run oxD Manually (Advanced) with custom configuration

To run oxd with custom configuration please specify configuration file location via oxd.server.config system property:

java -cp resteasy-jaxrs-2.3.4.Final.jar;oxd-server-1.0-SNAPSHOT-jar-with-dependencies.jar org.xdi.oxd.server.ServerLauncher -Doxd.server.config=C:\tmp\oxd.json

Logging

oxd by default writes logs into working directory. If you would like to provide custom log4j configuration please prepare log4j.xml and start oxd with log4j.configuration system property.

java -cp resteasy-jaxrs-2.3.4.Final.jar;oxd-server-1.0-SNAPSHOT-jar-with-dependencies.jar org.xdi.oxd.server.ServerLauncher -Doxd.server.config=C:\tmp\oxd.json -Dlog4j.configuration=C:\tmp\test\log4j.xml

Example of log4j.xml

log4j.xml
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
 
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
 
    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <!-- The default pattern: Date Priority [Category] Message\n -->
            <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
        </layout>
    </appender>
 
    <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
        <param name="File" value="C:\\tmp\\test\\oxd-server.log"/>
        <param name="DatePattern" value="'.'yyyy-MM-dd"/>
        <param name="BufferSize" value="1000"/>
        <layout class="org.apache.log4j.PatternLayout">
            <!-- The default pattern: Date Priority [Category] Message\n -->
            <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
        </layout>
    </appender>
 
    <category name="org.xdi">
        <priority value="TRACE"/>
    </category>
 
    <root>
        <priority value="INFO"/>
        <appender-ref ref="FILE"/>
        <appender-ref ref="CONSOLE"/>
    </root>
 
</log4j:configuration>

Troubleshooting

  • please make sure java is in your PATH (check it with “java -version”). Otherwise please refer to full path to your “java.exe” instead of just “java” in command.

  • Make sure you are using jdk 1.6 or higher, otherwise you may see following exception
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
oxd/home.txt · Last modified: 2017/02/24 20:34 by will