elastic/elasticsearch

Username letter case for role mapping

Open

#48,120 opened on Oct 16, 2019

View on GitHub
 (8 comments) (3 reactions) (0 assignees)Java (76,700 stars) (25,882 forks)batch import
:Security/Authentication>bugTeam:Securityhelp wanted

Description

Role mapping IS letter case dependent if the rule to map roles looks at the username field. If the rule looks at the dn or groups fields, then it IS NOT letter case dependent. What this is contingent upon is the datatype of the field (DistinguishedName for dn and groups, and String for username).

Most of the time this works flawlessly, but in the case of LDAP and AD realms, the username, although of type String, is used as part of a DN during a bind operation, during authentication. In this situation the letter casing of the username is not important during authentication but it is still relevant during role mapping.

Given that the username, of type String, is letter case agnostic for certain realms during authentication, should the role mapping process also be agnostic of letter cases when dealing with such users in such realms? I think it should (hence labeling it a bug), but first I think we must make realms express if they account or not for username letter casing.

Contributor guide