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
117 stars 10 forks source link

ldapurl must include port #18

Closed Mantrain closed 2 years ago

Mantrain commented 2 years ago

This works:

        - traefik.http.middlewares.ldap_auth.plugin.ldapAuth.url=ldap://myldapurl:13374242
        - traefik.http.middlewares.ldap_auth.plugin.ldapAuth.port=389

This does not:


        - traefik.http.middlewares.ldap_auth.plugin.ldapAuth.url=ldap://myldapurl
        - traefik.http.middlewares.ldap_auth.plugin.ldapAuth.port=389

It seems like the changes you made recently to https://github.com/wiltonsr/ldapAuth/blob/master/ldapauth.go will take the port number you specify in. url, discard it, and use the port you specify in .port

However, if you dont specify a port in the url, it retuns a blank host when trying to connect, and fails.

wiltonsr commented 2 years ago

Hi, @Mantrain

Thanks for the reports. I released v0.0.17 which fixed this error.