- Created by Former user, last modified by Former user on Jan 28, 2016
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 32 Next »
The responsibility of the inbound authenticators 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, 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.
- Expand the SAML2 Web SSO Configuration and click Configure.
- 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 |
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. You can add multiple assertion consumer URLs for the service provider by entering the URL and clicking the Add button. | http://localhost: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://localhost: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. | |
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 | 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 |
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. | Selected |
Enable Assertion Encryption | Enable Assertion Encryption, if you wish to encrypt the assertion. | Selected |
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. | 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. | Selected |
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. | Selected |
Enable Recipient Validation | Select this if you require validation from the recipient of the response. | Selected |
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. | Selected |
Enable IdP Initiated SLO | Select the Enable IdP Initiated SLO checkbox to enable this functionality. You must specify the URL. | Selected |
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
- How To: Login to WSO2 Products via Identity Server
- Configuring SAML2 Single-Sign-On Across Different WSO2 Products
See Working with the SAML2 Toolkit for support on debugging issues with SAML2 configurations.
To enable OAuth support for your client application, you must first register your application by providing an application name. For code and implicit grant types, you have to provide a callback URL. Follow the instructions below to add a new application.
- Expand the OAuth/OpenID Connect Configuration and 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.
- 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/identity
directory and change the<TokenPersistenceProcessor>
property as follows:<TokenPersistenceProcessor>org.wso2.carbon.identity.oauth.tokenprocessor.EncryptionDecryptionPersistenceProcessor</TokenPersistenceProcessor>
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.
See Delegated Access Control for more information on working with OAuth2/OpenIDConnect. See the following topics for samples of configuring delegated access control:
- Expand the OpenID Configuration.
- Enter the identifier for the OpenID Realm as specified in the form below. This identifier need to be specified as identification when the service provider reaches out to the Identity Server.
Microsoft Dynamics CRM supports claims based authentication using the WS-Federation (Passive) protocol. Typically, claims are configured with ADFS as the Service Provider to handle authentication requests with the claims provider. Optionally, CRM can use a custom Security Token Service (STS) in order to enable federated authentication. The WSO2 Identity Server provides a secure token service by default. In order to support using the Identity Server with CRM, a custom metadata file needs to be generated and it should be accessible to the CRM claims configuration wizard, which will give CRM the STS passive endpoint and private key for signing of claims. Microsoft Dynamics CRM can be setup with internal claims based authentication, or further secured for external claims based authentication as an Internet Facing Deployment (IFD). Using an Internet Facing Deployment changes the URL structure CRM uses to load organizations, and thus has an effect on the settings required in the Identity Server.
The following must be configured to log in to Microsoft Dynamics CRM using the WSO2 Identity Server.
Configuring user stores
Users need to be configured within the Identity Server in order to perform authentication. This can be done by manually adding users to the Identity Server or connecting directly to an LDAP server. The only requirements are that the user records represented in the Identity Server have a username field in the format of username@domain.com or DOMAIN\username in order to correctly log in to CRM, and that username field matches a username field within CRM.
Configuring the service provider
Within WSO2, a service provider needs to be created to represent the Microsoft Dynamics CRM server that requests for tokens. The only two items that must be setup within the service provider configuration are the inbound authentication WS-Federation (Passive) configuration, and the claims configurations. If CRM is also configured for IFD, a service provider needs to be created to represent each organization that requests for tokens due to how CRM handles the organization's URLs.
Within the service provider, in the inbound authentication section, a Passive STS realm and Wreply URL must be defined under the WS-Federation (Passive) Configuration area. This value should match the CRM server realm name and URL. Typically, the URL will be in the format https://servername.domain.com/
(for non-IFD) or https://orgname.domain.com/
(for IFD). For IFD servers, one server provider must be created for each organization, with each one having the specific organization's URL set as the Passive STS Realm in the Inbound WS-Federation authentication settings. Ensure that the trailing "/" is included, as CRM appends this by default to all its endpoints and the values must match exactly.
- Sign in. Enter your username and password to log on to the Management Console.
- Navigate to the Main menu to access the Identity menu. Click Add under Service Providers.
- Fill in the Service Provider Name and provide a brief Description of the service provider.
- Expand the Inbound Authentication Configuration section followed by the WS-Federation (Passive) Configuration section.
- Enter the same Passive STS Realm name as the one given to the CRM app, as explained above.
- Expand the Claim Configuration section. Claims must be configured in order to log the requester into CRM as the correct user. Microsoft Dynamics CRM expects two specific claims returned from the STS. They are as follows.
In order to retrieve these values from WSO2, map the local claim value to the CRM value. In the Subject Claim URI, select the
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name
claim. This example assumes that thehttp://wso2.org/claims/logonname
contains the username field and thehttps://wso2.claims/upn
contains aDOMAIN\username
orusername@domain.com
formatted field that matches up to a username that exists in the CRM organization that is being accessed. - Click Update.
Configure Microsoft Dynamics CRM
In order to authenticate with a security token service, CRM expects federation metadata that contains specific details about the service. It requires the certificate that the STS uses to sign the responses as well as the passive STS endpoint for the WSO2 server, in addition to the claims expected. A sample file can be found inside <IS_HOME>/repository/deployment/server/webapps/mex
directory. This file needs to be hosted somewhere accessible to the CRM server. For the purposes of testing this scenario, you can add it to the wwwroot folder for easy access.
Once the metadata XML is in place, and assuming all the certificates have been placed correctly on the servers if they differ between the Identity Server and CRM, claims based authentication can be enabled from the CRM deployment wizard. The federation metadata URL should point to the file that was created above.
On the next screen, select the certificate that is used to encrypt the data sent between the STS and CRM.
Continue through the wizard and apply the final settings. In this example, an IFD CRM environment is used, so IFD needs to be re-enabled at this point from within the CRM deployment manager. Then, perform an IIS reset on the CRM server. Claims based authentication and IFD should now be enabled, and if configured correctly, redirect the user to the WSO2 logon screen when the user navigates to https://<orgname>.crmdomain.com.
- To test out WSO2 Identity Server's passive security token service using a sample, see Testing Identity Server's Passive STS.
WSO2 Identity Server's security token service (STS) is used 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.
Configuring STS
STS is configured under the Resident Identity Provider section of the Identity Server Management Console. Use the following step to do the configurations.
- 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 UsernameToken under the Basic Scenarios section.
- Click Next.
- In the resulting page, select the admin checkbox and click Finish.
- Click Ok on the confirmation dialog window that appears and 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
- See here 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 Endpoint Address. This must be used as the service URL and the token is delivered by the STS client.
- Click Update to save the changes made to the service provider.
- After configuring the service provider, you need to run the STS client. 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:
- No labels