Skip to content

fix: support users and groups in distinct DN bases#195

Merged
HuiJun merged 1 commit intodevelopfrom
feature/194-ldap-base
Aug 9, 2022
Merged

fix: support users and groups in distinct DN bases#195
HuiJun merged 1 commit intodevelopfrom
feature/194-ldap-base

Conversation

@ivan-gomes
Copy link
Contributor

resolves #194

The important changes are:

  • use of userData.getDn() instead of userAttributesUsername + '=' + username to get the entire DN, e.g. if ldap.user.dn.pattern=uid={0},ou=users this will resolve to uid=billy,ou=users instead of just uid=billy
  • provide groupSearchBase for the group LDAP search

This change should be fully backwards compatible, i.e. should not require any configuration change for currently functioning deployments. It will add support for LDAP structures (currently incompatible) as described in #194 using a configuration like the following:

ldap.provider.base=dc=example,dc=com
ldap.provider.url=ldap://ldap.example.com
ldap.user.dn.pattern=uid={0},ou=users
ldap.group.search.base=ou=groups

@ivan-gomes ivan-gomes requested a review from HuiJun August 7, 2022 21:27
@ivan-gomes ivan-gomes changed the title fix: support users and groups in difference DN bases fix: support users and groups in different DN bases Aug 7, 2022
@ivan-gomes ivan-gomes changed the title fix: support users and groups in different DN bases fix: support users and groups in distinct DN bases Aug 7, 2022
Copy link
Collaborator

@HuiJun HuiJun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm an old man, and I like the faster performing 'for', but everything else seems good to me.

@HuiJun HuiJun merged commit 6930811 into develop Aug 9, 2022
@HuiJun HuiJun deleted the feature/194-ldap-base branch August 9, 2022 17:49
Sign up for free to 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.

LDAP - Issue with users and groups in different DN bases

2 participants