Allow SAML attributes to be manually defined via mapping
It would be best if we could allow SAML attributes to be manually defined. For example, a user's email address may not be a user's username. We do have the ability to specify a user's username, but in doing so Rocket.Chat uses that username as an email address too, which isn't necessarily correct. Instead it would be best if we could manually define what SAML attribute email should pull from, as well as the user's name. I'm glad to provide more details and I will review if I can contribute a fix to this but may need other assistance.
Rocket.Chat Version: 0.51.0 Running Instances: 1 DB Replicaset OpLog: Disabled Node Version: 4.7.1
+1 Yes PLEASE !!! Something like attribute mapping in LDAP configuration would be great. And see #6317 to change the nameid-format.
+10 Must Have
This is the blocker for integration with ADFS
ANy news on this issue ?
It's a must have
I still modify my SAML code, to not use the email address as username or "guess" from the email address to a username, which is crazy.
I also came across this problem. Rocket.Chat 1.0.2 expects the attributes in the fields cn, email and username. The first two is no problem and they map 1:1 from the LDAP in my IdP. But username is not available there and the appropriate LDAP attribute is uid.
I'd like to define a mapping similar to the Rocket.Chat LDAP configuration, see the configuration for LDAP_Sync_User_Data_FieldMap and LDAP_Username_Field: "uid".
When SAML is activated then without allowing SAML to create the username on it's own, the user is asked to define the username on his own. When the username then differs from the uid, only the SAML login is possible and no LDAP login. On LDAP login with the orginal username yields Error: Email already exists.. Using the newly created username during first SAML login results in LDAPHandler ➔ error Error: User not Found.
Having the ability to define the mapping from the SAML attributes received to the attributes used in Rocket.Chat would avoid this confusing manual mapping.