Skip to content

Add optional group limit #57

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

Closed
wants to merge 7 commits into from
Closed

Conversation

colinleroy
Copy link

Hello,

I've been faced with a request at work where a domain had to be login-protected, and have used nginx-ldap-auth to be able to use our LDAP server.

Another request asked me to limit some of this domain's subdirectories to members of different departments.

This patch adds support for group limiting in nginx-ldap-auth. It uses a group fetch and checks the user's presence in the memberUid field of the LDAP group. I made this choice because some LDAP servers (including mine) badly support the memberOf overlay.

I hope it helps and you'll consider upstreaming that patch!

Colin

@vl-homutov
Copy link
Contributor

If you still want to proceed with this, please provide tests.
The testsuite is here: https://github.com/nginxinc/nginx-ldap-auth/tree/master/t
Also, a good example for the doc would be nice with
description of which case for group auth is covered.

@colinleroy
Copy link
Author

Hello, @vl-homutov
I'm very sorry for the delay, but other priorities came up at work.
I've pushed one more commit to allow for multiple groups limit, and two more commits to address the documentation and the test suite.

I hope this helps !

@Derioss
Copy link

Derioss commented Aug 29, 2022

Hi,
I have this script version on nginx server (more or less in production...)
And I'm very interested in closing this MR.
What do you need for ?

@colinleroy colinleroy closed this Jan 8, 2024
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.

4 participants