Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind before getting groups of user #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bk2204
Copy link

@bk2204 bk2204 commented Dec 3, 2018

In some cases, we will not want to authenticate a user, only get their groups, such as when performing access control for a user authenticated elsewhere. In such a case, we will not have bound the connection to the LDAP server using the read-only user, so if the LDAP server does not allow unauthenticated access, our GetGroupsOfUser call will fail.

Ensure we bind using the read-only user, if one is provided, before trying to fetch the user's groups.

In some cases, we will not want to authenticate a user, only get their
groups, such as when performing access control for a user authenticated
elsewhere.  In such a case, we will not have bound the connection to the
LDAP server using the read-only user, so if the LDAP server does not
allow unauthenticated access, our GetGroupsOfUser call will fail.

Ensure we bind using the read-only user, if one is provided, before
trying to fetch the user's groups.
Joffcom added a commit to Joffcom/go-ldap-client that referenced this pull request Jan 21, 2019
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.

1 participant