nginx-ldap-auth
nginx-ldap-auth copied to clipboard
401 unauthorized
Hi. If i use ldapsearch all requests are successful. But
curl --location --request GET 'http://localhost:8888' --header 'X-Ldap-URL: ldap://test.local:389' --header 'X-Ldap-BaseDN: DC=test,DC=local' --header 'X-Ldap-BindDN: nginx_ldap' --header 'X-Ldap-BindPass: ' --header 'X-Ldap-Template: (sAMAccountName=%(username)s)' -vv -u nginx_ldap:
returned 401 aunauthorized
- Connected to localhost (::1) port 8888 (#0)
- Server auth using Basic with user 'nginx_ldap'
GET / HTTP/1.1 Authorization: Basic bmdpbnhfbGRhcDoyd3N4QFdTWA== User-Agent: curl/7.29.0 Host: localhost:8888 Accept: / X-Ldap-URL: ldap://test.local:389 X-Ldap-BaseDN: DC=bft,DC=local X-Ldap-BindDN: nginx_ldap X-Ldap-BindPass: **** X-Ldap-Template: (sAMAccountName=%(username)s)
- HTTP 1.0, assume close after body < HTTP/1.0 401 Unauthorized < Server: BaseHTTP/0.3 Python/2.7.18 < Date: Tue, 05 Jul 2022 14:58:49 GMT
- Authentication problem. Ignoring this. < WWW-Authenticate: Basic realm="Restricted" < Cache-Control: no-cache <
- Closing connection 0 Can somebody help please?
Can you share the log output please? It should print the result of your LDAP Query.