Beyond PSD2 for a Better Open Banking Expereince

PSD2 is acting as a catalyst in the digital transformation happening in the Banking industry. While meeting the compliance requirements of PSD2, financial institutes are excited to make use of the new business models and opportunities opened by this laid foundation. More the customers and partners we can reach, more the business activities and more the revenue. Making the banking functions more accessible and reactive will be a key enabler to provide a seamless experience to these parties, including internal banking staff whom directly affects the business efficiency.
IAM plays a critical role in improving business accessibility without compromising the system boundaries. PSD2 mandates strong customer authentication(SCA), setting the bar high for user authenticity, while keeping few exemptions, not to bother payment services user(PSU) with SCA for every little transactions. While adhering to this policy will make an institute PSD2 complaint, if they can react fast to the fraud rates…

WSO2 Identity Server - Extension Points - Part 2 - OAuth

OAuth2 is widely used in the enterprise today for authorization aspects of APIs. This is the second post on the extension points available in WSO2 Identity Server after WSO2 Identity Server - Extension Points - Part 1 - SAML

All the implementation using following extension point needs to be configured at <IS_HOME>/repository/conf/identity/identity.xml file under the element OAuth.

1. Custom OAuth grant handler


When we need to support an OAuth flow that is different from standard grant types. Validates the grant, scopes, and access delegation.




2. Client Auth Handler


When the client credential authentication needs to be customized. By default we validate the client id and secret.



3. OAuthCallbackHandler

An extension point provided to verify whether the authenticated user is the rightful owner of the resource. There can be multiple active OAuthCallbackHandler implementations at a given time. There are registered through the identity.xml. In run-time, each and every authorization callback handler is invoked to see whether it can handle the given callback. Then the callback with the highest priority will be chosen. After handling the callback, it can set whether the given callback is authorized or not.



Abstract Class / Default Implementation:


4. TokenPersistenceProcessor

Implementations are used to process keys and secrets just before storing them in the database. E.g. to encrypt tokens before storing them in the database. Implementations of this interface can be configured through the identity.xml.



Abstract Class / Default Implementation:

  • org.wso2.carbon.identity.oauth.tokenprocessor.EncryptionDecryptionPersistenceProcessor
  • org.wso2.carbon.identity.oauth.tokenprocessor.PlainTextPersistenceProcessor

5. CustomClaimsCallbackHandler

This is an extension point provided to include any claims that need to go into the id_token in addition to the standard OIDC mandatory claims and user claims retrieved by WSO2 Identity Server.

An example would be add a tenant specific claim that is retrieved from an external API/Source could be included in an id_token using this extensions point. This extension point can also be used to set claims to the id_token without having to configure requested claims / oidc scopes using the management console.



Abstract Class / Default Implementation:


6. UserInfoAccessTokenValidator

Validates the access token and returns the token info. Default behavior is validating the access token with WSO2 IS token validation OSGI service(Scope is also checked to have openid scope). If this needs to be modified this can be used.



Default Implementation:


7. UserInfoClaimRetriever

Default behavior is creating claim URI and claim value pairs according to the claim mappings received. Any modifications to this default behavior can be done here.



Default Implementation:


8. UserInfoRequestValidator

Default behavior is validating the schema and authorization header according to the specification( Any further additional validations or modification to this validation on user info request can be done using this extension.


Default Implementation:


9. UserInfoResponseBuilder

Creates the UserInfoResponse. By default the response can be a JSON or a JWT. When a different format is required this extension can be used to support it.

Default Implementations:

  • org.wso2.carbon.identity.oauth.endpoint.user.impl.UserInfoJSONResponseBuilder
  • org.wso2.carbon.identity.oauth.endpoint.user.impl.UserInfoJWTResponse

10. AuthorizationContextTokenGenerator

Generates the token relevant to the authorization context. By default JWT token generation is supported with the following properties encoded to each authenticated API request:
  • subscriber, applicationName, apiContext, version, tier, and endUserName
  • Additional properties can be encoded by engaging the below extension.
  • The JWT header and body are base64 encoded separately and concatenated with a dot.
  • Finally the token is signed using SHA256 with RSA algorithm.

Any deviations can be made via this extension and configured in identity.xml

Default Implementations:


11. ClaimsRetriever

The default implementation class of this ClaimsRetriever reads user claim values from the default carbon user store. The user claims are encoded to the token in the natural order of the claimURIs by the previous token generator. To engage this class, its fully qualified class name should be mentioned under identity.xml -> OAuth -> TokenGeneration -> ClaimsRetrieverImplClass

Any deviation can be done using this extension.

Default Implementations:


12. ResponseTypeHandler

This is intended to validate access delegation and oauth scope validation. Then issue codes or tokens. In this flow needs to be customized this extension can be used. 



13. OAuth2TokenValidator

This when a token is sent back for validation purposes to validate on scopes, validity of access token and access delegation.




Popular posts from this blog

Signing SOAP Messages - Generation of Enveloped XML Signatures

How to send an HTML email in Java (Using Google SMTP Server)

How to convert WSDL to Java