I see what the problem is.
for the ACL to be effective the client needs to request the memberof attribute:
Robinson:/opt/openldap/etc/openldap # ldapsearch -x -b dc=thunderbird uid=dmarkey # extended LDIF # # LDAPv3 # base <dc=thunderbird> with scope subtree # filter: uid=dmarkey # requesting: ALL #
# dmarkey, user, thunderbird dn: uid=dmarkey,ou=user,dc=thunderbird objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: posixAccount objectClass: shadowAccount objectClass: krb5Principal objectClass: krb5KDCEntry objectClass: sambaSamAccount sn: Markey givenName: David uid: dmarkey mail: dmarkey@<snip> cn: David Markey Staff
# search result search: 2 result: 0 Success
# numResponses: 2 # numEntries: 1
Robinson:/opt/openldap/etc/openldap # ldapsearch -x -b dc=thunderbird uid=dmarkey uid # extended LDIF # # LDAPv3 # base <dc=thunderbird> with scope subtree # filter: uid=dmarkey # requesting: uid #
# search result search: 2 result: 0 Success
# numResponses: 1
Robinson:/opt/openldap/etc/openldap # ldapsearch -x -b dc=thunderbird uid=dmarkey uid memberof # extended LDIF # # LDAPv3 # base <dc=thunderbird> with scope subtree # filter: uid=dmarkey # requesting: uid memberof #
# dmarkey, user, thunderbird dn: uid=dmarkey,ou=user,dc=thunderbird uid: dmarkey memberOf: cn=tech,ou=groupofnames,dc=thunderbird memberOf: cn=staff,ou=groupofnames,dc=thunderbird memberOf: cn=testing,ou=groupofnames,dc=thunderbird
# search result search: 2 result: 0 Success
# numResponses: 2 # numEntries: 1
But the problem is, the client(in this case thunderbird) doesnt request memberof, so the ACL blocks all the entries.
Anyone know how i could get around this?
Any help appreciated.
Thanks.
On Sun, Mar 15, 2009 at 8:15 PM, David admin@dmarkey.com wrote:
With a relay backend, when i enable an ACL then i can only get back full entries, but not specific attributes:
- # extended LDIF
- #
- # LDAPv3
- # base <dc=thunderbird> with scope subtree
- # filter: uid=dmarkey
- # requesting: ALL
- #
- # dmarkey, user, thunderbird
- dn: uid=dmarkey,ou=user,dc=thunderbird
- objectClass: top
- objectClass: person
- objectClass: organizationalPerson
- objectClass: inetOrgPerson
- objectClass: posixAccount
- objectClass: shadowAccount
- objectClass: krb5Principal
- objectClass: krb5KDCEntry
- objectClass: sambaSamAccount
- sn: Markey
- givenName: David
- uid: dmarkey
- mail: dmarkey@xxxx
- cn: David Markey Staff
- # search result
- search: 2
- result: 0 Success
- # numResponses: 2
- # numEntries: 1
Thats normal, Now we'll try to just get the mail attribute:
- Robinson:/opt/openldap/etc/openldap # ldapsearch -b dc=thunderbird
-x uid=dmarkey mail 2. # extended LDIF 3. # 4. # LDAPv3 5. # base <dc=thunderbird> with scope subtree 6. # filter: uid=dmarkey 7. # requesting: mail 8. # 9. 10. # search result 11. search: 2 12. result: 0 Success 13. 14. # numResponses: 1
Nothing is returned.
Here is the relay database definition
database relay suffix "dc=thunderbird" relay "dc=example,dc=ie" overlay rwm overlay memberof rwm-rewriteEngine on rwm-suffixmassage "dc=example,dc=ie"
map attribute cn gecos map attribute mail * map attribute uid * map attribute sn * map attribute givenname * map attribute memberof * map attribute *
access to filter="memberOf=cn=staff,ou=groupofnames,dc=thunderbird" by * read
Anyone see what im doing wrong here?
Thanks.