This project provides an open source Entrust IDaaS authenticator plug-in for the Curity Identity Server. This allows an administrator to add functionality to Curity which will then enable end users to login using their Entrust credentials.
Curity can be integrated with Entrust IDaaS in multiple ways. This authenticator is only needed when Curity is functioning as a relay or OpenID Connect proxy between Entrust IDaaS and a downstream client. This setup is shown in the following figure:
In this figure, the user operating a user agent, like a browser will make a request to a client application. This application (also known as a relying party) is probably made or procured by you and is the one you're using Curity to protect. When the user requests access to this application without a session (step 1 in the figure), they are redirected to Curity (step 2) using OpenID Connect or OAuth. The client is configured to use the Entrust IDaaS authenticator or will manually select it from a list of allowed authenticators. Either way, the user will be redirected to Entrust IDaaS using OpenID Connect (step 3). There, the user will login, and be redirected back to Curity. Curity will complete the OpenID Connect flow by redeeming the authorization code it receives, and calling the user info endpoint of Entrust IDaaS as needed. At this point, the user agent will be redirected back to the application (step 4). Typically, it will create a session for the user at this point and be logged in (step 5).
- Curity Identity Server 6.6.0 and its system requirements
- The Entrust logo will only be shown in the Curity admin UI for instances of this authenticator if using version 6.7.3 or newer.
- Maven 3
- OpenJDK 11
The source is very easy to compile. To do so from a shell, issue this command: mvn package
. The resulting JAR file will be located in the target
directory and be named entrust-idaas-*.jar
.
To install this plug-in, either download a binary version available from the releases section of this project's GitHub repository or compile it from source (as described above). If you compiled the plug-in from source, the package will be placed in the target
subdirectory. The resulting JAR file or the one downloaded from GitHub needs to placed in the directory ${IDSVR_HOME}/usr/share/plugins/entrust-idaas
of each node. (The name of the last directory, entrust-idaas
, which is the plug-in group, is arbitrary and can be anything.) After doing so, the plug-in will become available as soon as the node is restarted.
📝 Note
The JAR file needs to be deployed to each run-time node and the admin node. For simple test deployments where the admin node is a run-time node, the JAR file only needs to be copied to one location.
For a more detailed explanation of installing plug-ins, refer to the Curity developer guide.
As described in the Entrust IDaaS documentation, you can create a generic OIDC and OAuth Web application that can be used to authenticate Entrust IDaaS users to your instance of Curity. To do this, follow these steps in the Entrust IDaaS administrative console:
From the dashboard, click
Applications
or click the menu button and selectResources
and thenApplications
.Click the
+
button in the top left corner of theApplications List
page.In the
OpenID Connect and OAuth Cloud Integrations
section, selectGeneric Web Application
.On the
General
step of theAdd Generic Web Application
wizard, enter a name (e.g.,Curity Identity Server
). Optionally, add a description and upload a logo.On the
Setup
step of the wizard, take note of theClient ID
andClient Secret
. These will be needed in steps 6 and 7 of the next section, respectively.If you change the
Token / Revocation Endpoint Client Authentication Method
from its default toClient Secret Post
, you will need to ensure that the Curity authenticator configuration set in step 9 of the next section is also changed accordingly.If you want to pass through from Curity OAuth clients to Entrust IDaaS transparently, uncheck
Require Consent
.Ensure that
Authorization Code
is the only grant type selected (which is the default).
9. Ensure that Authorization Code PKCE Code Challenge Method
is set to S256
(the default). No other option is supported.
9. Check the Include Authentication Time
checkbox.
10. Click Add
and enter the redirect URI in the Login Redirect URI(s)
multi-select widget. This can be obtained from the Info
toolbar button of the Entrust IDaaS authenticator after creating it in the next section. It will be of the form https://<host>:<port>/<authenticate_endpoint>/<authenticator_id>/callback
.
Check any scopes from the
Supported Scopes
that should be used. Note that these will have to be added in step 8 of the next section.Select a
Subject ID Attribute
. It is recommended to useUnique User ID
.Note:
The Entrust IDaaS authenticator will be able to handle any singing settings for ID tokens and user info, so the defaults should be OK.
The easiest way to configure a new Entrust authenticator is using the Curity admin UI. The configuration for this can be downloaded as XML or CLI commands later, so only the steps to do this in the GUI will be described.
- Go to the
Authenticators
page of the authentication profile wherein the authenticator instance should be created. - Click the
New Authenticator
button. - Enter a name (e.g.,
entrust1
). This name needs to match the URI component in the callback URI set in the Entrust app. - For the type, pick the
Entrust
option and clickNext
. - On the next page, you can define all of the standard authenticator configuration options like any previous authenticator that should run, the resulting ACR, transformers that should executed, etc.
At the top of the configuration page, the Entrust-IDaaS-specific options can be found.
📝 Note
The Entrust-IDaaS-specific configuration is generated dynamically based on the configuration model defined in the Java interface.
- In the
Client ID
text field, enter theClient ID
from the Entrust IDaaS client application. - Also enter the matching
Client Secret
. - If you wish to request additional scopes from Entrust IDaaS, enter each one in the
Additional Scopes
multi-select widget (e.g.,address
orprofile
). - If you wish to request additional scopes from Entrust IDaaS, enter each one in the
Additional Scopes
multi-select widget (e.g.,address
orprofile
). - The
Authentication Method
should match the configuration for the client in Entrust IDaaS. The default isbasic
authentication. - If
Relay Prompt
is configured and an OAuth client sends aprompt
to the Curity OAuth server, then this parameter will be forwarded upstream to Entrust IDaaS. - In the
Issuer or Environment and Name
dropdown select and configure one of the following:environment-and-name
can be selected and one of the environments where your Entrust IDaaS is hosted should be selected. In this case, the instance name also has to be configured.issuer
can be selected and the Entrust IDaaS OpenID Connect issuer URL can be configured.
- To rely only on the SSO session stored in Entrust IDaaS, do the following:
- Click
Advanced
to expand the advanced settings. - In the
SSO Expiration Time
text field, enter0
.
- Click
- Once all of these changes are made, they will be staged, but not committed (i.e., not running). To make them active, click the
Commit
menu option in theChanges
menu. Optionally, enter a comment in theDeploy Changes
dialogue and clickOK
.
Once the configuration is committed and running, the authenticator can be used like any other.
📝 Note
If you need to contact the Entrust IDaaS web services via a proxy, then you should also configure the optional HTTP client. Such an HTTP client can be done by following the as described in the reference manual. Once complete, select this from the
HTTP Client
dropdown list.
To pass the Entrust IDaaS ACR down through Curity to an OAuth client, a token procedure has to be added because authenticators like the Entrust one cannot change the ACR (by design). In cases where the use of the Entrust ACR is desirable, do the following:
- Go to the
Endpoints
page of the token service profile that is associated with the authentication profile wherein the Entrust IDaaS authenticator is configured. - Select an endpoint with an
Endpoint Type
ofoauth-token
to expand the possible flows supported by this endpoint. - In the
Authorization Code
dropdown, clickNew procedure
. Give it a name (e.g.,change_acr
) and clickSave
. - In the procedure that opens, modify the condition that checks ID token data. This will be on or around line 21
if (idTokenData) {
var idTokenIssuer = context.idTokenIssuer;
// START ADD
var upstreamAcr = context.contextAttributes().upstream_acr;
if (upstreamAcr) {
idTokenData.acr = idTokenData.amr = upstreamAcr;
}
// END ADD
idTokenData.at_hash = idTokenIssuer.atHash(issuedAccessToken);
responseData.id_token = idTokenIssuer.issue(idTokenData, issuedDelegation);
}
All of the claims issued by Entrust IDaaS are saved in the authentication attributes of the user's session. As a result, these can be used to fulfill claims issued by Curity. For details, refer to the guide on using authentication attributes as claims. The abbreviated version is to:
- Ensure that a claims provider of type
authentication-subject-claims-provider
is configured. - For some claims that the downstream OAuth client will request of Curity, ensure that it gets its source from the authentication attributes. If these do not exactly match the ones asserted by Entrust IDaaS, they'll need to be mapped. When they do though, they can be used without mapping. In the later case, if Entrust IDaaS is configured with an additional scope of
profile
, then a claim ofgiven_name
will be asserted by it. For this same claim in Curity, use the authentication attributes as its source. Then, for any downstream client that requests theprofile
scope from Curity, the value from Entrust IDaaS will be used.
To avoid the authenticator selection screen in Curity, an OAuth client needs to be configured to only allow login using the Entrust IDaaS authenticator. This can be done by performing the following steps:
- Go to the
Clients
page of the token service profile that is associated with the authentication profile wherein the Entrust IDaaS authenticator is configured. - Select the applicable client (or create a new one).
- Click on
User Authentication
from the nav bar at the top of the page or scroll to the end of the page. - Click the
Allow only selected authenticators
. - Select the Entrust IDaaS authenticator that was previously configured.
With this done, no user interface will be shown by Curity as the user is relayed to Entrust IDaaS.
This plugin and its associated documentation is listed under the Apache 2 license.
Please visit curity.io for more information about the Curity Identity Server.
Copyright (C) 2022 Curity AB.