WSO2 Identity Server - Extension Points - Part 1 - SAML
This is the first post of a series of post to come, to serve as a catalog of extension points available within WSO2 Identity Server as of IS 5.1.0 version which is to be released soon. Most of them are available in 5.0.0 version as well. We have quite a lot of flexibility provided for the users to shape Identity Server to serve exactly what they require via these extension points.
There are 2 types of extensions available in WSO2 Identity Server as of now. Most of these require a restart of the server in order to be effective, but can be configured dynamically without a restart of the server. Few of the extensions like UI theming can be made without a server restart.
- Drop the extension developed as an OSGI bundle, followed by a server restart, configure it dynamically
- eg: custom user store managers
- Drop the extension developed as a Java component, configure in a configuration file, then restart the server. Configure it dynamically via the UI.
- eg: custom authenticators
Files Used for Configurations
- The configuration files for these extensions are located at <IS_HOME>/repository/conf folder.
- Most of the configurations specific to identity server resides identity/identity.xml within this folder.
- Configurations relevant to federation scenarios(authentication framework) resides at identity/application-authentication.xml file.
- Identity management related configurations resides at identity/identity-mgt.properties file.
- Entitlement(XACML) related configurations resides at identity/entitlement.properties file.
Note: Though the extension points are available to cater for variety of enterprise needs, this introduces a maintenance overhead in long term. If these are valid generic scenarios we will be merging these to product itself, otherwise these extensions needs to be maintained at major upgrades if there is any API change or improvements done at interfaces.
First our attention is for SAML based scenario as that is a widely used standard on Single Sign On.
Please find a list of available extension points related to this scenario below.
All the implementation using following extension point needs to be configured at <IS_HOME>/repository/conf/identity/identity.xml file under the element ‘SSOService’.
Custom SSO Signer
Custom SSO Signer
Usage:
When we want to change the way we sign/validate the SAML Response or Assertion. If this is just changing the algorithms default UI configurations are available without going for this extension.
Sample:
Interface:
org.wso2.carbon.identity.sso.saml.builders.signature.SSOSigner
Default Implementation:
org.wso2.carbon.identity.sso.saml.builders.signature.DefaultSSOSigner
Custom SSO encryption
Custom SSO encryption
Usage:
When we want to change the way we encrypt the SAML assertion in local
Interface:
org.wso2.carbon.identity.sso.saml.builders.encryption.SSOEncrypter
Default Implementation:
org.wso2.carbon.identity.sso.saml.builders.encryption.DefaultSSOEncrypter
SAMLAssertionBuilder
SAMLAssertionBuilder
Usage:
This extension point can control how the SAML assertion it built. Intend use of the extension point is put the given inputs in the SAML assertion format as preferred. This extension point gives full control over what is there in SAML assertion.
Interface:
org.wso2.carbon.identity.sso.saml.builders.assertion.SAMLAssertionBuilder
Default Implementation:
org.wso2.carbon.identity.sso.saml.builders.assertion.DefaultSAMLAssertionBuilder
SAML2HTTPRedirectSignatureValidator
SAML2HTTPRedirectSignatureValidator
Usage:
Can be used to differentiate(deflating, encoding etc.) on how the signature is validated at SAML HTTP redirect binding.
Interface:
org.wso2.carbon.identity.sso.saml.validators.SAML2HTTPRedirectSignatureValidator
Default Implementation:
org.wso2.carbon.identity.sso.saml.validators.SAML2HTTPRedirectDeflateSignatureValidator
ResponseBuilder
ResponseBuilder
Usage:
This extension point provides the full control over the SAML Responses built to sent over to replyingparties
Interface:
org.wso2.carbon.identity.sso.saml.builders.ResponseBuilder
Default Implementation:
org.wso2.carbon.identity.sso.saml.builders.DefaultResponseBuilder
org.wso2.carbon.identity.sso.saml.builders.ErrorResponseBuilder
If there are any other use cases or samples you have found useful around WSO2 Identity Server SAML implementation, you are most welcome to add them here, for the benefit of all. Thanks!
The second post is available at OAuth - Extension Points Part 2 - WSO2 Identity Server on the extension points in WSO2 Identity Server related to OAuth2.0.
The second post is available at OAuth - Extension Points Part 2 - WSO2 Identity Server on the extension points in WSO2 Identity Server related to OAuth2.0.