This topic provides instructions on how to add a new service provider. You must provide configuration details to add this service provider in the WSO2 Identity Server so that the authentication and/or provisioning happens as expected. For more information on how the service provider fits into the WSO2 IS architecture, see Architecture.
The responsibility of the service provider configuration is to represent external service providers. The service provider configurations cover the following:
- Define how the service provider talks to the Identity Server inbound authenticator
This is via inbound authenticators. When you register a service provider, you need to associate one or more inbound authenticators with it. - Define how to authenticate users.
This can be via a local authenticator, request-path authenticator or federated authenticator. Based on this configuration, the Identity Server knows how to authenticate the user when it receives an authentication request (via an inbound authenticator) and based on the service provider who initiates it. - Maintain claim mapping.
This is to map the service provider's own set of claims to the Identity Server's claims. For example, WSO2 Identity Server (WSO2 IS) has a claim called work email (
http://wso2.org/claims/emails.work
) but your service provider application expects to receive a value named email. If the service provider application receives a value named work email, it does not recognize it as it does not recognize it. Therefore, to ensure that the values sent by WSO2 IS is understood and recognized by the service provider application, you can use claim mapping.
When the authentication framework hands over a set of claims (which it gets from the local user store or from an external identity provider) to the response builder of the inbound authenticator, the framework talks to the service provider configuration component, find the claim mapping and do the claim conversion. See Configuring Inbound Authentication for a Service Provider for more information about response builder. Now the response builder will receive the claims in a manner understood by the corresponding service provider. Read more about claim management.
This topic contains the following sections.
Adding a service provider
- Sign in to the Management Console.
On the Main menu, click Identity > Service Providers > Add.
Fill in the Service Provider Name and provide a brief Description of the service provider. Only Service Provider Name is a required field.
Click Register to add the new service provider.
The Service Providers screen appears. Paste the application's certificate to the Application Certificate field.
Select if the service provider is a SaaS Application or not using the Saas Application checkbox. The SaaS Application configuration defines which users you want to be able to log into your web application.
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. For the occasions where a service provider needs some information of the user from the Identity Server where the service provider authenticates, the claim mapping is useful. Once the user is authenticated, the service provider can use these received claim details to provide its service. See the Identity Server Architecture for more information on how claim mapping fits in to the overall scheme of things.
Claim mapping
- In the Claim Configuration form, s elect the claim mapping dialect by either choosing to use a local claim dialect or define your own custom claim dialect.
- If you choose to Use Local Claim Dialect, you need to fill in the following details.
- Fill in your requested claims by clicking the Add Claim URI button.
- Choose your Local Claim from the drop-down. Select whether this claim is a Mandatory Claim for the Service Provider using the checkbox.
- If you choose to Define Custom Claim Dialect, you need to do the following.
Add a custom claim URI by clicking on the Add Claim URI button. Clicking this button again enables you to map more claims.
Add the Service Provider Claim and choose the corresponding Local Claim from the drop-down. Select whether you want the claim to be a Requested Claim and whether this claim is a Mandatory Claim for the service provider, using the relevant checkboxes.
Click to view vital information when configuring claims for an OpenID Connect Service Provider
Note: When mapping custom claims for a service provider configured with OpenID Connect, ensure to map the custom claims in the SP configuration as seen in the screenshot above AND also add the custom claims to a scope value in the oidc file.
To do this,
- Click on List under OIDC Scopes under the Manage section of the Main tab of the management console.
- Add the custom claims to the existing default scope openid by clicking on Add Claims. Alternatively, add a new scope for the custom claims by clicking on Add under OIDC Scopes and send the newly added scope along with the mandatory openid scope when getting the OIDC token.
Click to view vital information when configuring claims for an SAML2 Service Provider
Note: When mapping custom claims for a service provider configured with SAML2, ensure to select both "Enable Attribute Profile" and " Include Attributes in the Response Always" from the SAML2 service provider configuration as follows.
Select the Subject Claim URI and the Role Claim URI (for custom claims)from the drop-down. The claims you mapped are listed in the drop-down and you can choose among these claims.
Click here for details on how to configure roles and permissions
WSO2 Identity Server (WSO2 IS) allows you to configure and manage roles as well as permission for a service provider.
When you create a service provider via WSO2 IS, a corresponding application role is created by default within WSO2 IS. For example, if you create a service provider named SP1, a corresponding application role is created for SP1 within WSO2 IS, and that application role is assigned to the user who created the service provider. Therefore, only the user who creates a service provider can view or manage the service provider. If you want to allow any other user to be able to view or manage a service provider, the user has to be assigned the application role corresponding to the particular service provider.
Now, let's create a service provider, and then configure roles and permission for the created service provider.
Next, follow the steps below to configure roles and define custom permission for the service provider:
- In the service provider that you created, expand the Role/Permission Configuration section, and then expand the Permissions as well as the Role Mapping sections.
Click Add Permission and specify the service provider specific permission that you want to add.
Once you add/update service provider specific permission details, the permission details will be listed as available permission when adding roles via WSO2 IS.
Click Add Role Mapping and enter appropriate values for the Local Role as well as the Service Provider Role.
Now that you have configured roles and permission for the service provider, you can go ahead and assign the application role permission to any user who should be able to view and manage the service provider. For information on how to assign roles to a user, see Configuring Users.
Click here for details on how to configure inbound authentication
The inbound authenticator component of WSO2 Identity Server identifies and parses all the incoming authentication requests and builds the corresponding response. A given inbound authenticator has two parts:
- Request Processor
- Response Builder
For each protocol supported by WSO2 Identity Server, there should be an inbound authenticator. WSO2 Identity Server includes inbound authenticators for SAML 2.0, OpenID Connect, OAuth 2.0, Kerberos KDC, WS-Trust STS, and WS-Federation (passive). The responsibility of the SAML 2.0 request processor is to accept a SAML request from a service provider, validate the SAML request, and build a common object model that is understood by the authentication framework and handover the request to it. The responsibility of the SAML response builder is to accept a common object model from the authentication framework and build a SAML response out of it.
Both the request processors and the response builders are protocol-aware, while the authentication framework is not coupled to any protocol. For more information on the inbound authentication flow, see Architecture.
Let's learn how to configure inbound authentication for a service provider.
You can configure inbound authentication in following ways:
Configuring inbound authentication with SAML2 Web SSO
Click here to learn the instructions
To configure SAML2 Web SSO:
- Expand the SAML2 Web SSO Configuration and click Configure.
- Select one of the following modes:
Manual configuration
Select Manual Configuration and enter the required details as giveb below.
Field | Description | Sample value |
---|
Issuer | 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. | travelocity.com |
Service Provider Qualifier | This value is needed only if you have to configure multiple SAML SSO inbound authentication configurations for the same Issuer value. When a Service Provider Qualifier is defined here, it will be appended to the end of the Issuer value when registering the SAML SP in the Identity Server. For example, if you specify travelocity.com as the Issuer and sp1 as the Service Provider Qualifier, the configuration will be registered in IS as travelocity.com:urn:sp:qualifier:sp1 You can configure a number of SAML SPs with the same Issuer and different Service Provider Qualifiers. When a Service Provider Qualifier is defined, the issuer of the SAML SSO authentication request is the value specified as the Issuer in the configuration (ex : travelocity.com). The service provider qualifier value should be sent as a query parameter, spQualifier with the HTTP request in the following format.
https://{Hostname}:{Port}/samlsso?spQualifier={Service Provider Qualifier}
In Travelocity sample SP, this query parameter can be set by modifying SAML2.IdPURL value mentioned in the travelocity.com/WEB-INF/classes/travelocity.properties file as https://localhost:9443/samlsso?spQualifier=sp1. | sp1 |
Assertion Consumer URLs | Specify the Assertion Consumer URLs. 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. You can add multiple assertion consumer URLs for the service provider by entering the URL and clicking the Add button. | http://wso2is.local:8080/travelocity.com/home.jsp |
Default Assertion Consumer URL | Since there can be multiple assertion consumer URLs, you must define a Default Assertion Consumer URL in case you are unable to retrieve it from the authentication request. | http://wso2is.local:8080/travelocity.com/home.jsp |
NameID format | 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. | urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
|
Certificate Alias | 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. | wso2carbon |
Response Signing Algorithm | Specifies the ‘SignatureMethod’ algorithm to be used in the ‘Signature’ element in POST binding. The default value can be configured in the <IS_HOME>/repository/conf/identity.xml file, in the SSOService element with SAMLDefaultSigningAlgorithmURI tag. If it is not provided the default algorithm is RSASHA 1, at URI ‘http://www.w3.org/2000/09/xmldsig#rsasha1 ' . | http://www.w3.org/2000/09/xmldsig#rsasha1 |
Response Digest Algorithm | Specifies the ‘DigestMethod’ algorithm to be used in the ‘Signature’ element in POST binding. The default value can be configured in the <IS_HOME>/repository/conf/identity.xml file, in the SSOService element with SAMLDefaultDigestAlgorithmURI tag. If it is not provided the default algorithm is SHA 1, at URI ‘http://www.w3.org/2000/09/xmldsig#sha1 ’. | http://www.w3.org/2000/09/xmldsig#sha1 |
Assertion Encryption Algorithm | The algorithm that the SAML2 assertion is encrypted. The default value can be configured in the <IS_HOME>/repository/conf/identity.xml file, in the SSOService element with SAMLDefaultAssertionEncryptionAlgorithm URI tag. The default is http://www.w3.org/2001/04/xmlenc#aes256-cbc . | www.w3.org/2001/04/xmlenc#aes256-cbc |
Key Encryption Algorithm | The algorithm that the SAML2 key is encrypted. The default value can be configured in the <IS_HOME>/repository/conf/identity.xml file, in the SSOService element with SAMLDefaultKeyEncryptionAlgorithm URI tag. The default algorithm is http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p | www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p |
Enable Response Signing | Select Enable Response Signing to sign the SAML2 Responses returned after the authentication process. | Selected |
Enable Signature Validation in Authentication Requests and Logout Requests | 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. | Unselected |
Enable Assertion Encryption | Enable Assertion Encryption, if you wish to encrypt the assertion. | Unselected |
Enable Single Logout | 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 SLO Response URL and SLO Request URL for logging out. These URLs indicate where the request and response should go to. If you do not specify this URL, the identity provider uses the Assertion Consumer Service (ACS) URL. WSO2 Identity Server supports both SAML Back-Channel Logout and SAML Front-Channel Logout methods. By default, when you select Enable Single Logout the Back-Channel Logout is enabled. In order to enable SAML Front-Channel Logout, you can either select Front-Channel Logout (HTTP Redirect Binding) or Front-Channel Logout (HTTP POST Binding). | Selected |
Enable Attribute Profile | 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. | Unselected |
Enable Audience Restriction | Select Enable Audience Restriction to restrict the audience. You may add audience members using the Audience text box and clicking the Add button. | Unselected |
Enable Recipient Validation | Select this if you require validation from the recipient of the response. | Unselected |
Enable IdP Initiated SSO | 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. | Unselected |
Enable IdP Initiated SLO | Select the Enable IdP Initiated SLO checkbox to enable this functionality. You must specify the URL. | Unselected |
Enable Assertion Query Request Profile | Select the Enable Assertion Query Request Profile checkbox to query assertions that are persisted to the database when you login to the service provider application. For more information, see Querying SAML Assertions. | Unselected |
Enable SAML2 Artifact Binding | This is to define SAML2 artifact binding is enabled or not so that WSO2 Identity Server responds to each SAML SSO authentication request with an artifact. For more information, see Configuring SAML 2.0 Artifact Binding. | Unselected |
IdP Entity ID Alias | This value can override the value of Identity Provider Entity ID specified under SAML SSO Inbound Authentication configuration in Resident IdP. The Identity Provider Entity ID is used as the issuer of the SAML responses generated from IS. By default, all the SAML responses issued by IS will have the issuer value similar to the Identity Provider Entity ID in Resident IdP’s SAML SSO inbound authentication configuration. But if you want that value to be unique for your SAML SP configuration, you can specify the value here, so that the IdP Entity ID will be overridden with this IdP Entity ID Alias value. In Travelocity sample SP, this value can be set by modifying SAML2.IdPEntityId value mentioned in the travelocity.com/WEB-INF/classes/travelocity.properties file, so that it reflects the value of the IdP Entity ID Alias you define in the SAML SP configuration. | any valid URL/URI |
- Click Register.
This option allows you to provide the configuration data required for configuring SAML2, by uploading a metadata .xml file instead of having to manually enter the values. This enables faster entry of configuration data and allows the user to use the same metadata XML file for multiple instances of entity configuration.
- Select Metadata File Configuration.
- Click Choose File, and select the
.xml
file containing the metadata for the service provider SAML configuration. Click Upload.
Click here to view a sample of the metadata configuration file
<?xml version="1.0"?>
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" validUntil="2018-07-25T04:49:17Z" cacheDuration="PT604800S" entityID="travelocity.com">
<md:SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<md:KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>MIIC+jCCAmOgAwIBAgIJAParOnPwEkKjMA0GCSqGSIb3DQEBBQUAMIGKMQswCQYDVQQGEwJMSzEQMA4GA1UECBMHV2VzdGVybjEQMA4GA1UEBxMHQ29sb21ibzEWMBQGA1UEChMNU29mdHdhcmUgVmlldzERMA8GA1UECxMIVHJhaW5pbmcxLDAqBgNVBAMTI1NvZnR3YXJlIFZpZXcgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTEwMDcxMDA2MzMwM1oXDTI0MDMxODA2MzMwM1owdjELMAkGA1UEBhMCTEsxEDAOBgNVBAgTB1dlc3Rlcm4xEDAOBgNVBAcTB0NvbG9tYm8xFjAUBgNVBAoTDVNvZnR3YXJlIFZpZXcxETAPBgNVBAsTCFRyYWluaW5nMRgwFgYDVQQDEw9NeSBUZXN0IFNlcnZpY2UwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAN6bi0llFz+R+93nLLK5BmnuF48tbODpMBH7yGZ1/ESVUZoYm0GaPzg/ai3rX3r8BEr4TUrhhpKUKBpFxZvb2q+yREIeDEkDbHJuyVdS6hvtfa89WMJtwc7gwYYkY8AoVJ94gU54GP2B6XyNpgDTXPd0d3aH/Zt669xGAVoe/0iPAgMBAAGjezB5MAkGA1UdEwQCMAAwHQYDVR0OBBYEFNAwSamhuJSwXG0SJnWdIVF1PkW9MB8GA1UdIwQYMBaAFNa3YmhDO7BOwbUqmYU1k/U6p/UUMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTANBgkqhkiG9w0BAQUFAAOBgQBwwC5H+U0a+ps4tDCicHQfC2SXRTgF7PlAu2rLfmJ7jyoDX+lFEoWDUoE5qkTpMjsR1q/+2j9eTyi9xGj5sby4yFvmXf8jS5L6zMkkezSb6QAvtSHcLfefKeidq6NDBJ8DhWHi/zvC9YbT0KkCToEgvCTBpRZgdSFxTJcUksqoFA==</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</md:KeyDescriptor>
<md:KeyDescriptor use="encryption">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>MIIC+jCCAmOgAwIBAgIJAParOnPwEkKjMA0GCSqGSIb3DQEBBQUAMIGKMQswCQYDVQQGEwJMSzEQMA4GA1UECBMHV2VzdGVybjEQMA4GA1UEBxMHQ29sb21ibzEWMBQGA1UEChMNU29mdHdhcmUgVmlldzERMA8GA1UECxMIVHJhaW5pbmcxLDAqBgNVBAMTI1NvZnR3YXJlIFZpZXcgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTEwMDcxMDA2MzMwM1oXDTI0MDMxODA2MzMwM1owdjELMAkGA1UEBhMCTEsxEDAOBgNVBAgTB1dlc3Rlcm4xEDAOBgNVBAcTB0NvbG9tYm8xFjAUBgNVBAoTDVNvZnR3YXJlIFZpZXcxETAPBgNVBAsTCFRyYWluaW5nMRgwFgYDVQQDEw9NeSBUZXN0IFNlcnZpY2UwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAN6bi0llFz+R+93nLLK5BmnuF48tbODpMBH7yGZ1/ESVUZoYm0GaPzg/ai3rX3r8BEr4TUrhhpKUKBpFxZvb2q+yREIeDEkDbHJuyVdS6hvtfa89WMJtwc7gwYYkY8AoVJ94gU54GP2B6XyNpgDTXPd0d3aH/Zt669xGAVoe/0iPAgMBAAGjezB5MAkGA1UdEwQCMAAwHQYDVR0OBBYEFNAwSamhuJSwXG0SJnWdIVF1PkW9MB8GA1UdIwQYMBaAFNa3YmhDO7BOwbUqmYU1k/U6p/UUMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTANBgkqhkiG9w0BAQUFAAOBgQBwwC5H+U0a+ps4tDCicHQfC2SXRTgF7PlAu2rLfmJ7jyoDX+lFEoWDUoE5qkTpMjsR1q/+2j9eTyi9xGj5sby4yFvmXf8jS5L6zMkkezSb6QAvtSHcLfefKeidq6NDBJ8DhWHi/zvC9YbT0KkCToEgvCTBpRZgdSFxTJcUksqoFA==</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</md:KeyDescriptor>
<md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat>
<md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://localhost:8080/travelocity.com/home.jsp" index="1"/>
</md:SPSSODescriptor>
</md:EntityDescriptor>
URL configuration
Metadata for a service provider may be published in a well known location via a URI. This option allows you to provide the configuration data required for configuring SAML2, by providing a URI(Ex: "https://spconfigs.com/sample-sp.xml") instead of having to manually enter the values. This enables faster entry of configuration data and allows the user to use the same metadata XML file for multiple instances of entity configuration.
- Select URL Configuration and enter the URL containing the service provider metadata.
- Click Upload.
See SAML 2.0 Web SSO for more information on SAML2 single-sign-on and see the following topics for samples of configuring single-sign-on using SAML2.
See Using the SAML2 Toolkit for support on debugging issues with SAML2 configurations.
Configuring inbound authentication with OAuth/OpenID Connect
Click here to learn the instructions
OAuth 2.0 has three main phases. They are; requesting an Authorization Grant, exchanging the Authorization Grant for an Access Token and accessing the resources using this Access Token. OpenID Connect is another identity layer on top of OAuth 2.0. OAuth applications can get authentication event information over the IDToken and can get the extra claims of the authenticated user from the OpenID Connect UserInfo endpoint.
To enable OAuth support for your client application, you must first register your application. Follow the instructions below to add a new application.
Let's get started to configure the service provider you created!
- Expand the Inbound Authentication Configuration section and then expand OAuth/OpenID Connect Configuration. Click Configure.
Fill in the form that appears. For the Allowed Grant Types you can disable the ones you do not require or wish to block.
When filling out the New Application form, the following details should be taken into consideration.
Field | Notes |
---|
OAuth Version | 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 following grant types are used to generate the access token:- Code: Entering the username and password required at the service provider will result in a code being generated. This code can be used to obtain the access token. For more information on this grant type, see this Authorization Code specification.
- Implicit: This is similar to the code grant type, but instead of generating a code, this directly provides the access token. For more information on this grant type, see this Implicit Grant specification.
- Password: This authenticates the user using the password provided and the access token is provided. For more information on this grant type, see this Resource Owner Password Credentials Grant specification.
- 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. For more information on this grant type, see this Client Credentials specification.
- 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. For more information on this grant type, see this Refresh Token specification.
- SAML2: This uses SAML assertion to obtain the access token. For more information on this grant type, see this SAML2 Bearer specification.
- IWA-NTLM: This is similar to the password grant type, but it is specific to Microsoft Windows users.
- urn:ietf:params:oauth:grant-type:jwt-bearer: This is a custom grant type. It uses a JWT token to obtain the access token. For more information about this grant type, see this JWT specification.
|
Callback Url | This is the exact location in the service provider's application where an access token would be sent. This is a required field (if the grant type is anything other than 'Code' or 'Implicit') and it is 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.
|
PKCE Mandatory | Select this if you are using the Code grant type. PKCE is a recommended security measure used to mitigate a code interception attack. See Mitigating Authorization Code Interception Attacks for more information. |
Support PKCE 'Plain' Transform Algorithm | Select this if you are using PKCE. |
Allow Authentication without the client secret | This enables authenticating the client without the client secret . |
User Access Token Expiry Time, Application Access Token Expiry Time, Refresh Token Expiry Time, Id Token Expiry Time
| Set the validity period (in seconds) for User Access Token, Application Access Token, Refresh Token, and Id Token. |
Enable Audience Restriction | Select this to enable audience restrictions for OAuth applications. If necessary, you can add multiple audiences. To add an audience, specify a required Audience value and click Add. All audience values that you add would be available in the ID token generated for the corresponding application. |
Enable Request Object Signature Validation | This is to define whether to only accept signed request objects in an authorization rqeuest or not. For more information, see Enforcing Signature Validation for Request Objects. |
Enable ID Token Encryption | This is to define whether to ID token encryption should be enabled or not. For a tutorial on this, see Testing OIDC Encrypted ID Token with IS. |
Enable OIDC Back Channel Logout | This is to define whether OIDC back channel logout should be enabled or not. For more information, see /wiki/spaces/IS580/pages/41127070. |
Scope Validators | This is to define the scope validation mechanisms. For more information on XACML scope validation, see Validating the Scope of OAuth Access Tokens using XACML Policies. |
Token Issuer | Select either JWT or Default as the token issuer for the service provider. |
- Click Add. Note that
client key
and client secret
get generated.
- 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.
- Actions -
Edit: Click to edit the OAuth/OpenID Connect Configurations
Revoke: Click to revoke (deactivate) the OAuth application. This action revokes all tokens issued for this application. In order to activate the application, you have to regenerate the consumer secret.
Regenerate Secret: Click to regenerate the secret key of the OAuth application.
Delete: Click to delete the OAuth/OpenID Connect Configurations.
Configuring inbound authentication with WS-Federation
Click here to learn the instructions
To configure WS-Federation SSO:
Expand the Inbound Authentication Configuration followed by the WS-Federation (Passive) Configuration section and provide the following values.
Passive STS Realm - This should be an unique identifier for the web app. Provide the same realm name given to the web app you are configuring WS-Federation for.
Passive STS WReply URL - Provide the URL of the web app you are configuring WS-Federation for. This endpoint URL will handle the token response.
- Expand the Claim Configuration section and map the relevant claims. See Configuring Claims for a Service Provider for more information.
- Click Update to save changes.
Configuring inbound authentication with WS-Trest Security Token Service
Click here to learn the instructions
WSO2 Identity Server uses the security token service (STS) as the WS-Trust implementation. The STS is capable of issuing SAML 1.1 and 2.0 security tokens and has a SOAP/XML API for token issuance. This API can be secured with the UserNameToken
or with any other WS-Security mechanism as explained below.
Securing the Security Token Service
According to the Trust Brokering model defined in the WS-Trust specification, the users should authenticate themselves to the STS before obtaining a token. STS may use this authentication information when constructing the security token. For example, STS may populate the required claims based on the user name provided by the subject. Therefore, the STS service needs to be secured.
STS is configured under the Resident Identity Provider section of the WSO2 Identity Server Management Console.
To secure the Security Token Service:
On the Main tab, click Identity > Identity Providers > Resident.
The Resident Identity Provider page appears.
Enter the required values as given below.
Field | Description | Sample Value |
---|
Home Realm Identifier | This is the domain name of the identity provider. If you do not enter a value here, when an authentication request comes to WSO2 Identity Server, a user will be prompted to specify a domain. You can enter multiple identifiers as a comma-separated list. | localhost |
Idle Session Time Out | This is the duration in minutes for which an SSO session can be idle for. If WSO2 Identity Server does not receive any SSO authentication requests for the given duration, a session time out occurs. The default value is 15 . | 15 |
Remember Me Period | This is the duration in weeks for which WSO2 Identity Server should remember an SSO session given that the Remember Me option is selected in the WSO2 Identity Server login screen. The default value is 2 weeks. | 2
|
- Under the Inbound Authentication Configuration section, click Security Token Service Configuration > Apply Security Policy.
Select Yes in the Enable Security? drop down and select a pre-configured security scenario according to your requirements. For this tutorial, use UsernameToken under the Basic Scenarios section.
Click Next. The user domain and user group selection appears.
- Provide the required details as follows:
- Select ALL-USER-STORE-DOMAINS.
Select the role you created to grant permission to access secured service. In this example, the admin role is used. Next, click Finish.
- Click Finish.
- Click Ok on the confirmation dialog window that appears.
- Click Update to complete the process.
Now STS is configured and secured with a username and password. Only users with the Admin role can consume the service.
The next step is to add a service provider to consume the STS.
Adding a service provider for the STS client
Do the following steps if you are using a Holder of Key subject confirmation method. For more information, see Configuring STS for Obtaining Tokens with Holder-Of-Key Subject Confirmation.
- Under the Inbound Authenticatino Configuration section, click WS-Trust Security Token Service Configuration > Configure. The STS Configuration page appears.
Enter the required details as given below.
Field | Description | Sample Value |
---|
Endpoint Address |
Enter the trusted relying party's endpoint address, which is the endpoint address of the Security Token Service. For more information, see Broker Trust Relationship with WSO2 Identity Server. The endpoint must be used as the service URL to which the token gets delivered by the STS client. Then select the public certificate imported. Tokens issued are encrypted using the public certificate of the trusted relying party. Therefore, the consumer who obtains this token, to invoke the RP service, will not be able to see the token.
| https://localhost:9444/services/echo |
Certificate Alias | This is the alias of the certificate. | wso2carbon |
Click Update to save the changes made to the service provider.
Run the STS client after configuring the service provider. For instructions on trying out a sample STS client, see Running an STS Client.
See Single Sign-On for details on configuring single sign-on for service provider using inbound authentication. See the following topics for samples of configuring single sign-on:
Click here for details on how to configure local and outbound authentication
The responsibility of the local authenticators is to authenticate the user with locally available credentials. This can be either username/password or even IWA (Integrated Windows Authentication) or FIDO (Fast IDentity Online). Local authenticators are decoupled from the Inbound Authenticators. Once the initial request is handed over to the authentication framework from an inbound authenticator, the authentication framework talks to the service provider configuration component to find the set of local authenticators registered with the service provider corresponding to the current authentication request.
Once the local authentication is successfully completed, the local authenticator will notify the framework. The framework will now decide no more authentication is needed and hand over the control to the corresponding response builder of the inbound authenticator. See Architecture for more information on this.
You can configure the following for local and outbound authentication.
- Expand Local & Outbound Authentication Configuration.
- Assert identity using mapped local subject identifier: Select this to use the local subject identifier when asserting the identity.
- Always send back the authenticated list of identity providers: Select this to send back the list of identity providers that the current user is authenticated by.
- Use tenant domain in local subject identifier: Select this to append the tenant domain to the local subject identifier.
- Use user store domain in local subject identifier: Select this to append the user store domain that the user resides to the local subject identifier.
Use user store domain in roles: This is selected by default, and appends the userstore domain name to user roles. If you do not want to append the userstore domain name to user roles, clear the check box.
- Enable Authorization: This option enables you to engage authorization policies for the service provider. For more information, see Configuring Access Control Policy for a Service Provider.
- Select the Authentication Type you require from the available options. This is a required field.
- If you choose Local Authentication, you need to select the local authentication option from the dropdown list.
- If you choose Federated Authentication, you need to select the identity provider from the dropdown list.
- If you choose Advanced Configurations, you can configure additional authentication steps and additional authentication options.
- There are two types of multi-factor authentication that can be configured here.
- Multi-step authentication: Click Add Authentication Step. Clicking this again will enable you to create another authentication step. Once this is done you can configure a Local or Federated authenticator for the step by selecting one from the dropdown and clicking Add Authenticator.
- Multi-option authentication: Click Add Authenticator to add either a Local or Federated authenticator after selecting it from the dropdown. Adding more than one of these within a single step enables multi-option authentication.
- Select whether to Use subject identifier from this step, Use attributes from this step or both. In the case of multiple steps, you can have only one step to use subject identifier from this step and one to use attributes from this step.
For example lets say, We configure 1st step as Facebook and enable Use subject identifier from this step. Then configure Google for 2nd step and enable Use attributes from this step. Once authentication is complete subject id will be taken from the Facebook claims and Google claims will be used as users attributes. - Click Add Authenticator to add a Local Authenticator. You can choose the type of authenticator using the dropdown. Clicking Add Authenticator again will enable you to add a second local authenticator. Basic authentication allows you to authenticate users from the enterprise user store.
- Click Add Authenticator to add a Federated Authenticator. You can choose the type of authenticator using the dropdown. Clicking Add Authenticator again will enable you to add a second federated authenticator.
- Click the Update button. This will return you to the previous screen with your newly configured authentication steps.
- 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 Type | Details |
---|
Default | This is the default authenticator sequence for a configured service provider in the Identity Server. This sequence can be modified by updating following section in the <IS_HOME>/repository/conf/identity/application-authentication. xml file.
<Sequences>
<!-- Default Sequence. This is mandatory -->
<Sequence appId="default">
<Step order="1">
<Authenticator name="BasicAuthenticator"/>
</Step>
</Sequence>
</Sequences>
|
Local Authentication | In this case, Identity Server itself authenticate the user. There are three types of local authenticators OOTB in a fresh Identity Server pack. - The basic authenticator is used to authenticate the user using the credentials available in the Identity Server.
- IWA stands for Integrated Windows Authentication and involves automatically authenticating users using their Windows credentials.
- FIDO authenticator is a local authenticator that comes with the WSO2 Identity Server. This will handle FIDO authentication requests related key validation against stored keys, the public key, keyhandler, and the counter, attestation certificate of FIDO registered users.
|
Federated Authentication | In this case, Identity Server trust third-party Identity provider to perform the user authentication. These Identity providers use various protocols to transfer authentication/authorization related messages. Currently, the Identity Server only supports the following federated authenticators OOTB.- SAML2 Web SSO
- OAuth2/OpenID Connect
- WS-Federation (Passive)
- Facebook
- Microsoft (Hotmail, MSN, Live)
- Google
- SMS OTP
- Email OTP
- Twitter
- Yahoo
- IWA Kerberos
- Office365
|
Advanced Configuration | Advanced configurations enable you to add multiple options or 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 in a single step. However, in the case of local and/or federated authenticators, the authentication happens based on any one of the available authenticators. |
Request path authenticators
A request path authenticator will get executed only if the initial authentication request brings the applicable set of credentials with it. See Request Path Authentication for more details.
Click here for details on how to configure inbound provisioning
See Inbound Provisioning for more information on inbound provisioning. To configure inbound provisioning for the service provider, follow the steps below.
Do the following to configure inbound provisioning.
- Expand the Inbound Provisioning Configuration section and expand the SCIM/SOAP Configuration form.
- 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 might want to outbound provision users that self-register to your applications (service provider) to other entities, such as Google or Salesforce. This section guides you on how to configure outbound provisioning for a service provider.
Do the following to configure outbound provisioning.
- Expand the Outbound Provisioning Configuration. For this section to be configurable, you should already have added an identity provider and enabled an outbound provisioning connector (Google, Salesforce, SCIM, SPML, etc.).
Choose the identity provider you require from the drop-down and click
.
Click Update to save your changes.
- See Outbound Provisioning for more information on configuring user stores and service providers for outbound provisioning.
Click the Update button to update the details of the service provider.
Configuring a resident service provider
WSO2 Identity Server can mediate authentication requests between service providers and identity providers. At the same time, the Identity Server itself can act as a service provider and an identity provider. When it acts as a service provider it is known as the resident service provider.
The Identity Server mainly acts as a resident service provider while adding users to the system. You can enable provisioning configurations for the resident service provider. For example, if you try to add users to the system via the SCIM API ( You must use a privileged local account to invoke the API to authenticate with HTTP Basic Authentication ), the system will read the provisioning configurations from the resident service provider.
At the same time, if you want to configure outbound provisioning for any user management operation done via the management console, SOAP API or the SCIM API, you must configure outbound provisioning identity providers against the resident service provider. So, based on the outbound configuration, users added from the management console will also be provisioned to external systems like Salesforce and Google Apps.
Follow the instructions below to configure a resident service provider in the WSO2 Identity Server.
- Sign in. Enter your username and password to log on to the Management Console.
- Click Resident under the Service Providers on the Main tab.
- The Resident Service Provider page appears.
- Select the user store domain to provision users and groups for inbound authentication for SCIM or SOAP requests.
- For outbound provisioning configurations, select the identity provider from the dropdown list available and click the plus button to add this identity provider for provisioning. For an identity provider to appear on this list you have to add the identity provider in the Identity Server. The following are the names that would appear for each type of provisioning connector.
- Google provisioning connector - Google and googleapps
- Salesforce provisioning connector - salesforce.com and salesforce
- SCIM provisioning configuration - scim
- SPML provisioning configuration - spml
- Click Update.
Managing service providers
This topic provides instructions on how to manage service providers once they are created.
Viewing service providers
Follow the instructions below to view the list of service providers added in the WSO2 Identity Server.
- Sign in. Enter your username and password to log on to the Management Console.
- In the Main menu under the Identity section, click List under Service Providers. The list of service providers you added appears.
Editing service providers
Follow the instructions below to edit a service provider's details.
- Sign in. Enter your username and password to log on to the Management Console.
- In the Main menu under the Identity section, click List under Service Providers. The list of service providers you added appears.
- Locate the service provider you want to edit and click on the corresponding Edit link.
- You are directed to the edit screen. See here for details on the editable form.
Deleting service providers
Follow the instructions below to delete a service provider.
- Sign in. Enter your username and password to log on to the Management Console.
- In the Main menu under the Identity section, click List under Service Providers. The list of service providers you added appears.
- Locate the service provider you want to delete and click on the corresponding Delete link.
- Confirm your request in the WSO2 Carbon window. Click the Yes button.
See the following topics for information on configuring service providers using different specifications.
- See the Single Sign-On topic for details on how to configure a service provider for single sign-on using different specifications.
- See Identity Provisioning for information on configuring inbound and outbound provisioning with a service provider.
See the following topics to configure different applications as service providers in Identity Server.