This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Configuring Inbound Authentication for a Service Provider
- Former user (Deleted)
- Former user (Deleted)
The responsibility of the inbound authenticator component is to identify and parse all the incoming authentication requests and then build the corresponding response. A given inbound authenticator has two parts:
- Request Processor
- Response Builder
For each protocol supported by the WSO2 Identity Server, there should be an inbound authenticator. The 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 then build a common object model 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. See Architecture for more information on the complete flow where inbound authenticators come into play.
You can configure the following for inbound authentication.
Removed Feature!
OpenID 2.0 has been removed from the base product in WSO2 Identity Server version 5.3.0 onwards as it is now an obsolete specification and has been superseded by OpenID Connect. Alternatively, we recommend that you use OpenID Connect.
- Expand the SAML2 Web SSO Configuration and click Configure.
- Select one of the following modes:
Metadata and URL configuration
When configuring a service provider (SP) or a federated identity provider (Federated IdP), the user is required to enter configuration data to facilitate exchanging authentication and authorization data between entities in a standard way. Apart from manual entering of configuration data, WSO2 IS allows you to upload configuration data using a metadata XML file or refer to a metadata XML file located in a predetermined URL. These two methods of uploading configuration data enable faster entry of configuration data because it allows the user to use the same metadata xml file for multiple instances of entity configuration. In addition to SAML metadata upload, WSO2 IS also supports SAML metadata download for the resident identity provider.
Manual configuration
- Select Manual Configuration and fill in the form that appears.
- Click Register.
The following points should be taken into consideration when filling the above New Service Provider form.
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 | To configure Service Provider Qualifier described below, apply the 5083 WUM update to WSO2 IS 5.7.0 using the WSO2 Update Manager (WUM). To deploy a WUM update into production, you need to have a paid subscription. If you do not have a paid subscription, you can use this feature with the next version of WSO2 Identity Server when it is released. For more information on updating WSO2 Identity Server using WUM, see Getting Started with WUM in the WSO2 Administration Guide. 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 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 | 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. Tip: In a service provider initiated single sign-on setup, the following needs to be considered.
In an identity provider initiated single sign-on setup, the following needs to be considered.
| 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. About NameID formats For SSO interactions, you can use the following types of NameID formats.
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 |
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. From WSO2 IS 5.5.0 onwards, the .pem certificate can be updated via the Service Provider screen in the management console UI using the Application Certificate field. If the certificate has been entered in the Application Certifiate field, the system will use the certificate given there and override the certificate alias field. However, if the Application Certificate field has been left blank, the certificate specified in Certificate Alias will be used. | 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 | 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 | 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. To configure SAML Back-Channel Logout and SAML Front-Channel Logout described below, apply the 4062 WUM update to WSO2 IS 5.7.0 using the WSO2 Update Manager (WUM). To deploy a WUM update into production, you need to have a paid subscription. If you do not have a paid subscription, you can use this feature with the next version of WSO2 Identity Server when it is released. For more information on updating WSO2 Identity Server using WUM, see Getting Started with WUM in the WSO2 Administration Guide. 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 |
IdP Entity ID Alias | To configure IdP Entity ID Alias described below, apply the 5083 WUM update to WSO2 IS 5.7.0 using the WSO2 Update Manager (WUM). To deploy a WUM update into production, you need to have a paid subscription. If you do not have a paid subscription, you can use this feature with the next version of WSO2 Identity Server when it is released. For more information on updating WSO2 Identity Server using WUM, see Getting Started with WUM in the WSO2 Administration Guide. 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 |
Metadata file configuration
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.
From WSO2 IS 5.5.0 onwards, the certificate can be added via the Service Providers screen in the management console UI using the Application Certificate field. This means that certificates can now be directly added along with the service provider instead of having to import the certificate to the keystore and referring to it using the Certificate Alias field.
Therefore, when uploading a metadata file, the Application Certificate field in the Service Providers screen will automatically display the certificate that is embedded in the metatdata file. You can update or edit the certificate by editing the content within the Application Certificate field and uploading the metadata file again will override the existing certificate.
Click here to view a sample of the metadata configuration fileService provider metadata 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.
Additional configurations
- Click here to expand for more information on signature algorithms.
The following table provides the list of signature algorithms available and their respective URI.
Signature algorithm name Signature algorithm URI DSA with SHA1 http://www.w3.org/2000/09/xmldsig#dsasha1 ECDSA with SHA1 http://www.w3.org/2001/04/xmldsigmore#ecdsasha1 ECDSA with SHA256 http://www.w3.org/2001/04/xmldsigmore#ecdsasha256 ECDSA with SHA384 http://www.w3.org/2001/04/xmldsigmore#ecdsasha384 ECDSA with SHA512 http://www.w3.org/2001/04/xmldsigmore#ecdsasha512 RSA with MD5 http://www.w3.org/2001/04/xmldsigmore#rsamd5 RSA with RIPEMD160 http://www.w3.org/2001/04/xmldsigmore#rsaripemd160 RSA with SHA1 http://www.w3.org/2000/09/xmldsig#rsasha1 RSA with SHA256 http://www.w3.org/2001/04/xmldsigmore#rsasha256 RSA with SHA384 http://www.w3.org/2001/04/xmldsigmore#rsasha384 RSA with SHA512 http://www.w3.org/2001/04/xmldsigmore#rsasha512 - Click here to expand for more information on digest algorithms.
The following table provides the list of digest algorithms available and their respective URI.
Digest algorithm name Digest algorithm URI MD5 http://www.w3.org/2001/04/xmldsigmore#md5 RIPEMD160 http://www.w3.org/2001/04/xmlenc#ripemd160 SHA1 http://www.w3.org/2000/09/xmldsig#sha1 SHA256 http://www.w3.org/2001/04/xmlenc#sha256 SHA384 http://www.w3.org/2001/04/xmldsigmore#sha384 SHA512 http://www.w3.org/2001/04/xmlenc#sha512 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.<SSOService> ... <UseAuthenticatedUserDomainCrypto>true<UseAuthenticatedUserDomainCrypto> </SSOService>
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.
- Configuring Single Sign-On
- Logging in to WSO2 Products via Identity Server
- Configuring SAML2 Single-Sign-On Across Different WSO2 Products
See Using the SAML2 Toolkit for support on debugging issues with SAML2 configurations.
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.
Note: The grant type highlighted below is a custom grant type. This will only appear on the UI if you have configured the JWT grant type. The value specified in the
<GrantTypeName>
property of theidentity.xml
file when creating the custom grant type is the value that will appear on the UI. For more information on writing a custom grant type, see Writing a Custom OAuth 2.0 Grant Type.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.
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.
Configure multiple callback URLs
From IS 5.2.0 onwards, regex-based consumer URLs are supported when defining the callback URL. This enables you to configure multiple callback URLs for one application by entering a regex pattern as the value for the callback URL field.
For example, if you have two service providers that use the same application, you can now define a regex pattern which will work for both callback URLs instead of having to configure two different applications for the two service providers. Assume the two callback URLs for your two service providers are as follows:To configure the callback URL to work for both of these URLs, set it using a regex pattern as follows:
regexp=(https://((myapp\.com)|(testapp:8000))(/callback))
You must have the prefix 'regexp=' before your regex pattern. To define a normal URL, you can specify the callback URL without this prefix.
You can also configure a regex pattern that contains dynamic values as seen below.
regexp=https://mchcon.clance.local\?id=(.*)
Allowed Grant Types - The following are the grant types that are used to get 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. SAML 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. Renew Refresh Token The refresh token is renewed when the refresh grant is used to get an access token. A new refresh token is issued with a new expiry time and the previous refresh token is made inactive and can no longer be used. If this element is not opted for, unless the refresh token has expired, the same refresh token is returned. 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 option will allow a public client to authenticate without a 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.
Before you add an audience, ensure that the following property is set to true in the
<IS_HOME>/repository/conf/identity/identity.xml
file.<EnableAudiences>true</EnableAudience>
Token Issuer Select either JWT or Default as the token issuer for the service provider.
Tip
- If you want to enable default token generation for a service provider, select Default as the Token Issuer. This is the default Token Issuer that is selected when you apply the WUM update.
When you enable default token generation, the hash value of the token is stored in the ACCESS_TOKEN_HASH column, and the plain text token is stored in the ACCESS_TOKEN column - If you want to enable JWT token generation for a service provider, select JWT as the Token Issuer.
When you enable JWT token generation, the hash value of the JWT is stored in the ACCESS_TOKEN_HASH column, and the full JWT is stored in the ACCESS_TOKEN column.
- If you want to enable default token generation for a service provider, select Default as the Token Issuer. This is the default Token Issuer that is selected when you apply the WUM update.
- 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.
- 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.
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/identity
directory and change the<TokenPersistenceProcessor>
property as follows:<TokenPersistenceProcessor>org.wso2.carbon.identity.oauth.tokenprocessor.EncryptionDecryptionPersistenceProcessor</TokenPersistenceProcessor>
After updating the configuration, make sure to restart the server for the changes to be applied on WSO2 IS.
See Configuring OpenID Connect Single Logout to configure single logout or session management with OpenID Connect.
See Delegated Access Control for more information on working with OAuth2/OpenIDConnect. See the following topics for samples of configuring delegated access control:
WSO2 Identity Server's passive security token service (Passive STS) is used as the WS-Federation implementation. The Passive STS is capable of issuing SAML 1.1 and 2.0 security tokens.
To request a SAML 2.0 security token, the Request Security Token (RST) should be sent to the passive STS endpoint with the TokenType 'SAMLV2.0' when sending the token request. If there is no RST specified, WSO2 Identity Server will issue a SAML 1.1 token by default.
Configuring passive STS
- See here for details on adding a service provider.
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.
Tip
If you want to configure an expiration time for the security token, you need to add the following configuration in the
<IS_HOME>/repository/conf/carbon.xml
file, under the<Server>
element:<STSTimeToLive>1800000</STSTimeToLive>
Here, the expiration time should be specified in milliseconds.
- 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.
Currently the signing algorithm used for passive STS by default is rsa-sha1
and the digest algorithm used is sha1
. To change the default algorithms, add the following configuration under the <security>
tag in the carbon.xml
file found in the <IS_HOME>/repository/conf
directory. The example given below sets the signing algorithm to rsa-sha256
and the digest algorithm to sha256.
<STSSignatureAlgorithm>http://www.w3.org/2001/04/xmldsig-more#rsa-sha256</STSSignatureAlgorithm> <STSDigestAlgorithm>http://www.w3.org/2001/04/xmlenc#sha256</STSDigestAlgorithm>
To configure this, apply the 3640 WUM update to WSO2 IS 5.7.0 using the WSO2 Update Manager (WUM). To deploy a WUM update into production, you need to have a paid subscription. If you do not have a paid subscription, you can use this feature with the next version of WSO2 Identity Server when it is released. For more information on updating WSO2 Identity Server using WUM, see Getting Started with WUM in the WSO2 Administration Guide.
- To test out WSO2 Identity Server's passive security token service using a sample, see Testing Identity Server's Passive STS.
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.
- Log in as an admin to access the management console.
- Configure the Resident Identity Provider. See here for more detailed information on how to do this.
- In the Resident Identity Provider page, expand the Inbound Authentication Configuration section along with the Security Token Service Configuration section.
- Click Apply Security Policy.
Select Yes in the Enable Security? dropdown and select a pre-configured security scenario according to your requirements. In this case, we will use UsernameToken under the Basic Scenarios section.
You can find further details about security policy scenarios from the view scenario option.
Click Next.
Next steps may vary as per the security scenario that you have chosen under point (5) above. Below is for UsernameToken scenario.
- Select ALL-USER-STORE-DOMAINS from the drop-down.
In the resulting page, select the role you created to grant permission to access secured service. In this example, the admin role is used. Next, click Finish.
The Select Domain drop-down lists many domains. The listed User Groups can vary depending on the domain selected.
- 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. See Configuring STS for Obtaining Tokens with Holder-Of-Key Subject Confirmation for more information.
The Subject confirmation methods define how a relying party (RP), which is the end service can make sure a particular security token issued by an STS is brought by the legitimate subject. If this is not done, a third party can take the token from the wire and send any request it wants including that token. The RP trusts that illegitimate party.
- See Configuring a Service Provider for details on adding a service provider.
- Expand the Inbound Authentication Configuration section and the WS-Trust Security Token Service Configuration section. Click Configure.
In the resulting screen, enter the trusted relying party's endpoint address that is the endpoint address of the Security Token Service. For more information, see Broker Trust Relationship with WSO2 Identity Server and upload the public certificate of the trusted relying party.
You need to add the certificate of the relying party to the truststore. For more information on how to create the certificate and add it to the truststore, see here.
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, won't be able to see the token.Click Update to save the changes made to the service provider.
Related TopicsRun the STS client after configuring the service provider. See Running an STS Client to try out a sample 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: