Skip to content

Conversation

@jatoben
Copy link
Contributor

Active Directory is case-insensitive but case-preserving for most attributes, including DNs.

When binding, the DN will be returned in the entry with the same case as you originally provided, regardless of how the DN is actually stored. But because the Active Directory group membership validator uses a case-sensitive comparison, it excludes the user from groups they should belong to:

domain.user?('user1').dn=>"CN=User 1,CN=Users,DC=example,DC=com"entry=strategy.domain('cn=user 1,cn=users,dc=example,dc=com').bindentry.dn=>"cn=user 1,cn=users,dc=example,dc=com"groups=domain.groups(['all-users'])groups.first.member=>["CN=User 1,CN=Users,DC=example,DC=com"]validator=strategy.membership_validator.new(strategy,groups)validator.perform(entry)=>false

This PR makes the AD membership validator case-insensitive when comparing DNs.

/cc @github/enterprise-support @github/ldap @mtodd@shayfrendt

@mtodd
Copy link
Member

👍 diff looks good. Will get this merged in this week.

@shayfrendt
Copy link

Yup, looks good to me as well. 🚀

mtodd added a commit that referenced this pull request May 14, 2015
Compare AD DNs case-insensitively when checking group membership
@mtoddmtodd merged commit 157fcfa into masterMay 14, 2015
@mtoddmtodd deleted the case-insensitive-dn-compare branch May 14, 2015 18:31
@mtoddmtodd mentioned this pull request May 14, 2015
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@jatoben@mtodd@shayfrendt