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

401 unauthorized #99

Open
vadimiv opened this issue Jul 5, 2022 · 1 comment
Open

401 unauthorized #99

vadimiv opened this issue Jul 5, 2022 · 1 comment

Comments

@vadimiv
Copy link

vadimiv commented Jul 5, 2022

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?
@tippexs
Copy link
Contributor

tippexs commented Jul 12, 2022

Can you share the log output please? It should print the result of your LDAP Query.

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

2 participants