IBM Websphere Liberty SSO

IBM Websphere Liberty/OpenLiberty SSO Integration guide

This integration guide can be used to configure an IBM Websphere Liberty or OpenLiberty server to use SSO authentication provided by IBM on-premises or cloud based IAM solutions using a standards based identity token. This integration is capable of integrating with a number of traditional (LDAP/Active Directory) and distributed (Federation/Cloud Directory) identity sources; as well as enforcing customizable access control policies.

Identity is provided to a downstream Liberty server using the mpJwt Liberty feature. This feature is capable of using a JSON Web Token (JWT) supplied in the incoming request to:

  • Establishing trust with the upstream authentication service.
  • Extracting identity information from the incoming request.
    • Verify identity information cryptographically signed by the WebSEAL instance
    • Parse identity claims
  • Building the Principal object available in the HttpServletRequest

A demonstration of this integration is available at IBM Security Integrations using the latest Websphere-Liberty and IBM Application Gateway containers. The deployment of this scenario is documented in the verify integration guide

Assumed knowledge

This integration guide requires a user to have a working knowledge of IBM Websphere Liberty configuration. Generally, a user should be familiar with the following technologies:

  • Deploying applications on a liberty server
  • Creating and modifying PCKS12 trust stores
  • (Verify Access only) Configuring Verify Access reverse proxies and associated junctions
    • Create WebSEAL junction
    • Modify WebSEAL configuration file for junction specific stanza
    • Import X509 Certificate into the WebSEAL certificate database
  • (Verify SaaS only) Creating and managing IBM Security Verify tenants
    • Create a new Application/API client
    • Create/Manage a Cloud Registry or Federated identity source


To use this integration guide there are a number of prerequisites:

  • A java application (ear/war)
    • Liberty specific application configuration is detailed here
  • An identity source; this can be either be on premises (Verify Access) or cloud based (Verify SaaS)
  • Public Key Infrastructure to sign and verify identity information
    • When testing certificates can be self-signed but should be managed in production environments

Supported products

This integration guide is intended for use with

  • > IBM Websphere Liberty 7.0
    • > OpenLiberty
  • > IBM Security Access Manager

Architecture overview


This guide details two integration pathways, one for on premises solutions and one for cloud based solutions. A demo integration using IBM Application Gateway and Websphere Liberty is documented here and illustrated in the above figure. Both architectures use a very similar deployment pattern where a reverse proxy identifies users before making a decision to permit access to web server resources. In a cloud based deployment the reverse proxy is IBM Application Gateway, and identity is verified by IBM Security Verify SaaS; for on premises deployments IBM Security Verify Access uses legacy Virtual Machine architecture to deploy WebSEAL with a LDAP based user registry or integrate with a Federated Identity Source.


The sequence diagram describes the browser interaction for a user attempting to access a protected resource. When a user makes a request to a protected resource, the reverse proxy intercepts the request and redirects the user to authenticate. For cloud based deployments this is demonstrated by using IBM Security Verify SaaS as an OIDC Identity Provider; for on premises deployments IBM Security Verify Access can authenticate against a local user registry (LDAP or Active Directory) or redirect to Federated Identity Partner. Once the user has authenticated they are returned to the reverse proxy where an identity token is propagated to the protected web application where is can be validated using Public Key Cryptography.

Liberty Server Configuration

The mpJwt feature can be configured to supply identity information via a signed (and/or encrypted) JWT. The junction server can also be configured to validate connections using SSL. The following sections detail the required Liberty configuration to: enable the mpJwt feature; configure a Java application to consume JWT identity information; and security harden the Liberty server being protected.

Available Configuration Properties

The mpJwt documentation lists the available configuration properties. At a minimum you will need to set the following options:\

  • issuer: domain name of the reverse proxy supplying identity.
  • audiences: domain name of the Liberty application server consuming identity.
  • keyName: identifies the public key in the SSL keystore which is used to verify signature tokens.

SSL Configuration

Where possible it is recommended to secure communication to the upstream revere proxy using SSL communication. To enable client authentication in Liberty SSL configuration can be added to the server configuration by adding a SSL entry and referencing the id of the entry in the httpEndpoint->sslOptions configuration. The demo configuration uses the default SSL configuration id and does not need to be referenced in the httpEnpoint entry.

The OpenLiberty documentation describes additional SSL configuration and HTTP endpoint configuration configuration. This is used to validate connections to the Liberty server and protects against unauthorized access from within the protected network. To configure mutual verification between the reverse proxy being used and Liberty a X509 certificate which is part of the trust chain from the reverse proxy must be imported into the Liberty keystore. The following commands can be used to import an X509 certificate:

keytool -importcert \
     -file <certificate to trust> \
     -alias <alias for the certificate> \
     -keystore <name of the truststore> \
     -storepass <password for the truststore> \
     -storetype <type of the keystore>

This keystore is then added to the Liberty server. For this guide (and the demo server) the default keystore is used (located at ${server.output.dir}/resources/security/key.p12) which is referenced by the default id defaultKeyStore. If you are using a custom keystore then additional configuration of the HTTP endpoint SSL configuration may be required.


<keyStore id="defaultKeyStore"

<ssl id="defaultSSLConfig"

Java application configuration

The demo application uses a web.xml file in the WEB-INF directory of a web application to define authentication constraints. The below code snippet shows this definition alongside the corresponding server configuration to map JWT groups to Java roles.

web.xml in the Java application bundle:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5">
    <distributable />



corresponding server.xml application configuration:

    <application type="war"
            <security-role name="secusers">
                <group name="secusers"


Groups to roles mapping

Note that the group name should be prefixed with the iss claim from the JWT. This is how Liberty maps externally defined groups to "Security Realms"

Management application based configuration

The liberty feature adminCenter-1.0 can be enabled to allow the configuration of a Websphere Liberty server using an interactive app from a web browser.

File based configuration

To configure the server.xml of your liberty application directly open the server.xml file in a text editor
and add the following XML elements to your server definition:

  • featureManager:
    The appSecurity feature must be enabled to activate the required subsystems to process the authentication filter (which invokes JWT authentication). The mpJwt feature is used to validate and parse the supplied JWT and generate a Principal which is available to subsequent servlets. Finally the ssl feature must also be activated to enable SSL communication.


  • authFilter:
    The authentication filter is used to identify the incoming requests which should be authenticated using the configured mpJwt element. The sample configuration is triggered for any request which contains the Authorization header, however this could be modified to target a specific webapp or request URL.

Example: requests which contain an authorization header.

<authFilter id="myAuthFilter">
    <requestHeader id="authRequest" matchType="equals" name="Authorization"/>

Example: all requests to a server

<authFilter id="myAuthFilter">
    <requestUrl id="authRequest" matchType="contains" name="/"/>
  • mpJWT:
    To configure the mpJwt feature, set a unique name, identity attributes (these may be omitted if using liberty defaults), the public key alias and the authentication filter used to identify requests which should contain identity information supplied by IBM Security Verify or IBM Security Verify Access.



Verify Integration

The Verify Integration guide can be used to configure IAG to supply identity information to Liberty. This guide also documents a simple demo Java application showcasing the SSO capabilities offered by integrating Liberty with IBM Security Verify.

A demonstration integration using IBM Application Gateway and WebSphere Liberty is documented here with source files available at the IBM Security Integrations repository

Verify Access Integration

The Verify Access Integration guide can be used to configure Verify Access to supply identity information to Liberty. This guide also documents a simple demo Java application showcasing the SSO capabilities offered by integrating Liberty with IBM Security Verify Access


If you encounter issues or have a specific deployment requirement not covered by this guide you can create an issue at the ibm-security-integration GitHub. From here IBM developers and members of the community can contribute and collaborate to find a solution.