Wednesday, June 22, 2016

WSO2 IS 5.1.0, send session information as SAML claims

Leave a Comment

We are considering to send some session information in the SAML claims.

The session information would be something to received by the chosen (custom) authenticator, such as value of an HTTP header (X509 DN), extra information provided on the logon screen, etc ...

Currently (by default) all claims are read from the userstore (as mapped by the claim mapping).

The only way I currently found to pass the session information is to implement/overwrite the SAML2SSOManager implementation.

Is there any simpler way to pass some user attributes from the authenticator which will be handled as a claim by the default SAML2SSOManager implementation?

I see the federated authenticators use context.getSubject().getUserProperties() to pass remote claims to the SAML response. Is it a way? ( regardless I put any ClaimMapping into the userProperties and declare the claim as required, I am unable to get it out as SAML response claim)

Thank you in advance

1 Answers

Answers 1

Apparently the way to go is implementing a custom ClaimHandler as described http://pushpalankajaya.blogspot.be/2014/07/adding-custom-claims-to-saml-response.html

The local authenticator can set the claims as user properties (of the subject).

In this case extending the handleLocalClaims should be enough, not to mess with federated mapping (where federated authenticators use the subject userAttributes as well)

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment