Single sign-on (SSO) lets users who have authenticated to Identity Cloud access multiple independent services from a single login session by storing user sessions as HTTP cookies.
Cross-domain single sign-on (CDSSO) provides SSO inside the same organization within a single domain or across domains.
For example, CDSSO lets your AM servers in the DNS domain
.internal.net provide authentication and
authorization to web and Java agents from the
.internal.net domain and other DNS domains, such as
Because CDSSO removes the constraint of configuring SSO depending on the DNS domain, it simplifies the deployment of SSO in your environment.
When implementing CDSSO, take into account the following points:
For SSO across multiple organizations or when integrating with other access management software, use AM’s federation capabilities, such as OAuth 2.0 or SAML v2.0.
Web agents and Java agents both support CDSSO.
AM also supports CDSSO with IG version 6 or later. For details, refer to Single sign-on and cross-domain single sign-on in the IG documentation.
Web agents and Java agents wrap the SSO session token inside an OpenID Connect (OIDC) JSON Web Token (JWT).
During the CDSSO flow, the agents create cookies for the different domains specified in the agent profile,
oauth2/authorize endpoint authorizes the different cookie domains as required.
The following diagram illustrates the CDSSO flow for web agents and Java agents:
When changing authentication realms, a subject leaves the current SSO realm. The new SSO realm might apply to different applications, and use a different authentication process. For AM, logging in to a new realm means logging out of the current realm.
When a user interactively changes realms through the AM admin UI, AM offers the option of logging out of the current realm to log in to the new realm, or choosing to remain logged in to the current realm.
The result depends on the user’s choice:
If the user cancels the change at this point, the user remains logged in to the current realm and is not logged in to the new realm.
If the user chooses to log in to the new realm, AM first logs the user out of the current realm then prompts the user to log in to the new realm.
To understand how SSO works, you need to understand some key elements of the HTTP cookie, as described in RFC 6525, HTTP State Management Mechanism.
Within an HTTP cookie, you can store a single custom
name=value pair, such as
Other properties within a cookie are as follows:
Also known as the cookie domain, this is the domain with which the cookie is associated. The default value is the current domain. To work with multiple subdomains, set the
Domainto a URL such as
The directory in the URL to which the cookie applies. If
Path=/openam, the cookie applies to the
/openamsubdirectory of the URL, and lower level directories, including
You can limit the lifetime of a cookie with an
Expiresproperty set to a time based on UTC (GMT).
Do not take a shortcut with a top-level domain.
Web browser clients are designed to ignore cookies set to top-level domains including
Cross-domain single sign-on (CDSSO) provides SSO capabilities for AM servers and web or Java agents within a single domain or across domains in the same organization.
CDSSO is the only mode of operation for web and Java agents, so no additional configuration is required to make it work.
IG also supports CDSSO with AM. For details, refer to the ForgeRock Identity Gateway Gateway Guide.
In general, problems with single sign-on relate to some sort of mismatch of domain names.
For example, a cookie that is configured on a third-level domain, such as
will not work with an application on a similar domain, such as
The following list describes scenarios that may lead to similar problems:
When a cookie domain does not match a domain for the protected application.
Assume the application is configured on a domain named
example.org. That application will not receive an SSO token configured on the
When a third-level domain is used for the SSO token.
If an SSO token is configured on
sso.example.net, an application on
app.example.netdoes not receive the corresponding session token. In this case, the solution is to configure the SSO token on
Cookie Securityor the
CDSSO Secure Enableproperties are configured in the agent profile with a regular HTTP application.
If you need encrypted communications for an application protected by AM, use the
Cookie Securityor the
CDSSO Secure Enableproperties and make sure the application is accessible over HTTPS.
When the path listed in the cookie does not match the path for the application.
Perhaps the cookie is configured with a
/helloworldpath; that will not match an application that might be configured with a
/hellomarspath. In that case, the application will not receive the cookie.
When an inappropriate name is used for the cookie domain.
As noted earlier, client browsers are configured to ignore first-level domains, such as
netas well as functional equivalents, such as
When working with different browsers.
_) character in the FQDN.