haraka / haraka-plugin-ldap

Developing LDAP plugins for Haraka
https://www.npmjs.com/package/haraka-plugin-ldap
MIT License
1 stars 4 forks source link

haraka-plugin-ldap authn feature broken after upgrading to v3.0 #9

Closed pvagner closed 6 months ago

pvagner commented 1 year ago

Describe the bug

I need to revisit this again, I just would like to keep a note authn feature of haraka-plugin-ldap is no longer working when updating to haraka 3.0.

msimerson commented 1 year ago

Have you tested since I published v1.1.0?

pvagner commented 1 year ago

I can't directly update to v 1.1.0. The ldap plugin is always connecting to TLS listener on localhost no matter what ldap url I put into the ini file, so I need to diagnose my config and continue with this. I am definatelly interested in getting this to work, so I'll be able to add more details later.

pvagner commented 6 months ago

Hello, Finally I have managed to upgrade my haraka setup to the latest available versions including haraka it-self and this plugin as well. It turned out to be my issue. There is an example config/ldap.ini shipped with this plugin. If the plugin is installed by using npm values from this config file as shipped with the plugin are taken as a base and my config loaded from the directory pointed to by the -c flag to haraka is added on the top of that base config. The base config includes lines like this:

server[] = ldap://localhost:389
server[] = ldaps://localhost:636

Thus these servers are always added into the LDAP pool and I haven't found a way on how to override it other than removing this file or commenting out the corresponding lines.

All is working fine for me with this kind of setup.

Huge thanks

msimerson commented 6 months ago

Ohhhh. Good sleuthing. That's kind of an issue for the config loader, and a tricky one for our "config overrides" model. Probably the right thing to do is comment out the localhost entries in the default file.