Skip to content

add isMemberOf #114

Merged
merged 2 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Workbench/directory/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ RUN useradd ldapadmin \
&& /usr/sbin/ns-slapd -D /etc/dirsrv/slapd-dir \
&& while ! curl -s ldap://localhost:389 > /dev/null; do echo waiting for ldap to start; sleep 1; done; \
ldapadd -H ldap:/// -f /seed-data/data.ldif -x -D "cn=Directory Manager" -w password \
&& ldapmodify -H ldap:/// -f /seed-data/incwbperson-obj.ldif -x -D "cn=Directory Manager" -w password
&& ldapmodify -H ldap:/// -f /seed-data/incwbperson-obj.ldif -x -D "cn=Directory Manager" -w password \
&& ldapmodify -H ldap:/// -f /seed-data/edumember-obj.ldif -x -D "cn=Directory Manager" -w password

EXPOSE 389 443

Expand Down
30 changes: 30 additions & 0 deletions Workbench/directory/container_files/seed-data/edumember-obj.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# eduMember Objectclass
#
#
# "eduMember" attributes
#
dn: cn=schema
changetype: modify
#
add: attributetypes
attributeTypes: ( 1.3.6.1.4.1.5923.1.5.1.1
NAME 'isMemberOf'
DESC 'identifiers for groups to which containing entity belongs'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
attributeTypes: ( 1.3.6.1.4.1.5923.1.5.1.2
NAME 'hasMember'
DESC 'identifiers for entities that are members of the group'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
#
add: objectclasses
objectClasses: ( 1.3.6.1.4.1.5923.1.5.2 NAME 'eduMember'
AUXILIARY
MAY ( isMemberOf $ hasMember )
)
#
# end of LDIF
#
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<generationConstraints>
<generateObjectClass>ri:inetOrgPerson</generateObjectClass>
<generateObjectClass>ri:eduPerson</generateObjectClass>
<generateObjectClass>ri:eduMember</generateObjectClass>
<generateObjectClass>ri:incwbPerson</generateObjectClass>
<generateObjectClass>ri:organizationalPerson</generateObjectClass>
<generateObjectClass>ri:person</generateObjectClass>
Expand All @@ -77,6 +78,7 @@
<default>true</default>
<objectClass>ri:inetOrgPerson</objectClass>
<auxiliaryObjectClass>ri:eduPerson</auxiliaryObjectClass>
<auxiliaryObjectClass>ri:eduMember</auxiliaryObjectClass>
<auxiliaryObjectClass>ri:incwbPerson</auxiliaryObjectClass>
<attribute>
<ref>ri:dn</ref>
Expand Down Expand Up @@ -249,6 +251,15 @@
<direction>objectToSubject</direction>
<associationAttribute>ri:uniqueMember</associationAttribute>
<valueAttribute>ri:dn</valueAttribute>
</association>
<association>
<ref>ri:isMemberOfAssociation</ref>
<tolerant>false</tolerant>
<kind>entitlement</kind>
<intent>group</intent>
<direction>subjectToObject</direction>
<associationAttribute>ri:isMemberOf</associationAttribute>
<valueAttribute>ri:cn</valueAttribute>
</association>
<protected>
<filter>
Expand Down Expand Up @@ -303,6 +314,7 @@
<attribute>
<ref>ri:cn</ref>
<matchingRule>mr:stringIgnoreCase</matchingRule>
<secondaryIdentifier>true</secondaryIdentifier>
<outbound>
<strength>weak</strength>
<source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,20 @@
</associationFromLink>
</expression>
</outbound>
</association>
<association>
<ref>ri:isMemberOfAssociation</ref>
<outbound>
<expression>
<associationFromLink>
<projectionDiscriminator>
<kind>entitlement</kind>
<intent>group</intent>
</projectionDiscriminator>
<assignmentPathIndex>1</assignmentPathIndex>
</associationFromLink>
</expression>
</outbound>
</association>
</construction>
<order>3</order> <!-- order=3 means the user object; user has an assignment to the org: user->org->archetype->metarole -->
Expand Down