+

Search Tips   |   Advanced Search

Configure single sign-on (SSO) partners

This task assumes that we have enabled the SAML Web SSO feature.

Before we can use the WAS as a service provider partner to identity providers for IdP-initiated single sign-on, establish partnerships between the WAS SAML service provider and external SAML identity providers.

  1. Add an identity provider to the WAS SAML service provider for single sign-on using one of the following methods...

    • Add an identity provider using metadata of the identity provider

      Using wsadmin...

        cd app_server_root/bin
        wsadmin -lang jython
        wsadmin> AdminTask.importSAMLIdpMetadata('-idpMetadataFileName <IdPMetaDataFile> -idpId 1 -ssoId 1 -signingCertAlias <idpAlias>')
        wsadmin> AdminConfig.save()
        wsadmin> quit

      ...where IdpMetaDataFile is the full path name of the IdP metadata file, and IdpAlias is any alias name specified for the imported certificate.

      Restart WAS.

      We can also manually add an identity provider to the WAS SAML service provider...

      The minimum requirement to configure the WAS SAML service provider as an SSO partner to an identity provider is to import the SAML token signer certificate from the identity provider to the trust store of the service provider. The service provider can be configured to work with multiple identity providers. For each identity provider, you must import the SAML token signer certificate.

      We can import the certificate used by an IdP to sign the SAML token by using either the console or wsadmin-line utility.

    • Import the SAML token signer certificate using the console

      1. Log on to the WAS console and click...

        Use CellDefaultTrustStore instead of NodeDefaultTrustStore for a deployment manager.

      2. Fill in the certificate information then click Apply.

    • Import the SAML token signer certificate using wsadmin.

        cd app_server_root/bin
        wsadmin -lang jython.
        > AdminTask.addSignerCertificate('[-keyStoreName NodeDefaultTrustStore -certificateFilePath <certFile> -base64Encoded true -certificateAlias <certAlias>]')
      • AdminConfig.save()
        quit

      ...where certFile is the full path name of the certificate file and certAlias is the alias of the certificate. Use CellDefaultTrustStore instead of NodeDefaultTrustStore for a deployment manager.

  2. Add IdP realms to the list of inbound trusted realms. For each Identity provider used with the WAS service provider, you must grant inbound trust to all the realms used by the identity provider.

    We can grant inbound trust to the identity providers using either the console or wsadmin utility.

    • Add inbound trust using the console.

    1. Click...

        Global security | user account repository | Configure | Trusted authentication realms - inbound | Add External Realm

    2. Fill in the external realm name.

    3. Click OK and Save changes to the master configuration.

  3. To add inbound trust using wsadmin.

    1. To add a single identity provider to the inbound trust...

        AdminTask.addTrustedRealms('[-communicationType inbound -realmList <realmName>]')

      ...where realmName is the name of the realm that needs to be granted inbound trust.

    2. To add a list of realms to the inbound trust...

        AdminTask.addTrustedRealms('[-communicationType inbound -realmList <realm1|realm2|realm3>]')

      ...where realm1, realm2, and realm3 are the realms that need to be added as trusted realms.

  4. Add the WAS SAML service provider to the identity providers for SSO.

    Each identity provider used with the WAS service provider needs to be configured to add the service provider as an SSO partner. The procedure for adding the service provider partner to an identity provider depends on the specific identity provider. Refer to the documentation of the identity provider for instructions on how to add a service provider partner for SSO.

    We can either export the WAS service provider metadata, and import it to the identity provider, or manually configure the identity provider to add the service provider.

    To add the service provider as a federation partner to an identity provider, provide the URL of the Assertion Consumer Service (ACS) of the service provider, which is the -acsUrl parameter used when enabling the SAML trust association interceptor (TAI).

    If an identity provider can use a metadata file to add the service provider as a federation partner, we can export the service provider metadata:

      wsadmin -lang jython AdminTask.exportSAMLSpMetadata('-spMetadataFileName /tmp/spdata.xml -ssoId 1')

    This command creates the metadata file...

      /tmp/spdata.xml

    If the SAML token is encrypted, provide the public key certificate we want the identity provider to use for encrypting the SAML token, and the certificate must exist in the WAS default KeyStore before performing an export.

  5. Configure the WAS security context using the attributes...

    • sso_<id>.sp.idMap
    • sso_<id>.sp.groupMap
    • sso_<id>.sp.groupName

    The WebSphere Application Server service provider intercepts a SAML protocol message from the identity provider, and establishes the security context. The security context is created by mapping the SAML assertion. The security context mapping in the service provider is very flexible and configurable. The following is a list of available mapping options:

    • idAssertion

      We can map the SAML assertion to the WAS platform Subject without using a local registry. This is the default behavior.

      1. The SAML NameID is mapped to the principal
      2. The issuer is mapped to the realm
      3. Selected attributes can be mapped to group members

      ID assertion can be further customized. For example, we can configure a SAML attribute as a principal, realm, accessId, or a list of group members. We can also configure NameQualifier from NameID as a realm, or use a predefined realm name.

    • localRealm

      We can configure the WAS service provider to map the NameID from a SAML assertion to the local registry of the service provider, and build the subject from the registry. With this option, we can directly search the SAML NameID against the registry, or use a plugin point for custom mapping of the assertion, and use the new mapped ID to build the subject from the registry.

    • localRealmThenAssertion

      This option allows us to map the NameID to the registry, and fall back to ID assertion if the NameID cannot be mapped to the registry.

    • AddGroupsFromLocalRealm

      This option combines ID assertion and local registry and allows us to reevaluate group membership while doing ID assertion. Consider a SAML assertion from a partner lab, containing user Joe with a group attribute of X-ray Techs. At the service provider, the group X-ray Techs is a subgroup of group Technicians, but Joe is not necessarily in the user registry of the service provider. The authorization policy of the service provider application allows access to the Technicians group. To achieve this, the SAML TAI needs to look up the asserted groups X-ray Techs in the registry and then include the parent groups Technicians in the Subject.

    When doing ID assertion to create a security context, a custom security realm is chosen. We must explicitly add the custom realm as a trusted realm. In a default ID assertion implementation, the SAML issuer name is used as the security realm. We must explicitly add the issuer name to the list of inbound trusted authentication realms in current user registry. After adding the custom realm to the inbound trusted realms, you are ready to do role mapping with this custom realm.

    To add a custom realm as a trusted realm, see the Add IdP realms to the list of inbound trusted realms step.


Results

Your WebSphere Application Server is now configured as a service provider partner for IdP-initiated SSO.


What to do next

For additional configuration options for the service provider, see the SAML web SSO TAI custom properties topics for a complete list of SAML TAI custom properties.


Related tasks

Enable the system to use the SAML web SSO feature
  • SAML web single sign-on (SSO) TAI custom properties