ELDAP with Chicago Boss

by doug on January 20, 2012

in Erlang

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 }

Is it functional?

by doug on October 16, 2011

in Erlang

The Erlang programming language was my introduction to functional programming. What do you mean functional? That was the question I asked my friend who introduced me to the language. I started from almost zero with Erlang, as it is so extraordinarily different from every other language I’ve used.

Beginning with Erlang has been a wonderful, humbling, challenging, frustrating, rewarding experience of learning to think about code and problems in new ways, and finally reaching the point of being productive in the language.

So why this blog? It’s for you and me. For me, it serves as a notebook to capture lessons so I don’t start learning them all over from scratch when my leaky brain forgets. For you, hopefully there will be some nuggets here to help you on your own way to enjoying Erlang.

{ 0 comments }