Skip to content
YuriyZ edited this page Apr 17, 2019 · 2 revisions

oxd 4.0

Major changes are:

  • introduced swagger 2.0 to oxd (we will move to 3.0 someday when swagger codegen is ready)
  • socket transport is removed from oxd-server
  • https transport is made as main transport
  • oxd-https-extension module is completely removed. Now oxd-server based on https/http transport.
  • all configuration is now in one single yaml file, see: https://github.com/GluuFederation/oxd/blob/version_4.0/oxd-server/src/main/resources/oxd-server.yml
  • new tests set-up and tear-down based on dropwizard
  • Upgraded dropwizard to latest stable 1.3.1 version
  • Solved conflict between jackson 1.x and jackson 2.x (improvement is opened on oxCore project)
  • Changes in core oxd commands runner to avoid rendundant serialization/deserialization which was used by sockets.

All client code can be generated from swagger spec file: https://github.com/GluuFederation/oxd/blob/version_4.0/oxd-server/src/main/resources/swagger.yaml

You can easily generate appropriate client via https://app.swaggerhub.com GUI, just add swagger spec and in upper right corner it's possible to download client as shown below:

As alternative you can navigate to mine public spec import here (which can be outdated, so better to use own one): https://app.swaggerhub.com/apis/yuriyz1/oxd-server/4.0

Latest 4.0 is located here: http://ox.gluu.org/maven/org/gluu/oxd-server/4.0-SNAPSHOT/oxd-server-4.0-SNAPSHOT.jar

Run oxd-server 4.0

To run oxd-server:

Windows: java -Djava.net.preferIPv4Stack=true -cp bcprov-jdk15on-1.54.jar;oxd-server-4.0-SNAPSHOT.jar org.xdi.oxd.server.OxdServerApplication server oxd-server.yml

Unix: java -Djava.net.preferIPv4Stack=true -cp bcprov-jdk15on-1.54.jar:oxd-server-4.0-SNAPSHOT.jar org.xdi.oxd.server.OxdServerApplication server oxd-server.yml

Packaging oxd 4.0

In oxd 4.0 oxd-server and oxd-https-extension is merged into one single application and it is called oxd-server.

Name of the package should be oxd-server-4.0 (we don't want on apt-get install oxd-server get beta package installed).

Layout:

/opt/oxd-server
     - bin
       - lsox.sh (https://github.com/GluuFederation/oxd/blob/version_4.0/oxd-server/src/main/bin/lsox.sh)
       - oxd-start.sh (https://github.com/GluuFederation/oxd/blob/version_4.0/oxd-server/src/main/bin/oxd-start.sh)
     - data
       - oxd_db.mv.db  (oxd-server will create this file automatically, it must have write access to this folder)     
     - conf
       - oxd-server.yml  (https://github.com/GluuFederation/oxd/blob/version_4.0/oxd-server/src/main/resources/oxd-server.yml)     
       - oxd-server.keystore  (https://github.com/GluuFederation/oxd/blob/version_4.0/oxd-server/src/main/resources/oxd-server.keystore)
       - swagger.yaml (https://github.com/GluuFederation/oxd/blob/version_4.0/oxd-server/src/main/resources/swagger.yaml)
     - lib
       - bcprov-jdk15on-1.54.jar  (http://ox.gluu.org/maven/org/bouncycastle/bcprov-jdk15on/1.54/bcprov-jdk15on-1.54.jar)
       - oxd-server.jar (http://ox.gluu.org/maven/org/xdi/oxd-server/4.0-SNAPSHOT/oxd-server-4.0-SNAPSHOT.jar)

Init script should run oxd as

`java -Djava.net.preferIPv4Stack=true -cp /opt/oxd-server/lib/bcprov-jdk15on-1.54.jar:/opt/oxd-server/lib/oxd-server.jar org.gluu.oxd.server.OxdServerApplication server /opt/oxd-server/conf/oxd-server.yml`

Init script has to check log file, if log as last line has org.eclipse.jetty.server.Server: Started, then oxd is started successfully. If not then it failed to start and we should say Failed to start oxd-server, please check /var/log/oxd-server.log file for details.

Log file location: /var/log/oxd-server.log.

Note that configuration files are under /opt/oxd-server/conf folder (not under /etc/oxd-server), it is because it is easier to keep everything under /opt/oxd-server and we don't need wheels while coding scripts (which work from self-contained zip out of the box).