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

How to use complex query in X-Ldap-Template? #16

Closed
strannick-ru opened this issue Dec 12, 2016 · 3 comments
Closed

How to use complex query in X-Ldap-Template? #16

strannick-ru opened this issue Dec 12, 2016 · 3 comments

Comments

@strannick-ru
Copy link

Hello!

I need to check username and group of user.
Try to use this:
proxy_set_header X-Ldap-Template "(&(SAMAccountName=%(username))(memberof=CN=MyGroup,OU=Groups,DC=example,DC=local))"";
but it not works.

How write my query right way?

@DerfOh
Copy link

DerfOh commented Jan 25, 2017


Actually upon further research it appears that you can set an undocumented property called "auth_ldap_require group" within your configuration file.

See: [This Example](https://github.com/romicaraicu/nginx-ldap/blob/master/nginx-auth-ldap/example.conf#L30)
Also see: [This blog post](http://www.allgoodbits.org/articles/view/29)

I haven't tried it out on my configuration yet but it seems to be a step in the right direction for establishing access control per endpoint.

Hope this helps.

@ghost
Copy link

ghost commented May 17, 2017

Perhaps you forgot "s" after %(username), it should be "%(username)s".

@vl-homutov
Copy link
Contributor

Please do not create issues just to discuss related topics.

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

No branches or pull requests

3 participants