Hi all,
I've written an LDAP module for the new external authentication goodness coming in 0.10.4.
https://github.com/KrisSaxton/salt-ldap (auth/ldap.py)
I've blogged about how it works here:
http://www.automationlogic.com/archives/427
It uses the same approach that I've seen with most LDAP authentication stuff where an initial search for user dn is performed and then an attempt to bind to the LDAP directory as that dn and with the user-supplied password is attempted.
Thanks to Thomas for help debugging some weirdness around token creation.
This *should* work with Active Directory but I've only tested it against openLDAP. If anyone fancies trying it out against AD, I'd love to hear from you.
I deliberately avoided using the existing LDAP salt module as I didn't want anyone to be able to circumvent the module by dropping in a custom ldap salt module (e.g. in _modules or some modules directory specified in the master config) - basic tests showed that this was quite easy to do.
I've never done anything security related, so I'd appreciate a more experienced eye looking this over for holes.
Assuming it's OK, do you want this is salt-contrib or salt proper?
I'll probably do an LDAP master_tops next and this will signal the end of my LDAP fetish : )
Best,
Kris
--
Kris Saxton
e:
kr...@automationlogic.com
t: @KrisSaxton