apisix icon indicating copy to clipboard operation
apisix copied to clipboard

ldap-auth Web browser request 401

Open zh9980 opened this issue 1 year ago • 4 comments

Current Behavior

Web browser response message: "Invalid authorization in request"

Expected Behavior

No response

Error Logs

2024/04/15 08:13:45 [warn] 52#52: *21026517 [lua] ldap-auth.lua:137: phase_func(): ldap-auth failed: Error: The supplied credential is invalid. 2024/04/15 08:13:45 [warn] 52#52: *21026517 [lua] plugin.lua:1153: run_plugin(): ldap-auth exits with http status code 401, client:

Steps to Reproduce

1.Run APISIX via the Docker image 2.Create a Route with the ingress controller

Environment

apisix:3.7.0-debian

zh9980 avatar Apr 15 '24 08:04 zh9980

did you trying clear browser's cookies and try re-running the steps?

nitishfy avatar Apr 15 '24 17:04 nitishfy

Please provide a reproduced steps in details, so we can try to reproduce it.

juzhiyuan avatar Apr 15 '24 23:04 juzhiyuan

did you trying clear browser's cookies and try re-running the steps?

Cleared browser cache, still 401

zh9980 avatar Apr 16 '24 05:04 zh9980

Please provide a reproduced steps in details, so we can try to reproduce it.

fist step: add Consumer { "username": "dashboard", "plugins": { "ldap-auth": { "user_dn": "cn=xxxx,ou=users,dc=yyyy,dc=com" } } }

second step: Then the plugin can be enabled in the specified route

- name: ldap-auth
  enable: true
  config:
    base_dn: ou=users,dc=yyyy,dc=com
    ldap_uri: IP:389
    uid: cn

zh9980 avatar Apr 16 '24 05:04 zh9980