devise_saml_authenticatable icon indicating copy to clipboard operation
devise_saml_authenticatable copied to clipboard

How to decrypt base64 SAML response ?

Open anantaUM opened this issue 4 years ago • 1 comments
trafficstars

Hello Everyone,

I used this gem in our application to setup Shibboleth based authentication. The SAML response received from Identity provider is base64 encoded.

I have following setup in attribute-map.yml,

"urn:mace:dir:attribute-def:mail" : "email"

After successful login, I see that it is storing encoded value in the email column of users table. What do I need to do to decrypt the base64 encoded SAML response ?

Please advice.

Thank you for your time.

anantaUM avatar Oct 01 '21 01:10 anantaUM

@anantaUM check out the saml_update_resource_hook configuration: https://github.com/apokalipto/devise_saml_authenticatable/blob/37d457b394b63f360ac0f784ab35c5ceedf4e779/lib/devise_saml_authenticatable.rb#L117-L121. You can override that to add custom behavior when updating user attributes.

adamstegman avatar Oct 25 '21 21:10 adamstegman