Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to decrypt base64 SAML response ? #205

Open
anantaUM opened this issue Oct 1, 2021 · 1 comment
Open

How to decrypt base64 SAML response ? #205

anantaUM opened this issue Oct 1, 2021 · 1 comment

Comments

@anantaUM
Copy link

anantaUM commented Oct 1, 2021

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.

@adamstegman
Copy link
Collaborator

@anantaUM check out the saml_update_resource_hook configuration:

# Proc that is called if Devise.saml_update_user and/or Devise.saml_create_user are true.
# Receives the user object, saml_response and auth_value, and defines how the object's values are
# updated with regards to the SAML response. See saml_default_update_resource_hook for an example.
mattr_accessor :saml_update_resource_hook
@@saml_update_resource_hook = @@saml_default_update_resource_hook
. You can override that to add custom behavior when updating user attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants