This documentation is for WSO2 Identity Server 5.0.0. View documentation for the latest release.
Adding a Service Provider - Identity Server 5.0.0 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

This topic provides instructions on how to add a new service provider. This is useful in a scenario where a user logs into a web application through the WSO2 Identity Server. You must provide configuration details to add this "Service Provider" in the Identity Server so that the authentication and provisioning happens as expected.

  1. Sign in. Enter your username and password to log on to the Management Console
  2. Navigate to the Main menu to access the Identity menu. Click Add under Service Providers.
  3. Fill in the Service Provider Name and provide a brief Description of the service provider. Only Service Provider Name is a required field.
  4. Click Register to add the new service provider.

    Note: The service provider you create can be viewed by your tenant or any user within your tenant domain in the Main menu of the management console by clicking List under the Service Provider section and Identity section. However, you must keep in mind that when a service provider is created, it is assigned to a role called "Internal". All users in the tenant domain must be assigned this role in order to view the service provider created. See Configuring Roles for guidance on how to do this.

  5. The Service Providers screen appears. Here you have the option of selecting if the service provider is a SaaS Application or not. The SaaS Application configuration defines which users you want to be able to log into your web application.

    Tip: By default, the SaaS Application checkbox is disabled, which means the web application is not shared among tenants so only users in the current tenant (the one you use to define the service provider) will be allowed to log into the web application. Alternatively, if you enabled the SaaS Application checkbox, that means this web application is shared among tenants so users from any tenant will be allowed to log into the web application. For example, if there are three tenants, namely TA, TB and TC and the service provider is registered and configured only in TA.

    • If the SaaS Application configuration is disabled, only users in TA are able to log into the web application.

    • If the SaaS Application configuration is enabled, all TA, TB, TC users are able to log into the web application.

  6. In the resulting screen, click the arrow buttons to expand the forms available to update.

     Click here for details on how to configure claims

    Claim mapping for a service provider involves mapping claims that are used by the service provider to the claims local to the WSO2 Identity Server. See the Identity Server Architecture for more information on how claim mapping fits in to the overall scheme of things.

    In the Claim Configuration form, select the claim mapping dialect by either choosing to use a local claim dialect or define your own custom claim dialect.

    1. If you choose to Use Local Claim Dialect, you need to fill in the following details.
      1. Fill in your requested claims by clicking the Add Claim URI button. Clicking this button again enables you to map more claims.
      2. Choose your Local Claim from the dropdown.
    2. If you choose to Define Custom Claim Dialect, you need to do the following. 
      1. Add a custom claim URI by clicking on the Add Claim URI button. Clicking this button again enables you to map more claims.
      2. Add the Service Provider Claim and choose the corresponding Local Claim from the dropdown and select whether you want the claim to be a Requested Claim by using the checkbox.

        Information on mapping claims

        The Local Claim list includes a set of standard claim values which are local to the WSO2 Identity Server. When adding a service provider, it is necessary to map the values of the claims local to the service provider with those provided in this dropdown list which are local to the Identity Server. This should be done for all values in the service provider unless they use the same claim name.

        Marking a mapped claim as a Requested Claim would ensure that the service provider definitely sends this claim to the Identity Server. This is useful particularly in cases where there are hundreds of claims and only specific ones need to be sent to the Identity Server.

      3. Select the Subject Claim URI and the Role Claim URI from the dropdown. The claims you mapped will be listed in the dropdown and you can choose among these claims.

        • The Subject Claim URI is important to define as it is the unique value used to identify the user. In cases where you have a user store connected to the Identity Server, this Subject Claim URI value is used to search for the user in the user store.
        • The Role Claim URI is used to identify the claim that equates to the role of the user. This is linked to the permissions that you can apply for specific user roles.

     Click here for details on how to configure roles and permissions

    You can configure the roles and permissions of the service provider.

    1. Expand the Role/Permission Configuration section and the Permission and Role Mapping forms.
    2. Click the Add Permission button. Clicking this button again will enable you to add another entry.
    3. Add the Service Provider Specific Permissions. You can delete entries by clicking the Delete button.

      Once the service provider details have been added/updated, the permissions added here are listed out in the permissions available when adding roles in the Identity Server.

    4. Click the Add Role Mapping button. Clicking this button again will enable you to add another entry.
    5. Enter the Local Role and the Service Provider Role. You can delete entries by clicking the Delete button.

      Here you can map the exact role name available in the Identity Server with the role in the service provider.

     Click here for details on how to configure inbound authentication

    You can configure the following in inbound authentication.

    Configuring Inbound Authentication

    Configuring SAML2 web single-sign-on

    1. Expand the SAML2 Web SSO Configuration and click Configure.
    2. Fill in the form that appears.
    3. Click Register.

    The following points should be taken into consideration when filling the above New Service Provider form.

    • Specify the Issuer. This is the <saml:Issuer> element that contains the unique identifier of the service provider. This is also the issuer value specified in the SAML Authentication Request issued by the service provider. When configuring single-sign-on across Carbon servers, ensure that this value is equal to the ServiceProviderID value mentioned in the <IS_HOME>/repository/conf/security/authenticators.xml file of the relying party Carbon server.

    • Specify the Assertion Consumer URL. This is the URL to which the browser should be redirected to after the authentication is successful. This is the Assertion Consumer Service (ACS) URL of the service provider. The identity provider redirects the SAML2 response to this ACS URL. However, if the SAML2 request is signed and SAML2 request contains the ACS URL, the Identity Server will honor the ACS URL of the SAML2 request. It should have this format: https://(host-name):(port)/acs.

    • Specify the NameID format. This defines the name identifier formats supported by the identity provider. The service provider and identity provider usually communicate with each other regarding a specific subject. That subject should be identified through a Name-Identifier (NameID) , which should be in some format so that It is easy for the other party to identify it based on the format. Name identifiers are used to provide information regarding a user. 

      About NameID formats

      For SSO interactions, you can use the following types of NameID formats.

      • urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
      • urn:oasis:names:tc:SAML:2.0:nameid-format:transient
      • urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
      • urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
      • urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
      • urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
      • urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
      • urn:oasis:names:tc:SAML:2.0:nameid-format:entity

      This specifies the name identifier format that the Identity Server wants to receive in the subject of an assertion from a particular identity provider. The following is the default format used by the identity provider.

      • urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
    • Select Use fully qualified username in the NameID if that feature is required. A fully qualified username is basically the user name with the user store domain. In short, the username must be in the following format: {user store domain}{user name}

    • Select Enable Response Signing to sign the SAML2 Responses returned after the authentication process.
    • Select Enable Assertion Signing to sign the SAML2 Assertions returned after the authentication. SAML2 relying party components expect these assertions to be signed by the Identity Server.

    • Select Enable Signature Validation in Authentication Requests and Logout Requests if you need this functionality configured. This specifies whether the identity provider must validate the signature of the SAML2 authentication request and the SAML2 logout request that are sent by the service provider. 

    • Enable Assertion Encryption, if you wish to encrypt the assertion.
    • Select the Certificate Alias from the dropdown. This is used to validate the signature of SAML2 requests and is used to generate encryption. Basically the service provider’s certificate must be selected here. Note that this can also be the Identity Server tenant's public certificate in a scenario where you are doing a tenant specific configuration.
    • Select Enable Single Logout so that all sessions are terminated once the user signs out from one server. If single logout is enabled, the identity provider sends logout requests to all service providers. Basically, the identity provider acts according to the single logout profile. If the service provider supports a different URL for logout, you can enter a Custom Logout URL for logging out. If you do not specify this URL, the identity provider uses the Assertion Consumer Service (ACS) URL. 

    • Select Enable Attribute Profile to enable this and add a claim by entering the claim link and clicking the Add Claim button. The Identity Server provides support for a basic attribute profile where the identity provider can include the user’s attributes in the SAML Assertions as part of the attribute statement. Once you select the checkbox to Include Attributes in the Response Always, the identity provider always includes the attribute values related to the selected claims in the SAML attribute statement. 

    • Select Enable Audience Restriction to restrict the audience. You may add audience members using the Audience text box and clicking the Add Audience button.

    • Select Enable Recipient Validation if required. The recipient attribute of a SAML assertion contains the service provider's Assertion Consumer Service (ACS) URL, and the Identity Server, by default, sends the registered service provider's ACS URL as the recipient.

      Tip: There can be situations where the same SAML assertion can be consumed by multiple service providers. A scenario where we use SAML2 Bearer Grant is one such example. In such a scenario the assertion consumer endpoints of all those intended service providers should be added as recipients. Enabling recipient validation allows you to do just that.

    • Select the Enable IdP Initiated SSO checkbox to enable this functionality. When this is enabled, the service provider is not required to send the SAML2 request. 

    Additional configurations

    If you need to sign the SAML response using an authenticated user's tenant keystore, please add the following configuration. (By default, the response is signed using the certificate that belongs to the tenant where the service provider is registered). This property must be added if the SAML authenticator version in the WSO2 Carbon products that you are using is 4.2.2 or higher (org.wso2.carbon.identity.authenticator.saml2.sso_4.2.2.jar).

    Add the <UseAuthenticatedUserDomainCrypto> property available in the <IS_HOME>/repository/conf/identity.xml file as shown below.


    Configuring OAuth/OpenID Connect

    OAuth provides a method for clients to access server resources on behalf of a resource owner (such as a different client or an end-user). It also provides a process for end-users to authorize third-party access to their server resources without sharing their credentials (typically, a username and password pair), using user-agent redirections.

    OpenID Connect is a simple identity layer on top of the OAuth 2.0 protocol. It allows Clients to verify the identity of the End-User based on the authentication performed by an Authorization Server, as well as to obtain basic profile information about the End-User in an interoperable and REST-like manner.

    OpenID Connect allows clients of all types, including Web-based, mobile, and JavaScript clients, to request and receive information about authenticated sessions and end-users. The specification suite is extensible, allowing participants to use optional features such as encryption of identity data, discovery of OpenID Providers, and session management, when it makes sense for them.

    To enable OAuth support for your client application, you must first register your application by providing an application name and a callback URL. Follow the instructions below to add a new application.

    1. Expand the OAuth/OpenID Connect Configuration and click Configure.
    2. Fill in the form that appears. For the Allowed Grant Types you can disable the ones you do not require or wish to block.
    3. Click Add. The following information is added for your service provider.

      • OAuth Client Key - This is the client key of the service provider, which will be checked for authentication by the Identity Server before providing the access token.
      • OAuth Client Secret - This is the client secret of the service provider, which will be checked for authentication by the Identity Server before providing the access token. Click the Show button to view the exact value of this.

      Tip: The OAuth client key and client secret are stored in plain text. To encrypt the client secret, access token and refresh token, do the following:

      Open the identity.xml file found in the <IS_HOME>/repository/conf/ directory and change the <TokenPersistenceProcessor> property as follows:


    When filling out the New Application form, the following should be taken into consideration.

    • Selecting OAuth Version as 1.0a removes all the configurable Allowed Grant Types. This is because this version of OAuth does not support grant types.
    • The Callback Url is the exact location in the service provider's application where an access token would be sent. This is a required field and important to configure as it is imperative that the service provider receives the access token. This is necessary for security purposes to ensure that the token is not compromised.
    • The following are the grant types that are used to get the access token.
      • Code - Entering the user name and password required at the service provider will result in a code being generated. This code can be used to obtain the access token.
      • Implicit - This is similar to the code grant type, but instead of generating a code, this directly provides the access token.
      • Password - This authenticates the user using the password provided and the access token is provided.
      • Client Credential - This is the grant type for the client key and client secret. If these two items are provided correctly by the service provider, the access token is sent.
      • Refresh Token - This will enable the user to obtain an access token by using the refresh token once the originally provided access token is used up.
      • SAML - This uses SAML as the grant type to obtain the access token.
      • IWA-NTLM - This is similar to the password grant type, but it is specific to Microsoft Windows users.

    Configuring WS-Trust Security Token Service

    This requires registration of relying party endpoint addresses and their corresponding public certificates. In this scenario, STS generates a symmetric key and encrypts it with the public key of the relying party. This is included in the subject confirmation section of the SAML token, which is validated at the relying party end.

    Follow the instructions below to configure STS for obtaining tokens.

    1. Expand the WS-Trust Security Token Service Configuration and click Configure.
    2. Specify the required information in the form that appears.
      • Endpoint Address - Relying party service endpoint where the token is being delivered to. This is a required field.
      • Certificate Alias - Corresponding public certificate for the service endpoint.
    3. Click Apply. The following information is added to your service provider.

    Configuring WS-Federation (Passive) and OpenID

    1. Expand the WS-Federation (Passive) Configuration and OpenID Configuration.
    2. Enter the identifier for the Passive STS Realm and the OpenID Realm. These identifiers need to be specified as identification when the service provider reaches out to the Identity Server.

     Click here for details on how to configure local and outbound authentication

    You can configure the following in local and outbound authentication.
    1. Expand Local & Outbound Authentication Configuration.
    2. Select the Authentication Type you require from the available options. This is a required field.
      • If you choose Advanced Configurations, you can configure additional authentication steps.
        1. Click Add Authentication Step. Clicking this again will enable you to create another authentication step.
        2. Select whether this is a Subject Step, Attribute Step or both. In the case of multiple steps, you can have only one step as the subject step and one as the attribute step.
        3. Click the plus button to add a Local Authenticator. You can choose the type of authenticator using the dropdown. Clicking the plus button again will enable you to add a second local authenticator. Basic authentication allows you to authenticate users from the enterprise user store.
        4. Click the plus button to add a Federated Authenticator. You can choose the type of authenticator using the dropdown. Clicking the plus button again will enable you to add a second federated authenticator.
        5. Click the Update button. This will return you to the previous screen with your newly configured authentication steps.
      • If you choose Federated Authentication, you need to select the identity provider from the dropdown list.
    3. Add a local authenticator under Request Path Authentication Configuration by clicking the Add button. Clicking the Add button again enables you to add another local authenticator. The two types of local authenticators available are as follows.
      • OAuthRequestPathAuthenticator
      • BasicAuthRequestPathAuthenticator

    Look through the following for more details on the various authentication types.

    Authentication TypeDetails
    DefaultThis is the default authentication provided by the service provider.
    Local AuthenticationThis is the authentication enabled in the Identity Server.
    Federated AuthenticationThe Federated Authenticators are not within the Identity Server like local authenticators. These are external. Federated authentication is based on the Identity Provider that you added to the WSO2 Identity Server. In this case, the user is authenticated by checking the user details against the details specified in the identity provider.
    Advanced ConfigurationAdvanced configurations enable you to add multiple steps in authentication. When multiple authentication steps exists, the user is authenticated based on each and every one of these steps. If only one step is added then the user is only authenticated based on the local and/or federated authenticators added. However, in the case of local and/or federated authenticators, the authentication happens based on any one of the available authenticators.

    About request path authenticators

    When user credentials are attached to the request itself, federated login is enabled by using these credentials. This is done by request path authenticators which is shipped with WSO2 IS.

     Click here for details on how to configure inbound provisioning

    You can configure the inbound provisioning of the service provider.

    1. Expand the Inbound Provisioning Configuration section and expand the SCIM/SOAP Configuration form.
    2. Select the user store domain name from the drop down list to provision users and groups.

     Click here for details on how to configure outbound provisioning

    You can configure the outbound provisioning of the service provider.

    1. Expand the Outbound Provisioning Configuration.
    2. Choose the identity provider you require from the dropdown. 
    3. Click Add to add this identity provider. An entry will appear in the form.

      Click the Delete button to remove the identity provider you added.

    4. Select googleapps, spml, salesforce or scim from the dropdown, depending on where you want the outbound provisioning to happen.

  7. Click the Update button to update the details of the service provider.

  • No labels