SASL and OpenLDAP
The final section of this chapter explores how to replace the simple authentication used in your current directory server with SASL mechanisms. You will be using the GSSAPI mechanism for Kerberos 5 authentication (RFCs 1510, 2743, and 2478). The examples assume that a Kerberos realm named PLAINJOE.ORG has already been established and that a service principal named ldapadmin has been created. If you are unclear on the details of Kerberos 5, a good place to start would be Kerberos: A Network Authentication System, by Brian Tung (Addison-Wesley), or The Moron’s Guide to Kerberos, located at http://www.isi.edu/gost/brian/security/kerberos.html.
So far, the rootdn and rootpw
values used in slapd.conf have appeared similar
to:
rootdn "cn=Manager,dc=plainjoe,dc=org"
rootpw {SSHA}2aksIaicAvwc+DhCrXUFlhgWsbBJPLxyIn OpenLDAP 2.1, an
SASL
ID can be converted to a distinguished name and used for
authentication or authorization wherever a normal DN would be
appropriate. This includes operations such as defining the
updatedn used for replication or the
binddn used by a client in a search request.
There’s one important exception to this rule:
don’t use an SASL ID as the DN of an entry in the
directory. To summarize from Chapter 3, an SASL ID
converted to a DN appears as:
uid=name[,realm=realm],cn=mechanism,cn=auth
To illustrate how to use SASL as the authentication mechanism,
we’ll replace the rootdn in our
master server’s slapd.conf with
the Kerberos 5 principal ldapadmin. Following ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access