[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Storing SASL secrets in the directory

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Andrew Findlay

> Following hyc's message of 7th May, I am trying to get in-directory
> storage of SASL secrets working. The environment is:

(The above-referenced email is on the -devel list:
http://www.openldap.org/lists/openldap-devel/200205/msg00043.html )
> Basic SASL operation using sasldb works OK, as does plaintext
> authentication without SASL. Mapping from SASL IDs to DNs is set up
> using the LDAP URL method.
> Now, trying to authenticate using SASL to an entry in the database
> that has a plaintext userPassword, I have added the config file
> /usr/lib/sasl2/slapd.conf :
> 	# SASL2 config file for slapd
> 	# Tell slapd to use itself for secret storage
> 	auxprop_plugin: slapd
> This prevents sasldb users from authenticating so I know it has been
> read! However, I cannot make it authenticate against secrets in the
> directory. Logs do not show anything much of use - I do not even see
> the search that converts SASL IDs to DNs.
> A config example would be much appreciated.

Using this rule
sasl-regexp "uid=(.*),cn=digest-md5,cn=auth" "ldap:///o=foo,c=us??sub?cn=$1";

and assuming a BDB database with suffix o=foo,c=us exists, and assuming
this entry exists:

dn: cn=hyc,o=foo,c=us
objectclass: person
cn: hyc
sn: hyc
userpassword: secret

I have no trouble binding to this slapd:
  ldapsearch -Y DIGEST-MD5 -b o=foo,c=us
  SASL/DIGEST-MD5 authentication started
  Please enter your password:
  SASL username: hyc
  SASL SSF: 128
  SASL installing layers

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support