Okta + SAML + JBoss EAP 6.4.x + Picketlink

In this article, I explain how to provide Okta authentication to your web application hosted on a JBoss EAP 6.4.x server.

In this example, we provide authentication to internal users (who are logged in in the customer network) and external users (from the internet) who may be third-party collaborators such as carriers, partners, etc.

Architecture Diagram

Architecture diagram: Okta integration JBOSS EAP 6.4.x web app


Configure the Okta Account

In our case, the Okta account is managed by our customer. So, we had to provide them with the instructions for the setup.

The most relevant configuration parameters are:

Additionally, you may need to configure some additional security attributes which will be displayed on your web application, like user first name, last name, address, email, etc.

You do this in the ATTRIBUTE STATEMENTS section:

OKTA attribute statements

Picketlink Descriptor Setup (picketlink.xml)

Picketlink is a software library written in Java for abstracting the SAML protocol and allows authentication easily by configuring an xml descriptor and providing Java classes for parsing SAML attributes from the response. Integrate Picketlink into your web app.

Once the Okta account setup is ready, you need to configure the Picketlink descriptor in your web application.

Picketlink xml descriptorSo, it's recommended to create 2 variables: one for the Identity URL and another one for the Service URL. In this example, we have created the variables gct-idp.url for the IdentityURL and gct-service.url for the service URL (we'll see later in this article how to configure your JBoss Server in order to have custom idp and service URLs for different environments like UAT, PRODUCTION, etc.)

JBoss Configuration Descriptor (standalone.xml)

In your JBoss configuration descriptor, you need to set up the same variables defined on picketlink.xml. In this case: gct-idp.url and gct-service.url. This allows you to set up different environments for development, testing, and production.
JBOSS EAP standalone.xml descriptor

SAML Response Attributes

Picketlink will do this for you. The session will have the attribute SESSION_ATTRIBUTE_MAP with all the SAML security attributes for the user authenticated.

Your Java class behind the Service URL has to retrieve this session attribute and get the value.

 

 

 

 

Top