chrodriguez / redmine_omniauth_saml

Plugins that adds SAML authentication support for "Redmine"
GNU General Public License v2.0
38 stars 57 forks source link

Azure AD Config #33

Open mnash04 opened 7 years ago

mnash04 commented 7 years ago

Anyone have a working saml-initializers.rb config for azure AD?

So far just getting this with the default config:
" Invalid user or password. You may want to close SSO session before trying an other username. "

Suspect I just have to pull and map the right attributes but I'm not sure. Current SAML token attributes are: givenname, surname, emailaddress, name

nplatonov81 commented 6 years ago

It is possible, but changes in code required. Token attribute names come from Azure in form of URI. But redmine_omniauth_saml.rb at line 67 splits config line by dots and break this URI if supplied.

So, you need to change split symbol in code above to something, forbidden in URI, e.g. space (' '): `h[symbol] = key.split(' ')

`After that you must rewrite config: :login => 'extra raw_info http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name', :mail => 'extra raw_info http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name', :firstname => 'extra raw_info http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname', :lastname => 'extra raw_info http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'

And it will work.

ioiste commented 4 years ago

@nplatonov81 thank you, that was what I needed!