wiltonsr / ldapAuth

An open source Traefik Middleware that enables authentication via LDAP in a similar way to Traefik Enterprise
https://plugins.traefik.io/plugins/628c9eb7ffc0cd18356a979c/ldap-auth
Apache License 2.0
111 stars 10 forks source link

Username header does not get set on subsequent requests #57

Closed sseemayer closed 6 months ago

sseemayer commented 6 months ago

Thanks a lot for this super-useful plugin!

The ForwardUsername setting works fine for the first request passed through the ldapAuth middleware, but will not get forwarded for subsequent requests.

Steps to reproduce:

  1. Enable ForwardUsername in the middleware config
  2. Authenticate with a request that is behind the ldapAuth middleware. Using traefik/whoami as the secured service works great for troubleshooting
  3. Observe that the username header is set as expected.
  4. Refresh the page to re-send the request
  5. The username header is not set anymore.

I will contribute a PR fixing this issue in a moment.

sseemayer commented 6 months ago

56 would also resolve my issue, so I would be fine if that got merged instead of #58

wiltonsr commented 6 months ago

Available in v0.1.6.