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 filter authorization #106

Open
PeLbmaN opened this issue Oct 3, 2023 · 0 comments
Open

LDAP filter authorization #106

PeLbmaN opened this issue Oct 3, 2023 · 0 comments

Comments

@PeLbmaN
Copy link

PeLbmaN commented Oct 3, 2023

Hey, i have problem with filter of ldap authorization(MS AD). Can you check it and tell me what did i do wrong? Thank you.

location = /auth-proxy {
            internal;
            proxy_cache auth_cache;
            proxy_cache_valid 200 10m;
            proxy_cache_key "$http_authorization$cookie_nginxauth";
            proxy_pass_request_body off;
            proxy_set_header Content-Length "";
            proxy_pass http://localhost:8888;
            proxy_set_header X-Ldap-URL "ldap://ip_server";
            proxy_set_header X-Ldap-BaseDN "ou=Accounts,dc=test,dc=com";
            proxy_set_header X-Ldap-BindDN "username";
            proxy_set_header X-Ldap-BindPass "pass";
            #proxy_set_header X-Ldap-Template "(sAMAccountName=%(username)s)"; -> can login
            proxy_set_header X-Ldap-Template "(&(cn=%(username)s)(memberOf=cn=ELK_admin,ou=ELK,ou=Resources,ou=Groups,dc=test,dc=com))"; -> can`t login
        }
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

1 participant