Closed rozmarbeka closed 7 years ago
I also tried the attribute mapping this way:
:attribute_mapping => {
# How will we map attributes from SSO to redmine attributes
:login => 'extra.raw_info.username',
:firstname => 'extra.raw_info.username',
:lastname => 'extra.raw_info.username',
:mail => 'extra.raw_info.email',
:uid => 'extra.raw_info.email',
}
What was the problem? Did you find it out?
Yes, thanks. I was replacing the configs between version 3.0 and 2.0. At the beginning we started with version 2.5. And I filled out that, and copied that version :/
I'm facing with attribute mapping issue now, but it will be solved soon I think.
Nice job BTW!
Could you tell me eg. what do :login and extra.raw_info.username mean? Is the key a ruby variable name and the value coming from SSO server?
It found the email but complaining about missing identifier, firstname and lastname with this config:
:attribute_mapping => {
:login => 'extra.raw_info.username',
:firstname => 'extra.raw_info.firstname',
:lastname => 'extra.raw_info.lastname',
:mail => 'extra.raw_info.email',
}
I put every attribute into the SAML response (username, firstname, lastname, email).
I had to append :firstname, :lastname, :login attributes to redmine_omniauth_saml.rb line 83. to get user creation work. I think it should be work without that or is it normal?
def required_attribute_mapping
[ :mail, :firstname, :lastname, :login ]
end
Last PR brokes this functionality:
https://github.com/chrodriguez/redmine_omniauth_saml/commit/f7c17d6721ae143a46fff06f245ca5926e346a47
I'm going to revert it
Thanks for your contribution!
And what if someone's SSO just sending :mail and don't want to create users based on these values like me, just log in? They won't be able to login without these attributes. Or am I wrong?
This are requirements from User model: https://github.com/redmine/redmine/blob/master/app/models/user.rb#L108
I can't confirm mail is a requirement...
I'm talking about that what was the purpose of the PR you mentioned?
I got this error at runtime execution when I put the config file inside
<rails root>/config/initializers/saml.rb
The communication is OK between my SSO and Redmine instance but I have the following error when I got redirected to http://issues.bud01.atlasoft.lan/auth/saml. I can check the SAML respnse in Chrome's SAML plugin, it's ok but I'm not sure that my attribute mapping is correct.
I have the following in the production.log:
My config looks like as follows: