Skip to content

Single sign-on

Operators (PMO, Trusted Agents, help desk) can sign in with the organization's identity provider, by OpenID Connect (OIDC) or SAML 2.0. Single sign-on is off until an identity provider is configured; the passcode sign-in works as before either way, and the self-service pages for end users do not use it.

How a sign-in goes

  1. The operator clicks Sign in with <provider> on the sign-in page.
  2. The identity provider proves who the operator is. Its groups decide the Portal roles, through the role mapping and nothing else. A sign-in whose groups map to no role is refused (no_mapped_role); so is an answer without the user ID claim.
  3. That is not yet a sign-in: the sign-in page then asks for the SecurID passcode of the same user ID, which opens the operator's own Authentication Manager session. A passcode of another user is refused (sso_user_mismatch), and so is one entered more than ENS_SSO_PENDING_TIMEOUT (5 minutes) after the identity provider's answer.

The Connector makes the operator's changes in that session, so Authentication Manager still checks the operator's own permissions and names the operator in its log, and every help-desk rule (identity verification, a second operator's approval, the audit record before the change) applies exactly as to a passcode sign-in.

Administrative roles without single sign-on

Up to the current release, with an identity provider configured, a passcode-only sign-in still gets the roles Authentication Manager grants, unless ENS_SSO_REQUIRE_FOR_ADMIN_ROLES=true (default false). With it, a passcode sign-in alone gets the user role only, and administrative roles come only through single sign-on.

From the next release: mapped administrative roles only through the identity provider

ENS_SSO_REQUIRE_FOR_ADMIN_ROLES is unset by default (it was false). With an identity provider configured, a sign-in with the SecurID passcode alone no longer gets an administrative role (PMO, trusted agent, help desk) that ENS_SSO_ROLES_* maps a group to: that role comes only through single sign-on, so the provider's conditional access cannot be bypassed. Those operators sign in with the provider's button on the sign-in page, which they can already. A role that no group grants still comes from Authentication Manager (or nobody could hold it), and the Portal logs a warning naming it at every start.

ENS_SSO_REQUIRE_FOR_ADMIN_ROLES A passcode-only sign-in gets
Unset (the default from the next release) The administrative roles Authentication Manager grants, except those a group is mapped to
true The user role only: every administrative role comes only through single sign-on
false The roles Authentication Manager grants, as before (a warning at every start)

Without an identity provider nothing changes. Helm: sso.requireForAdminRoles (null by default; false keeps the old behaviour).

What is checked

  • OpenID Connect: the authorization code flow with PKCE (S256), for confidential clients too, and a nonce. The ID token's signature (the provider's published keys), issuer, audience, azp, expiry and issue time are checked, with ENS_SSO_CLOCK_SKEW (60 s) of tolerance; the access token is not kept. A registration without an issuer URI or without the openid scope stops the start.
  • SAML 2.0: the response or every assertion must be signed with the asserting party's certificate; issuer, audience, destination, recipient, InResponseTo and validity times are checked (ENS_SSO_CLOCK_SKEW). Only an answer to a request this Portal sent is accepted, once: requests are kept in the database (table SsoSamlRequest, five minutes) by RelayState, because the identity provider's POST arrives without the session cookie; the answer that uses one deletes it, so a replay is refused. IdP-initiated sign-in is refused. Requests go by HTTP-Redirect (the Content-Security-Policy forbids the self-submitting form of HTTP-POST).
  • No single logout (up to the current release): signing out of the Portal ends the Portal session and the operator's Authentication Manager session, not the identity provider's. From the next release, see Signing out (OpenID Connect and SAML single logout).

Signing out

Signing out of the Portal ends the Portal session and the operator's Authentication Manager session. From the next release, the operator can also be signed out of the identity provider: by OpenID Connect RP-initiated logout, or by SAML single logout.

OpenID Connect

  • With ENS_SSO_OIDC_END_SESSION=true (Helm sso.oidcEndSession), an operator who signed in by OpenID Connect is sent on, after the Portal's sign-out, to the provider's end_session_endpoint (from its discovery document) with client_id and post_logout_redirect_uri=<APPLICATION_DNS_NAME>/. Allow that URI at the provider before turning it on.
  • The Portal goes there from a page of its own, /signed-out, because the Content-Security-Policy's form-action 'self' stops the sign-out form's redirect from leaving the Portal.
  • The Portal does not keep the ID token, so there is no id_token_hint: some providers then ask the operator to confirm or pick the account, and those that require it (Okta) refuse the request, so leave the setting off there.
  • A provider without an end_session_endpoint is logged as a warning at startup.
  • It is off for an existing installation; the env template of new installations turns it on. While OpenID Connect is configured and it is off, the Portal logs a warning at every start.

SAML single logout (next release)

With ENS_SSO_SAML_SINGLE_LOGOUT=true (Helm sso.samlSingleLogout), for an asserting party whose metadata has a SingleLogoutService by HTTP-Redirect (or, without metadata, SPRING_SECURITY_SAML2_RELYINGPARTY_REGISTRATION_<ID>_ASSERTINGPARTY_SINGLELOGOUT_URL with _ASSERTINGPARTY_SINGLELOGOUT_BINDING=REDIRECT; Helm sso.saml[].singleLogoutUrl) and for which the Portal has a signing key (..._SIGNING_CREDENTIALS_0_PRIVATE_KEY_LOCATION and _CERTIFICATE_LOCATION; Helm sso.saml[].signingSecret, a TLS Secret):

  • Signing out of the Portal sends an operator who signed in through that asserting party on, from the same /signed-out page, with a signed LogoutRequest naming the NameID (its Format and qualifiers as issued) and session index of the sign-in. The asserting party's LogoutResponse comes back to <APPLICATION_DNS_NAME>/logout/saml2/slo, is checked (signature, issuer, destination, the request it answers, once) and lands on the home page.
  • Signing out at the asserting party (or of another application): a signed LogoutRequest from it to that address ends the operator's Portal and Authentication Manager sessions when the session came from that asserting party with that NameID (audited as auth.logout with details.by=identity-provider), and is answered with a signed LogoutResponse. Any other session is left alone.
  • The Portal's SingleLogoutService, <APPLICATION_DNS_NAME>/logout/saml2/slo (HTTP-Redirect), is then in its metadata: refresh the relying party at the asserting party (ADFS: update from metadata, or add the SAML logout endpoint by hand).
  • POST-only SingleLogoutServices are not used (the Content-Security-Policy forbids the self-submitting form).
  • Without the setting, the key or the asserting party's SingleLogoutService, signing out ends the Portal session and the operator's Authentication Manager session only, and the Portal says which is missing at every start.
  • It is off for an existing installation; the env template of new installations (ENS_SSO_SAML_SINGLE_LOGOUT=true, with commented signing-key lines) turns it on. The Helm chart's sso.samlSingleLogout defaults to false.
  • Logout requests in flight are kept in a new table, SsoSamlLogoutRequest (Flyway V9).

Settings

The identity providers are Spring Boot's own settings; the registration id (letters and digits) is part of the URLs to register with the provider.

Setting Meaning
APPLICATION_DNS_NAME Required with single sign-on: the Portal's public address (https://rsa-portal.example.com). Every URL given to an identity provider is built from it, never from the request's Host or X-Forwarded-* headers: the redirect URI, the SAML entity id and Assertion Consumer Service
SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_<ID>_CLIENT_ID, _CLIENT_SECRET, _CLIENT_NAME, _SCOPE An OpenID Connect client. _SCOPE must include openid (for example openid,profile, plus what your provider needs to send the groups claim). Redirect URI: <APPLICATION_DNS_NAME>/login/oauth2/code/<id>
SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_<ID>_ISSUER_URI Required: the provider's issuer; its discovery document is read at startup
SPRING_SECURITY_SAML2_RELYINGPARTY_REGISTRATION_<ID>_ASSERTINGPARTY_METADATA_URI A SAML asserting party by its metadata (read at startup). Or _ASSERTINGPARTY_ENTITY_ID, _ASSERTINGPARTY_SINGLESIGNON_URL and _ASSERTINGPARTY_VERIFICATION_CREDENTIALS_0_CERTIFICATE_LOCATION=file:/path/idp.crt
SPRING_SECURITY_SAML2_RELYINGPARTY_REGISTRATION_<ID>_ASSERTINGPARTY_SINGLESIGNON_BINDING REDIRECT (required when the metadata lists POST first)
SPRING_SECURITY_SAML2_RELYINGPARTY_REGISTRATION_<ID>_SIGNING_CREDENTIALS_0_PRIVATE_KEY_LOCATION, _CERTIFICATE_LOCATION Optional: the Portal's signing key and certificate (PEM, for example file:/ssl/saml-sp.key and .crt from default_build/ssl). Sign the requests (_ASSERTINGPARTY_SINGLESIGNON_SIGN_REQUEST=true); from the next release, SAML single logout needs them
SPRING_SECURITY_SAML2_RELYINGPARTY_REGISTRATION_<ID>_ASSERTINGPARTY_SINGLELOGOUT_URL, _ASSERTINGPARTY_SINGLELOGOUT_BINDING (next release) Without metadata: the asserting party's SingleLogoutService, with binding REDIRECT
ENS_SSO_ROLES_PMO_0, _1, ...; ENS_SSO_ROLES_TRUSTED_AGENT_n; ENS_SSO_ROLES_HELP_DESK_n The groups (exact values, one per variable: a DN with commas is one group) that grant each role
ENS_SSO_OIDC_USER_ID_CLAIM, ENS_SSO_OIDC_GROUPS_CLAIM preferred_username, groups: the claims with the Authentication Manager user ID and the groups
ENS_SSO_SAML_USER_ID_ATTRIBUTE, ENS_SSO_SAML_GROUPS_ATTRIBUTE Empty (the NameID), groups
ENS_SSO_LABELS_<ID> The button's label (default: the client name, or the id)
ENS_SSO_REQUIRE_FOR_ADMIN_ROLES false. true: administrative roles only through single sign-on; a passcode sign-in alone gets the user role only. From the next release unset by default: each administrative role ENS_SSO_ROLES_* maps a group to comes only through single sign-on; false keeps the old behaviour (warning at every start). See above
ENS_SSO_OIDC_END_SESSION (next release) false; the env template of new installations sets true. true: signing out continues to the OpenID Connect provider's end_session_endpoint. See Signing out
ENS_SSO_SAML_SINGLE_LOGOUT (next release) false; the env template of new installations sets true. true: SAML single logout where the asserting party and the Portal's key allow it. See SAML single logout
ENS_SSO_PENDING_TIMEOUT, ENS_SSO_CLOCK_SKEW 5m, 60s

Addresses for the identity provider, where <id> is the registration id:

OIDC redirect URI <APPLICATION_DNS_NAME>/login/oauth2/code/<id>
SAML service provider metadata (also its entity id) <APPLICATION_DNS_NAME>/saml2/service-provider-metadata/<id>
SAML Assertion Consumer Service <APPLICATION_DNS_NAME>/login/saml2/sso/<id> (Spring Boot's _ENTITY_ID and _ACS_LOCATION override them)
SAML SingleLogoutService (next release, HTTP-Redirect, with ENS_SSO_SAML_SINGLE_LOGOUT) <APPLICATION_DNS_NAME>/logout/saml2/slo, named in the metadata

Helm

The chart sets all of these from sso.*, and APPLICATION_DNS_NAME from publicUrl or the ingress or route host; it refuses single sign-on without one.

sso:
  oidc:
    - id: agency
      clientName: Agency sign-in       # the button: "Sign in with Agency sign-in"
      issuerUri: https://login.example.com/realms/agency
      clientId: rsa-portal
      existingSecret: rsa-portal-oidc  # or clientSecret
      scopes: [openid, profile]
  saml:
    - id: adfs
      label: Agency ADFS
      metadataUri: https://adfs.example.com/FederationMetadata/2007-06/FederationMetadata.xml
      # or entityId, singleSignOnUrl (and, next release, singleLogoutUrl) and certificateSecret
      signingSecret: rsa-portal-saml-signing   # a TLS Secret (tls.key, tls.crt); single logout needs it
  roles:
    pmo: ["CN=RSA PMO,OU=Groups,DC=example,DC=com"]
    trustedAgent: []
    helpDesk: []
  requireForAdminRoles: false        # next release: null (unset) by default; see above
  oidcEndSession: false              # next release: true signs out of the OIDC provider too
  samlSingleLogout: false            # next release: true for SAML single logout

From the next release, sso.requireForAdminRoles defaults to null, and sso.oidcEndSession and sso.samlSingleLogout to false. sso.samlSingleLogout: true applies to each entry in sso.saml with a signingSecret and a SingleLogoutService by HTTP-Redirect (in its metadata, or singleLogoutUrl). A release whose values set requireForAdminRoles: false explicitly keeps the old behaviour; one that relied on the chart's old default moves to the new rule.

Identity providers

Keycloak, Microsoft Entra ID, Okta and ADFS work with these settings.

  • Entra ID sends group object ids in groups: map those.
  • ADFS needs a claim rule that sends the groups and the user ID (for example sAMAccountName as NameID).
  • The user ID the provider sends must be the operator's Authentication Manager user ID, because the passcode that follows must belong to the same user.

Audit

  • auth.sso-verified when the identity provider's answer is accepted (user ID, provider, mapped roles).
  • A failed auth.login with details.method oidc or saml and the reason (invalid_id_token, invalid_signature, invalid_in_response_to, no_mapped_role, ...) when it is not.
  • auth.login with details.method oidc+securid or saml+securid and details.idp when the sign-in completes, or a failure with sso_user_mismatch or sso_expired (an alert).

Upgrading

Single sign-on is new and off until an identity provider is configured. Flyway adds the SsoSamlRequest table (V6) with the release's other migrations.

From the next release, with single sign-on configured:

  • A role ENS_SSO_ROLES_* maps a group to comes only through the identity provider; a passcode sign-in alone no longer gets it. Operators sign in with the provider's button, as they can already. ENS_SSO_REQUIRE_FOR_ADMIN_ROLES=false (Helm sso.requireForAdminRoles: false) keeps the old behaviour.
  • ENS_SSO_OIDC_END_SESSION is new and off for an existing installation. Allow <APPLICATION_DNS_NAME>/ as a post-logout redirect URI at the provider before turning it on.
  • ENS_SSO_SAML_SINGLE_LOGOUT is new and off for an existing installation; new installations' env template turns it on. Give the Portal a signing key, then refresh the relying party at the asserting party so it learns <APPLICATION_DNS_NAME>/logout/saml2/slo. Flyway V9 adds SsoSamlLogoutRequest at the first start.