[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
OpenLDAP ACL causing error code 49
- To: openldap-technical@openldap.org
- Subject: OpenLDAP ACL causing error code 49
- From: Matty <matty91@gmail.com>
- Date: Wed, 16 Nov 2016 12:38:01 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=DdcMtShXoLDH0/IUJL0dln0TI0vyxjIaoMjuNl2orYE=; b=ovVBpvqr6wkEkyfEzESjDU4RRFBbjG/iS3CNmg1fB7kjDhOc0L60Ri17/Zb0yDj1WN fVfXndDaZ/4gpcoplikvcR0sccwXLgNEY6aqU9m7Z+AkhecXUfVa+RCVq8MBuYYsZmuX MNgRHoDq0ADdVI7O+AmjbWUOQ6VfjgMvlnzkpGQYCgUX7ltpK4vkZUusbio5py30R/Mm Z8l60r+qM/jGpLl4muKK4o8mGaU+tZ7RADGaUd2YS9qtNkAn+XXh+Xjoy0FD0iFsgVaY Wgn0+ItsKHJm68WbQHQdvqo2a/Nu7IOPkDYBJHSKe1ilNHjpD4rwHifrqIjesS1RlZ1W eLhg==
I am testing some OpenLDAP ACLs and stumbled on a weird issue. My
configuration has the following ACL defined:
access to *
by users read
by peername.ip=1.2.3.4 read
by * none
When I run the following ldapsearch I get an "Invalid credentials (49)" error:
$ ldapsearch -b 'dc=foo,dc=com' -x -h ldap1 -W -D
'uid=bingo,ou=users,dc=foo,dc=com' '(objectClass=*)'
Enabling the ACL loglevel produces the following:
Nov 16 09:50:02 tulip slapd[17803]: conn=33003 op=0 BIND
dn="uid=bingo,ou=users,dc=foo,dc=com" method=128
Nov 16 09:50:02 tulip slapd[17803]: => acl_get: [2] attr userPassword
Nov 16 09:50:02 tulip slapd[17803]: => acl_mask: access to entry
"uid=bingo,ou=users,dc=foo,dc=com", attr "userPassword" requested
Nov 16 09:50:02 tulip slapd[17803]: => acl_mask: to value by "", (=0)
Nov 16 09:50:02 tulip slapd[17803]: <= check a_dn_pat: users
Nov 16 09:42:24 tulip slapd[17803]: <= check a_peername_path: 1.2.3.4
Nov 16 09:42:24 tulip slapd[17803]: <= check a_dn_pat: *
Nov 16 09:42:24 tulip slapd[17803]: <= acl_mask: [5] applying none(=0) (stop)
Nov 16 09:42:24 tulip slapd[17803]: <= acl_mask: [5] mask: none(=0)
Nov 16 09:42:24 tulip slapd[17803]: => slap_access_allowed: auth
access denied by none(=0)
Nov 16 09:42:24 tulip slapd[17803]: => access_allowed: no more rules
Does anyone happen to know why "acl_mask: to value by" shows ""
instead of the dn of the user passed to the "-D" option? Wireshark
shows the binddn and password being passed to the directory server so
the "" doesn't make a ton of sense. If I add the following ACL to
force anonymous users to auth the search completes without issue:
access to attrs=userPassword
by self write
by anonymous auth
by users none
There must be some subtle item I'm missing here.
Thanks,
- Ryan