Skip to content

Commit

Permalink
Simplify and optimize demo/complex2s config
Browse files Browse the repository at this point in the history
1) Removed multiple intents from LDAP resource, making operations faster
2) Replaced template + metarole combination (for each group type)
with single archetype.
3) Factored out common code to 2 archetype metaroles.
  • Loading branch information
mederly committed Sep 24, 2019
1 parent 63dfda5 commit 3b33180
Show file tree
Hide file tree
Showing 25 changed files with 863 additions and 1,261 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<archetype xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:apti="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://grouper-demo.tier.internet2.edu"
oid="56f53812-047d-4b69-83e8-519a73d161e1">
<name>affiliation</name>
<extension>
<ext:grouperNamePrefix>ref:affiliation:</ext:grouperNamePrefix>
<ext:ldapRootDn>ou=Affiliations,ou=Groups,dc=internet2,dc=edu</ext:ldapRootDn>
<ext:midPointNamePrefix>affiliation_</ext:midPointNamePrefix>
<ext:midPointDisplayNamePrefix>Affiliation: </ext:midPointDisplayNamePrefix>
</extension>
<assignment>
<targetRef oid="bcaec940-50c8-44bb-aa37-b2b5bb2d5b90" relation="org:default" type="c:RoleType" /> <!-- metarole-grouper-provided-group -->
</assignment>
<assignment>
<targetRef oid="8da46694-bd71-4e1e-bfd7-73865ae2ea9a" relation="org:default" type="c:RoleType" /> <!-- metarole-ldap-group -->
</assignment>
<inducement>
<targetRef oid="1d7c0e3a-4456-409c-9f50-95407b2eb785" relation="org:default" type="c:OrgType" /> <!-- affiliations -->
</inducement>
<!-- Group-type-specific data -->
<inducement>
<construction>
<resourceRef oid="e417225d-8a08-46f3-9b5d-624990b52386" relation="org:default" type="c:ResourceType" /> <!-- Faculty CSV -->
</construction>
<order>2</order>
<condition>
<expression>
<script>
<code>assignmentPath[0].target.identifier == 'faculty'</code>
</script>
</expression>
</condition>
</inducement>
</archetype>
54 changes: 54 additions & 0 deletions demo/complex2s/midpoint-objects/archetypes/archetype-course.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<archetype xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:apti="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://grouper-demo.tier.internet2.edu"
oid="3dab9a72-118b-4e40-a138-bb691c335eca">
<name>course</name>
<extension>
<ext:grouperNamePrefix>ref:course:</ext:grouperNamePrefix>
<ext:ldapRootDn>ou=Courses,ou=Groups,dc=internet2,dc=edu</ext:ldapRootDn>
<ext:midPointNamePrefix>course_</ext:midPointNamePrefix>
<ext:midPointDisplayNamePrefix>Course: </ext:midPointDisplayNamePrefix>
</extension>
<assignment>
<targetRef oid="bcaec940-50c8-44bb-aa37-b2b5bb2d5b90" relation="org:default" type="c:RoleType" /> <!-- metarole-grouper-provided-group -->
</assignment>
<assignment>
<targetRef oid="8da46694-bd71-4e1e-bfd7-73865ae2ea9a" relation="org:default" type="c:RoleType" /> <!-- metarole-ldap-group -->
</assignment>
<inducement>
<targetRef oid="225e9360-0639-40ba-8a31-7f31bef067be" relation="org:default" type="c:OrgType" /> <!-- courses -->
</inducement>
<!-- Group-type-specific data -->
<inducement>
<construction>
<strength>weak</strength>
<resourceRef oid="a343fc2e-3954-4034-ba1a-2b72c21e577a" relation="org:default" type="c:ResourceType" /> <!-- CS CSV -->
<attribute>
<c:ref>ri:courses</c:ref>
<outbound>
<strength>strong</strength>
<expression>
<script>
<code>assignmentPath[0].target.identifier</code>
</script>
</expression>
</outbound>
</attribute>
</construction>
<order>2</order>
<condition>
<expression>
<script>
<code>assignmentPath[0].target.identifier?.startsWith('CS')</code>
</script>
</expression>
</condition>
</inducement>
</archetype>
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
<role xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
<archetype xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:apti="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
oid="ffa9eaec-9539-4d15-97aa-24cd5b92ca5b">
<name>metarole-department</name>
<inducement id="1">
<targetRef oid="bee44c51-2469-411d-bac7-695728e9c241" type="c:OrgType"/> <!-- departments -->
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://grouper-demo.tier.internet2.edu"
oid="1cec5f78-8fba-459b-9547-ef7485009f40">
<name>department</name>
<extension>
<ext:grouperNamePrefix>ref:dept:</ext:grouperNamePrefix>
<ext:midPointNamePrefix>department_</ext:midPointNamePrefix>
<ext:midPointDisplayNamePrefix>Department: </ext:midPointDisplayNamePrefix>
</extension>
<assignment>
<targetRef oid="bcaec940-50c8-44bb-aa37-b2b5bb2d5b90" relation="org:default" type="c:RoleType" /> <!-- metarole-grouper-provided-group -->
</assignment>
<!-- No LDAP metarole here: we deal with LDAP ourselves -->
<inducement>
<targetRef oid="bee44c51-2469-411d-bac7-695728e9c241" relation="org:default" type="c:OrgType" /> <!-- departments -->
</inducement>
<inducement id="2">
<!-- Group-type-specific data -->
<inducement>
<construction>
<resourceRef oid="0a37121f-d515-4a23-9b6d-554c5ef61272" relation="org:default" type="c:ResourceType" /> <!-- LDAP -->
<attribute>
Expand All @@ -29,4 +40,4 @@
</construction>
<order>2</order>
</inducement>
</role>
</archetype>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<archetype xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:apti="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://grouper-demo.tier.internet2.edu"
oid="5f2b96d2-49b5-4a8a-9601-14457309a69b">
<name>generic-grouper-group</name>
<extension>
<ext:grouperNamePrefix></ext:grouperNamePrefix>
<ext:ldapRootDn>ou=generic,ou=Groups,dc=internet2,dc=edu</ext:ldapRootDn>
<ext:midPointNamePrefix>generic_</ext:midPointNamePrefix>
<ext:midPointDisplayNamePrefix></ext:midPointDisplayNamePrefix>
</extension>
<assignment>
<targetRef oid="bcaec940-50c8-44bb-aa37-b2b5bb2d5b90" relation="org:default" type="c:RoleType" /> <!-- metarole-grouper-provided-group -->
</assignment>
<assignment>
<targetRef oid="8da46694-bd71-4e1e-bfd7-73865ae2ea9a" relation="org:default" type="c:RoleType" /> <!-- metarole-ldap-group -->
</assignment>
<inducement>
<targetRef oid="1f339075-5b2f-4a18-9c98-451f3eb0d28d" relation="org:default" type="c:OrgType" /> <!-- generic-groups -->
</inducement>
<!-- Group-type-specific data -->
<!-- nothing here by now -->
</archetype>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<archetype xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:apti="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://grouper-demo.tier.internet2.edu"
oid="1645d1dc-1f7c-4508-b50b-97b501ccdee3">
<name>mailing-list</name>
<extension>
<ext:grouperNamePrefix>app:mailinglist:</ext:grouperNamePrefix>
<ext:ldapRootDn>ou=generic,ou=Groups,dc=internet2,dc=edu</ext:ldapRootDn> <!-- could be also something specific e.g. ou=lists,ou=Groups,dc=internet2,dc=edu -->
<ext:midPointNamePrefix>mailinglist_</ext:midPointNamePrefix>
<ext:midPointDisplayNamePrefix>Mailing list: </ext:midPointDisplayNamePrefix>
</extension>
<assignment>
<targetRef oid="bcaec940-50c8-44bb-aa37-b2b5bb2d5b90" relation="org:default" type="c:RoleType" /> <!-- metarole-grouper-provided-group -->
</assignment>
<assignment>
<targetRef oid="8da46694-bd71-4e1e-bfd7-73865ae2ea9a" relation="org:default" type="c:RoleType" /> <!-- metarole-ldap-group -->
</assignment>
<inducement>
<targetRef oid="d81fb46c-20c7-44d3-8402-fef404ea1264" relation="org:default" type="c:OrgType" /> <!-- generic-groups -->
</inducement>
<!-- Group-type-specific data -->
<inducement>
<construction>
<resourceRef oid="fe805d13-481b-43ec-97d8-9d2df72cd38e" relation="org:default" type="c:ResourceType" /> <!-- Mailing lists CSV -->
<attribute>
<c:ref>ri:lists</c:ref>
<outbound>
<strength>strong</strength>
<expression>
<script>
<code>assignmentPath[0].target.identifier</code>
</script>
</expression>
</outbound>
</attribute>
</construction>
<order>2</order>
</inducement>
</archetype>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<archetype xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:apti="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://grouper-demo.tier.internet2.edu"
oid="2be36917-71ad-4c3e-8789-89cadea2d5d6">
<name>midpoint-group</name>
<extension>
<ext:ldapRootDn>ou=midpoint,ou=Groups,dc=internet2,dc=edu</ext:ldapRootDn>
</extension>
<assignment>
<targetRef oid="8da46694-bd71-4e1e-bfd7-73865ae2ea9a" relation="org:default" type="c:RoleType" /> <!-- metarole-ldap-group -->
</assignment>
<inducement>
<targetRef oid="4790ab69-7ef0-41a4-8992-78877f3beb23" relation="org:default" type="c:OrgType" /> <!-- midpoint-groups -->
</inducement>
</archetype>

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3b33180

Please sign in to comment.