Il 02/08/2016 23:49, Brent Bice ha scritto:
> ...snip...
> In our case, each user's LDAP record has no attribute specifying what
> groups he or she is a member of, but instead there are
> groupOfUniqueMember objects in LDAP which contain "member" attributes,
> each one specifying the DN of a user who is a member of that group.
I solved in this way:
- in the LDAP authsource, add the operational attribute entryDN
(available in Sun Directory Server, ApacheDS and OpenLDAP at least):
'example-ldap' => array(
'ldap:LDAP',
'search.attributes' => array('uid', 'mail', ... 'entryDN'),
- then add to the authproc
nn => array(
'class' => 'ldap:AttributeAddFromLDAP',
'authsource' => 'example-ldap',
'ldap.basedn' => 'dc=example,dc=org',
'attributes' => array('isMemberOf' => 'entryDN'),
'search.filter' => '(member=%entryDN%)',
),
in this example groups belong to the groupOfNames objectclass, for
groupOfUniqueNames change the filter to '(uniqueMember=%entryDN%)'
After this step in the authproc you will have the isMemberOf attribute
populated.
--
Marco Ferrante (
ma...@csita.unige.it)
Università degli Studi di Genova
CTS GARR-IDEM