Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
InCommonTAP-Examples/Workbench/midpoint_server/container_files/mp-home/post-initial-objects/resources/100-grouper-new.xml
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
378 lines (349 sloc)
14.7 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
~ Copyright (c) 2010-2023 Evolveum | |
~ | |
~ Licensed under the Apache License, Version 2.0 (the "License"); | |
~ you may not use this file except in compliance with the License. | |
~ You may obtain a copy of the License at | |
~ | |
~ http://www.apache.org/licenses/LICENSE-2.0 | |
~ | |
~ Unless required by applicable law or agreed to in writing, software | |
~ distributed under the License is distributed on an "AS IS" BASIS, | |
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
~ See the License for the specific language governing permissions and | |
~ limitations under the License. | |
--> | |
<resource xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-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="fb0bbf07-e33f-4ddd-85a1-16a7edc237f2"> | |
<name>Source: Groups</name> | |
<!-- | |
<abstract>true</abstract> | |
<template>true</template> | |
--> | |
<connectorRef relation="org:default" type="c:ConnectorType"> | |
<filter> | |
<q:and> | |
<q:equal> | |
<q:path>c:connectorType</q:path> | |
<q:value>com.evolveum.polygon.connector.grouper.GrouperConnector</q:value> | |
</q:equal> | |
<q:equal> | |
<q:path>connectorVersion</q:path> | |
<q:value>1.0.1.0</q:value> | |
</q:equal> | |
</q:and> | |
</filter> | |
</connectorRef> | |
<connectorConfiguration xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3"> | |
<icfc:configurationProperties xmlns:grpconf="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-grouper/com.evolveum.polygon.connector.grouper.GrouperConnector"> | |
<grpconf:host>grouper_data</grpconf:host> | |
<grpconf:port>5432</grpconf:port> | |
<grpconf:userName>grouper</grpconf:userName> | |
<grpconf:password>password</grpconf:password> | |
<grpconf:databaseName>grouper_to_midpoint</grpconf:databaseName> | |
<grpconf:attrsToHaveInAllSearch>members</grpconf:attrsToHaveInAllSearch> | |
<grpconf:attrsToHaveInAllSearch>member_of</grpconf:attrsToHaveInAllSearch> | |
<grpconf:extendedGroupProperties>emailListName</grpconf:extendedGroupProperties> | |
</icfc:configurationProperties> | |
<icfc:resultsHandlerConfiguration> | |
<icfc:enableNormalizingResultsHandler>false</icfc:enableNormalizingResultsHandler> | |
<icfc:enableFilteredResultsHandler>false</icfc:enableFilteredResultsHandler> | |
<icfc:enableAttributesToGetSearchResultsHandler>false</icfc:enableAttributesToGetSearchResultsHandler> | |
</icfc:resultsHandlerConfiguration> | |
</connectorConfiguration> | |
<schemaHandling> | |
<objectType> | |
<kind>account</kind> | |
<intent>default</intent> | |
<displayName>Default Account</displayName> | |
<default>true</default> | |
<objectClass>ri:subject</objectClass> | |
<focus> | |
<type>c:UserType</type> | |
</focus> | |
<attribute> | |
<ref>ri:subject_id</ref> | |
<inbound> | |
<target> | |
<path>$user/name</path> | |
</target> | |
</inbound> | |
</attribute> | |
<!--<attribute> | |
<ref>icfs:uid</ref> | |
<inbound> | |
<target> | |
<path>$user/employeeNumber</path> | |
</target> | |
</inbound> | |
</attribute>--> | |
<attribute> | |
<ref>ri:member_of</ref> | |
<fetchStrategy>explicit</fetchStrategy> | |
</attribute> | |
<association> | |
<ref>ri:group</ref> | |
<inbound> | |
<strength>strong</strength> | |
<expression> | |
<assignmentTargetSearch> | |
<targetType>c:OrgType</targetType> | |
<filter> | |
<q:equal> | |
<q:path>name</q:path> | |
<expression> | |
<script> | |
<code> | |
def attrs = entitlement.getAttributes(); | |
pcvi = attrs.asPrismContainerValue().getItems(); | |
def groupName; | |
for (obj in pcvi){ | |
if (obj.isSingleValue()){ | |
if("uid".equals(obj?.getElementName().toString())){ | |
groupName = obj?.getValue()?.getRealValue() | |
return groupName | |
} | |
} | |
} | |
return groupName; | |
</code> | |
</script> | |
</expression> | |
</q:equal> | |
</filter> | |
<populate> | |
<populateItem> | |
<expression> | |
<value>grouper-group</value> | |
</expression> | |
<target> | |
<path>subtype</path> | |
</target> | |
</populateItem> | |
</populate> | |
</assignmentTargetSearch> | |
</expression> | |
<target> | |
<path>assignment</path> | |
<set> | |
<condition> | |
<script> | |
<code> | |
assignment?.subtype?.contains('grouper-group') | |
</code> | |
</script> | |
</condition> | |
</set> | |
</target> | |
</inbound> | |
<kind>entitlement</kind> | |
<intent>group</intent> | |
<direction>objectToSubject</direction> | |
<associationAttribute>ri:members</associationAttribute> | |
<valueAttribute>icfs:uid</valueAttribute> | |
<shortcutAssociationAttribute>ri:member_of</shortcutAssociationAttribute> | |
<shortcutValueAttribute>icfs:uid</shortcutValueAttribute> | |
<explicitReferentialIntegrity>false</explicitReferentialIntegrity> | |
</association> | |
<correlation> | |
<correlators> | |
<items> | |
<name>unique_index</name> | |
<item> | |
<ref>name</ref> | |
</item> | |
</items> | |
</correlators> | |
</correlation> | |
<synchronization> | |
<reaction> | |
<situation>unmatched</situation> | |
<actions> | |
<addFocus> | |
<synchronize>true</synchronize> | |
</addFocus> | |
</actions> | |
</reaction> | |
<reaction> | |
<situation>unlinked</situation> | |
<actions> | |
<link> | |
<synchronize>true</synchronize> | |
</link> | |
</actions> | |
</reaction> | |
<reaction> | |
<situation>linked</situation> | |
<actions> | |
<synchronize/> | |
</actions> | |
</reaction> | |
<reaction> | |
<situation>deleted</situation> | |
<actions> | |
<synchronize/> | |
</actions> | |
</reaction> | |
</synchronization> | |
</objectType> | |
<objectType> | |
<kind>entitlement</kind> | |
<intent>group</intent> | |
<displayName>Group</displayName> | |
<default>true</default> | |
<objectClass>ri:group</objectClass> | |
<focus> | |
<type>c:OrgType</type> | |
</focus> | |
<attribute> | |
<ref>ri:emailListName</ref> | |
<fetchStrategy>explicit</fetchStrategy> | |
<inbound> | |
<strength>strong</strength> | |
<target> | |
<path>emailAddress</path> | |
</target> | |
</inbound> | |
</attribute> | |
<attribute> | |
<ref>icfs:uid</ref> | |
<inbound> | |
<target> | |
<path>$focus/name</path> | |
</target> | |
</inbound> | |
</attribute> | |
<attribute> | |
<ref>ri:group_name</ref> | |
<inbound> | |
<strength>strong</strength> | |
<target> | |
<path>extension/grouperName</path> | |
</target> | |
</inbound> | |
<inbound> | |
<strength>strong</strength> | |
<expression> | |
<script> | |
<code> | |
import com.evolveum.midpoint.schema.util.* | |
import com.evolveum.midpoint.schema.constants.* | |
if (input == null) { | |
null | |
} else { | |
archetypeOid = '5f2b96d2-49b5-4a8a-9601-14457309a69b' // generic-grouper-group archetype | |
switch (input) { | |
case ~/ref:affiliation:.*/: archetypeOid = '56f53812-047d-4b69-83e8-519a73d161e1'; break; // affiliation archetype | |
case ~/ref:dept:.*/: archetypeOid = '1cec5f78-8fba-459b-9547-ef7485009f40'; break; // department archetype | |
case ~/ref:course:.*/: archetypeOid = '3dab9a72-118b-4e40-a138-bb691c335eca'; break; // course archetype | |
case ~/app:mailinglist:.*/: archetypeOid = '1645d1dc-1f7c-4508-b50b-97b501ccdee3'; break; // mailing-list archetype | |
} | |
ObjectTypeUtil.createAssignmentTo(archetypeOid, ObjectTypes.ARCHETYPE, prismContext) | |
} | |
</code> | |
</script> | |
</expression> | |
<target> | |
<path>assignment</path> | |
<set> | |
<predefined>all</predefined> | |
</set> | |
</target> | |
</inbound> | |
</attribute> | |
<attribute> | |
<ref>ri:display_name</ref> | |
<inbound> | |
<target> | |
<path>extension/grouperDisplayName</path> | |
</target> | |
</inbound> | |
<inbound> | |
<target> | |
<path>$focus/displayName</path> | |
</target> | |
</inbound> | |
</attribute> | |
<attribute> | |
<ref>ri:description</ref> | |
<inbound> | |
<target> | |
<path>$focus/description</path> | |
</target> | |
</inbound> | |
</attribute> | |
<attribute> | |
<ref>ri:members</ref> | |
<fetchStrategy>explicit</fetchStrategy> | |
</attribute> | |
<correlation> | |
<correlators> | |
<items> | |
<name>unique_index</name> | |
<item> | |
<ref>name</ref> | |
</item> | |
</items> | |
</correlators> | |
</correlation> | |
<synchronization> | |
<reaction> | |
<situation>unmatched</situation> | |
<actions> | |
<addFocus> | |
<synchronize>true</synchronize> | |
</addFocus> | |
</actions> | |
</reaction> | |
<reaction> | |
<situation>unlinked</situation> | |
<actions> | |
<link> | |
<synchronize>true</synchronize> | |
</link> | |
</actions> | |
</reaction> | |
<reaction> | |
<situation>linked</situation> | |
<actions> | |
<synchronize/> | |
</actions> | |
</reaction> | |
<reaction> | |
<situation>deleted</situation> | |
<actions> | |
<deleteFocus> | |
<synchronize>true</synchronize> | |
</deleteFocus> | |
</actions> | |
</reaction> | |
</synchronization> | |
</objectType> | |
</schemaHandling> | |
<capabilities> | |
<cachingMetadata> | |
<retrievalTimestamp>2023-05-24T13:23:53.145+02:00</retrievalTimestamp> | |
<serialNumber>d991389de17be20e-55b20a5934dbcc31</serialNumber> | |
</cachingMetadata> | |
<native xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3"> | |
<cap:schema/> | |
<cap:read> | |
<cap:returnDefaultAttributesOption>false</cap:returnDefaultAttributesOption> | |
</cap:read> | |
<cap:testConnection/> | |
<cap:script> | |
<cap:host> | |
<cap:type>connector</cap:type> | |
</cap:host> | |
</cap:script> | |
<cap:liveSync/> | |
</native> | |
</capabilities> | |
</resource> | |