Install IG in JBoss EAP

Download and Start IG in JBoss EAP

This section installs JBoss to /path/to/jboss. If you use another directory structure, substitute the commands.

  1. Download a supported version of JBoss server from its download page, and install it to /path/to/jboss.

  2. In the JBoss configuration file /path/to/jboss/standalone/configuration/standalone.xml, delete the line for the JBoss welcome-content handler:

    <server name="default-server">
      <host name="default-host" alias="localhost">
        <location name="/" handler="welcome-content"/> <!-- Delete this line -->
  3. Download IG-7.1.1.war from the ForgeRock BackStage download site.

  4. Copy the IG-7.1.1.war to the JBoss deployment directory:

    $ cp IG-7.1.1.war /path/to/jboss/standalone/deployments/IG-7.1.1.war
  5. Start JBoss as a standalone server:

    $ /path/to/jboss/bin/standalone.sh

    JBoss deploys IG in the root context.

  6. Check that IG is running in one of the following ways:

To use IG to protect multiple applications running on different hosts, set a cookie domain as follows:

  • For stateful sessions, set a cookie domain in JBoss. For information, see the Redhat documentation about Cookie Domain .

    If JwtSession is not configured, stateful sessions are created automatically. For more information, see Sessions.

  • For stateless sessions, configure the domain property of JwtSession. When set, the JWT cookie can be accessed from different hosts in that domain. When not set, the JWT cookie can be accessed only from the host where the cookie was created. For information, see JwtSession.

Configure IG for HTTPS (Server-Side) in JBoss EAP

This section describes how to set up JBoss to run IG over HTTPS. These instructions are for JBoss EAP 7.3, and are not compatible with earlier versions. For information about the set up for HTTPS (client-side), see Configure IG For HTTPS (Client-Side).

The default ephemeral DH key size in the JVM is 1024-bit. To support stronger ephemeral DH keys, and protect against weak keys, set the following system property: jdk.tls.ephemeralDHKeySize=2048.

Before you start, install IG in JBoss as described in Download and Start IG in JBoss EAP. JBoss is installed in /path/to/jboss.

  1. Set the environment variable JBOSS_HOME in two terminals:

    $ export JBOSS_HOME=/path/to/jboss
  2. In the first terminal, create a user with administrative permissions to run the setup:

    $ $JBOSS_HOME/bin/add-user.sh myadmin myadmin-password
    
    Added user 'myadmin' to file '$JBOSS_HOME/standalone/configuration/mgmt-users.properties'
    Added user 'myadmin' to file '$JBOSS_HOME/domain/configuration/mgmt-users.properties'
  3. Make a temporary directory for the settings and keystore:

    $ mkdir $JBOSS_HOME/tmp
  4. Create the following file as $JBOSS_HOME/tmp/batch_settings:

    /socket-binding-group=standard-sockets/socket-binding=http/:write-attribute(name=port, value=8080)
    /socket-binding-group=standard-sockets/socket-binding=https/:write-attribute(name=port, value=8443)
    /socket-binding-group=standard-sockets/socket-binding=ajp/:write-attribute(name=port, value=8009)
    /socket-binding-group=standard-sockets/socket-binding=management-http/:write-attribute(name=port, value=9990)
    /socket-binding-group=standard-sockets/socket-binding=management-https/:write-attribute(name=port, value=9993)
    /subsystem=deployment-scanner/scanner=default/:write-attribute(name="scan-interval", value="2000")
    /interface=management/:write-attribute(name="inet-address", value="${jboss.bind.address:openig.example.com}")
    /interface=public/:write-attribute(name="inet-address", value="${jboss.bind.address:openig.example.com}")
  5. Generate a key pair with a self-signed certificate in the keystore:

    $ keytool \
    -genkey \
    -alias jboss \
    -storetype PKCS12 \
    -keyalg RSA \
    -keystore $JBOSS_HOME/tmp/keystore \
    -storepass password \
    -keypass password \
    -dname "CN=openig.example.com,O=Example Corp,C=FR"

    Because KeyStore converts all characters in its key aliases to lower case, use only lowercase in alias definitions of a KeyStore.

  6. Start JBoss as a standalone server:

    $ $JBOSS_HOME/bin/standalone.sh
  7. While JBoss is running, in the second terminal, update the batch settings:

    $ $JBOSS_HOME/bin/jboss-cli.sh --connect \
    --controller=openig.example.com:9990 command="run-batch -v \
    --file=$JBOSS_HOME/tmp/batch_settings"
  8. Make sure IG is deployed on port 8080:

    $ $JBOSS_HOME/bin/jboss-cli.sh --connect  \
    --controller=openig.example.com:9990 command="deployment list"
  9. Enable SSL:

    • Enable the SSL server:

      $ $JBOSS_HOME/bin/jboss-cli.sh --connect \
      --controller=openig.example.com:9990 command="security enable-ssl-http-server \
      --key-store-path=$JBOSS_HOME/tmp/keystore \
      --key-store-password=password \
      --key-store-type=PKCS12"
      
      Server reloaded.
      SSL enabled for default-server
      ssl-context is ssl-context-keystore
      key-manager is key-manager-keystore
      key-store   is keystore
  10. Access the IG welcome page on https://openig.example.com:8443.

    If you see warnings that the site is not secure, or that the self-signed certificate is not valid, respond to the warnings to access the site.