I needed to use Active Directory LDAP servers to authenticate users for an application built using Chicago Boss, an Erlang-based web application framework. A quick search turned up the ELDAP repository. I did a quick test of ELDAP in a REPL session, and was unable to open a connection to the LDAP server if I specified the SSL option.
At this point, a big tip of the cap to my colleague Bradford Winfrey (@bradfordw) is in order, as he solved the problem I had encountered.
Bottom line, ELDAP did not start two applications that it required to be running in order to open a connection to the LDAP server using SSL. It did start the crypto application, but did not start public_key or ssl. Once this was corrected, I was able to both connect and bind to the LDAP server in a SSL-encrypted session using ELDAP.
Here’s what is required to have a working ELDAP SSL-enabled authentication system in Chicago Boss.
1. In your ChicagoBoss root folder (not the folder generated using ‘make app PROJECT=foo’), add ELDAP to the dependencies for Chicago Boss by adding this line to the deps section of your rebar.config file.
Now run the following:make deps; ./rebar compile
2. Make sure the file <ChicagoBoss Home>/boss.app.src contains crypto, public_key, and ssl in the applications section.
3. Modify <ChicagoBoss Home>/boss/boss.erl as follows:
4. Run `make` in <ChicagoBoss Home>
You should now be able to open and bind with the LDAP server over SLL.
{ 0 comments }