In June 1999, ColdFusion Developer’s Journal published my article, “Connecting ColdFusion to LDAP.” It’s in Volume 1, Issue 3, starting on page 46. The magazine gave it the subtitle “The nitty-gritty of a CF tag,” which is about right.
At the time I was the web site administrator at Plattsburgh State University in New York, and I’d been using ColdFusion for about a year. My applications had grown past single pages and needed some kind of authentication. I tried the <CF_LOGIN> tag, but it stored usernames and passwords in a table, and I didn’t like that.
Around the same time I was setting up Netscape’s Messaging Server, which could keep user information in a local file but preferred an LDAP directory. Using one directory for both mail and my ColdFusion applications made sense, so I put up Netscape’s Directory Server. I used ColdFusion to populate it and to keep it in sync with the Oracle database it was based on. I described learning the <CFLDAP> tag that way as a trial by fire.
The article is mostly what I learned doing that. It covers querying a directory, filter syntax (which I called “a bit tortured”), search scope, and adding, modifying and deleting entries. It also covers the places where a directory doesn’t behave like an SQL database: you could only sort on one field, there was no AS for renaming attributes, and ColdFusion couldn’t delete an individual attribute, so I set the values to null instead. There’s a section on access control lists, with the advice that if you know the data is there and you can’t see it, an ACL is probably why. I spent a lot of time learning about ACLs.
Some of it is a record of my own mistakes. I first used numbers for the uid in each entry’s distinguished name. After populating the directory I realized that was a bad idea and wrote a program to change them to people’s mainframe usernames. The sync program updated more than 6,000 records against the Oracle database and usually ran in a few minutes.
It was a real learning experience. LDAP wasn’t in wide use yet. Microsoft’s Active Directory didn’t ship until Windows 2000 came out in February 2000.
I found that the University at Buffalo had an LDAP server, and I studied their implementation closely, because examples of how to set up the organization hierarchy were few and far between. Netscape’s documentation was good on how to get the server running, and the Babs Jensen examples made for a good laugh, but it was woefully short on advice about org structure.
In the article I noted that Barbara “Babs” Jensen turned up in a lot of LDAP examples, and suggested readers who didn’t know who she was look up Martha Smith on the Internet Movie Database.
The point of all of it was to reduce the number of passwords people at the university had to remember while we added more services. Netscape’s Directory Server could synchronize Windows NT accounts, which made it a good fit, and I configured the ColdFusion server to authenticate against it.
The example entries in the article are for Rick Deckard in the Los Angeles Police Department directory. No one ever reached out to me about Rick Deckard. I was a little disappointed by that.
Read “Connecting ColdFusion to LDAP” at the Internet Archive