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

LDAP auth from Docker help - Bad search filter #1105

Closed
nondeterminischtick opened this issue Nov 5, 2018 · 2 comments
Closed

LDAP auth from Docker help - Bad search filter #1105

nondeterminischtick opened this issue Nov 5, 2018 · 2 comments

Comments

@nondeterminischtick
Copy link

Suspect my env variable is wrong.

On attempting to log in using LDAP (Active Directory) the error is encountered:
ldap_search(): Search: Bad search filter

Bookstack has been deployed with solidnerd/docker-bookstack with the following env variables for LDAP:

AUTH_METHOD=ldap
LDAP_SERVER=ldap://ad.example.com:389
LDAP_BASE_DN=DC=example,DC=com
LDAP_DN=MyDN
LDAP_PASS=MyPass
LDAP_USER_FILTER="(&(sAMAccountName=\${user}))"
LDAP_VERSION=3

image

I suspect some issue with my ${user} syntax as that is what I had been struggling with up to this point.

The (&(sAMAccountName=\rcutts)) in the screenshot is where I have assumed my issue is but I am unsure how to get the ${user} to work inside docker.

I added the slash after reading this: solidnerd/docker-bookstack@6222693

I had previously tried double $ signs after reading this: #414

Which did not error but showed the invalid credentials message on the login screen.

Does anyone know what the syntax should be for this?

@nondeterminischtick
Copy link
Author

For the moment I am assuming that
LDAP_USER_FILTER=(&(sAMAccountName=$${user}))
is correct since it does not cause an exception.

Assuming for now the failure to login is some other boneheaded mistake on my part.

@nondeterminischtick
Copy link
Author

Think I've lost my marbles.

Changed to this and it is working:
LDAP_USER_FILTER=(&(sAMAccountName=${user}))

No idea why I was having trouble earlier. Maybe it was in quotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant