PingOne Advanced Identity Cloud cross-domain single sign-on
For organizations relying on AM’s session and policy services with SSO, consider Cross-Domain Single Sign-On (CDSSO) as an alternative to SSO through OpenID Connect.
This example sets up PingOne Advanced Identity Cloud as an SSO authentication server for requests processed by PingGateway. Learn about PingGateway and CDSSO in Cross-domain single sign-on for PingAM.
Before you start, prepare PingOne Advanced Identity Cloud, PingGateway, and the sample application as described in Example installation for this guide.
-
Set up PingOne Advanced Identity Cloud:
-
Log in to the Advanced Identity Cloud admin UI as an administrator.
-
Make sure you are managing the
alpharealm. If not, click the current realm at the top of the screen, and switch realm. -
Go to Identities > Manage > Alpha realm - Users, and add a user with the following values:
-
Username:
demo -
First name:
demo -
Last name:
user -
Email Address:
demo@example.com -
Password:
Ch4ng3!t
-
-
Register a PingGateway agent with the following values, as described in Register a PingGateway agent in PingOne Advanced Identity Cloud:
-
ID:
ig_agent -
Password:
password -
Redirect URLs:
https://ig.ext.com:8443/home/cdsso/redirect
-
-
Add a Validation Service:
-
In PingOne Advanced Identity Cloud, select Native Consoles > Access Management. The AM admin UI is displayed.
-
Select Services, and add a validation service with the following Valid goto URL Resources:
-
https://ig.ext.com:8443/* -
https://ig.ext.com:8443/*?*
-
-
-
-
Set up PingGateway:
-
Set up PingGateway for HTTPS, as described in Configure PingGateway for TLS (server-side).
-
Make sure PingGateway connects to the sample application over HTTPS with a route to access static resources.
Learn more in Using the sample application.
-
Add the following
sessionconfiguration toadmin.json.This ensures the browser passes the session cookie in the form-POST to the redirect endpoint (step 6 of Information flow during CDSSO):
{ "connectors": […], "session": { "type": "InMemorySessionManager", "config": { "cookie": { "sameSite": "none", "secure": true } } }, "heap": […] }This step is required for the following reasons:
-
When
sameSiteisstrictorlax, the browser doesn’t send the session cookie, which contains the nonce used in validation. If PingGateway doesn’t find the nonce, it assumes that the authentication failed. -
When
secureisfalse, the browser is likely to reject the session cookie.Learn more in AdminHttpApplication (
admin.json).
-
-
Set an environment variable for the PingGateway agent password, and then restart PingGateway:
$ export AGENT_SECRET_ID='cGFzc3dvcmQ='The password is retrieved by a SystemAndEnvSecretStore, and must be base64-encoded.
-
Add the following route to PingGateway and correct the value for the property
amInstanceUrl:- Linux
-
$HOME/.openig/config/routes/cdsso-idc.json - Windows
-
%appdata%\OpenIG\config\routes\cdsso-idc.json
{ "name": "cdsso-idc", "baseURI": "https://app.example.com:8444", "condition": "${find(request.uri.path, '^/home/cdsso')}", "properties": { "amInstanceUrl": "https://myTenant.forgeblocks.com/am" }, "heap": [ { "name": "SystemAndEnvSecretStore-1", "type": "SystemAndEnvSecretStore" }, { "name": "AmService-1", "type": "AmService", "config": { "url": "&{amInstanceUrl}", "realm": "/alpha", "agent": { "username": "ig_agent", "passwordSecretId": "agent.secret.id" }, "secretsProvider": "SystemAndEnvSecretStore-1", "sessionCache": { "enabled": false } } } ], "handler": { "type": "Chain", "config": { "filters": [ { "name": "CrossDomainSingleSignOnFilter-1", "type": "CrossDomainSingleSignOnFilter", "config": { "redirectEndpoint": "/home/cdsso/redirect", "authCookie": { "path": "/home", "name": "ig-token-cookie" }, "amService": "AmService-1" } } ], "handler": "ReverseProxyHandler" } } }Source: cdsso-idc.json
Notice the following features of the route where PingAM is running locally:
-
The AmService
URLpoints to PingAM in PingOne Advanced Identity Cloud. -
The AmService
realmpoints to the realm where you configure your PingGateway agent.
-
Restart PingGateway.
-
-
Test the setup:
-
In your browser’s privacy or incognito mode, go to https://ig.ext.com:8443/home/cdsso and accept the server certificate.
The PingOne Advanced Identity Cloud login page is displayed.
-
Sign on to PingOne Advanced Identity Cloud as user
demo, passwordCh4ng3!t.PingAM calls
/home/cdsso/redirectand includes the CDSSO token. The CrossDomainSingleSignOnFilter passes the request to the sample application.
-