omniauth-saml icon indicating copy to clipboard operation
omniauth-saml copied to clipboard

Question: is there a SAML property for "nickname" or "preferred username"

Open ThisIsMissEm opened this issue 1 year ago • 2 comments

In Mastodon, we support OIDC, CAS, and SAML for SSO; Both CAS and OIDC support a nickname property on user_info, but we don't have anything for SAML for this property.

I've tried researching this but do not know the SAML ecosystem well enough to find what I'm looking for, my understanding is that in our configuration, we'd need to add something like:

saml_options[:attribute_statements][:nickname] = [ENV['SAML_ATTRIBUTES_STATEMENTS_NICKNAME']] if ENV['SAML_ATTRIBUTES_STATEMENTS_NICKNAME']

As to get the nickname property in the user_info hash. I just don't know what that value would be for the ENV['SAML_ATTRIBUTES_STATEMENTS_NICKNAME']

This is related to this issue on Mastodon: https://github.com/mastodon/mastodon/issues/21296

ThisIsMissEm avatar Jul 30 '24 19:07 ThisIsMissEm