Advertisement
Guest User

xml active directory

a guest
Feb 1st, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 14.63 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  ~ Copyright (c) 2010-2015 Evolveum
  4.  ~
  5.  ~ Licensed under the Apache License, Version 2.0 (the "License");
  6.  ~ you may not use this file except in compliance with the License.
  7.  ~ You may obtain a copy of the License at
  8.  ~
  9.  ~      http://www.apache.org/licenses/LICENSE-2.0
  10.  ~
  11.  ~ Unless required by applicable law or agreed to in writing, software
  12.  ~ distributed under the License is distributed on an "AS IS" BASIS,
  13.  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  ~ See the License for the specific language governing permissions and
  15.  ~ limitations under the License.
  16.  -->
  17.  
  18.  
  19. <objects xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
  20.    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  21.    xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
  22.     xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
  23.    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  24.     xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
  25.    xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3"
  26.     xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3"
  27.     xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
  28.     xsi:schemaLocation="http://midpoint.evolveum.com/xml/ns/public/common/common-3 ../../../infra/schema/src/main/resources/xml/ns/public/common/common-3.xsd">
  29.  
  30.     <c:resource oid="11111111-2222-3333-5555-000000000000" xsi:type="c:ResourceType">
  31.  
  32.         <name>Active Directory Group Sync</name>
  33.  
  34.         <description>A sample resource that synchronizes AD groups with midPoint roles.</description>
  35.  
  36.         <!-- Reference to the ICF AD connector. OID is "virtual" for now. -->
  37.         <connectorRef type="ConnectorType">
  38.             <filter>
  39.                 <q:equal>
  40.                     <q:path>c:connectorType</q:path>
  41.                     <q:value>Org.IdentityConnectors.ActiveDirectory.ActiveDirectoryConnector</q:value>
  42.                 </q:equal>
  43.             </filter>
  44.         </connectorRef>
  45.  
  46.         <!-- Configuration section contains configuration of the connector,
  47.             such as hostnames and passwords -->
  48.         <connectorConfiguration>
  49.  
  50.             <!-- Configuration specific for the Active Directory connector -->
  51.             <icfc:configurationProperties
  52.                xmlns:icfcad="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/ActiveDirectory.Connector/Org.IdentityConnectors.ActiveDirectory.ActiveDirectoryConnector">
  53.                 <icfcad:DirectoryAdminName>xxxxxxxidmadminxxxxxxx</icfcad:DirectoryAdminName>
  54.                 <icfcad:DirectoryAdminPassword><clearValue>5ecr3t</clearValue></icfcad:DirectoryAdminPassword>
  55.                 <icfcad:ObjectClass>User</icfcad:ObjectClass>
  56.                 <icfcad:Container>OU=MISE,DC=rete,DC=risorse,DC=mise</icfcad:Container>
  57.                 <icfcad:CreateHomeDirectory>true</icfcad:CreateHomeDirectory>
  58.                 <icfcad:LDAPHostName>adcret00.rete.risorse.mise</icfcad:LDAPHostName><!-- This is the hostname of AD server as seen from the ConnectorServer instance! -->
  59.                 <icfcad:SearchChildDomains>false</icfcad:SearchChildDomains>
  60.                 <icfcad:DomainName>rete.risorse.mise</icfcad:DomainName>
  61.                 <icfcad:SyncGlobalCatalogServer>adcret00.rete.risorse.mise</icfcad:SyncGlobalCatalogServer><!-- hostname of DC to look up for changes when synchronizing -->
  62.                 <icfcad:SyncDomainController>adcret00.rete.risorse.mise</icfcad:SyncDomainController><!-- hostname of DC to look up for changes when synchronizing -->    
  63.                 <icfcad:ObjectClassesExtensionFile>extension.xml</icfcad:ObjectClassesExtensionFile>
  64.             </icfc:configurationProperties>
  65.  
  66.             <icfc:resultsHandlerConfiguration>
  67.                 <icfc:enableCaseInsensitiveFilter>true</icfc:enableCaseInsensitiveFilter>
  68.             </icfc:resultsHandlerConfiguration>
  69.  
  70.         </connectorConfiguration>
  71.  
  72.         <!-- Resource Schema Handling definition.
  73.             This part defines how the schema will be used by midPoint.
  74.             It defines expressions and limitations for individual
  75.             schema attributes.
  76.             The expressions that describe both inbound and outbound flow of
  77.             the attributes are defined in this section.
  78.             This is the part where most of the customization takes place.
  79.        -->
  80.  
  81.         <schemaHandling>
  82.  
  83.             <!-- handling of user accounts -->
  84.  
  85.             <objectType>
  86.                 <kind>account</kind>
  87.                 <displayName>Default Account</displayName>
  88.                 <default>true</default>
  89.                 <objectClass>ri:AccountObjectClass</objectClass>
  90.  
  91.                 <attribute>
  92.                     <ref>ri:givenName</ref>
  93.                     <displayName>Given Name</displayName>
  94.                     <outbound>
  95.                         <source>
  96.                             <path>$user/givenName</path>
  97.                         </source>
  98.                     </outbound>
  99.                     <inbound>
  100.                         <target>
  101.                             <path>$user/givenName</path>
  102.                         </target>
  103.                     </inbound>
  104.                 </attribute>
  105.                 <attribute>
  106.                     <ref>ri:sn</ref>
  107.                     <displayName>Surname</displayName>
  108.                     <outbound>
  109.                         <source>
  110.                             <path>$user/familyName</path>
  111.                         </source>
  112.                     </outbound>
  113.                     <inbound>
  114.                         <target>
  115.                             <path>$user/familyName</path>
  116.                         </target>
  117.                     </inbound>
  118.                 </attribute>
  119.                 <attribute>
  120.                     <ref>ri:sAMAccountName</ref>
  121.                     <displayName>Login name</displayName>
  122.                     <outbound>
  123.                         <source>
  124.                             <path>$user/name</path>
  125.                         </source>
  126.                     </outbound>
  127.                     <inbound>
  128.                         <target>
  129.                             <path>$user/name</path>
  130.                         </target>
  131.                     </inbound>
  132.                 </attribute>
  133.                 <!-- <attribute>
  134.                     <ref>ri:distinguishedName</ref>
  135.                     <displayName>Distinguished Name</displayName>
  136.  
  137.                     <limitations>
  138.                         <minOccurs>0</minOccurs>
  139.                     </limitations>
  140.  
  141.                     <outbound>
  142.                         <source>
  143.                             <path>$user/name</path>
  144.                         </source>
  145.                     </outbound>
  146.                 </attribute> -->
  147.  
  148.                 <!-- This defines an association between user and groups he is a member of -->
  149.                 <association>
  150.                     <ref>ri:group</ref>
  151.                     <displayName>AD Group Membership</displayName>
  152.                     <kind>entitlement</kind>
  153.                     <intent>group</intent>
  154.                     <direction>objectToSubject</direction>
  155.                     <associationAttribute>ri:member</associationAttribute>
  156.                     <valueAttribute>icfs:name</valueAttribute>
  157.                     <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
  158.                 </association>
  159.  
  160.                 <iteration>
  161.                     <maxIterations>5</maxIterations>
  162.                 </iteration>
  163.                 <activation>
  164.                     <administrativeStatus>
  165.                         <outbound/>
  166.                     </administrativeStatus>
  167.                 </activation>
  168.             </objectType>
  169.  
  170.             <!-- handling of groups -->
  171.  
  172.             <objectType>
  173.                 <kind>entitlement</kind>
  174.                 <intent>group</intent>
  175.                 <displayName>AD Group</displayName>
  176.                 <default>true</default>
  177.                 <objectClass>ri:CustomGroupObjectClass</objectClass>
  178.                 <attribute>
  179.                     <ref>icfs:name</ref>
  180.                     <matchingRule>mr:stringIgnoreCase</matchingRule>
  181.                     <outbound>
  182.                         <source>
  183.                             <path>$focus/name</path>
  184.                         </source>
  185.                     </outbound>
  186.                 </attribute>
  187.                 <attribute>
  188.                     <ref>ri:cn</ref>
  189.                     <matchingRule>mr:stringIgnoreCase</matchingRule>
  190.                     <outbound>
  191.                         <source>
  192.                             <path>$focus/name</path>
  193.                         </source>
  194.                     </outbound>
  195.                     <inbound>
  196.                         <target>
  197.                             <path>$focus/name</path>
  198.                         </target>
  199.                     </inbound>
  200.                 </attribute>
  201.                 <attribute>
  202.                     <ref>ri:description</ref>
  203.                     <outbound>
  204.                         <strength>strong</strength>
  205.                         <source>
  206.                             <path>description</path>
  207.                         </source>
  208.                     </outbound>
  209.                     <inbound>
  210.                         <strength>weak</strength>
  211.                         <target>
  212.                             <path>$focus/description</path>
  213.                         </target>
  214.                     </inbound>
  215.                 </attribute>
  216.             </objectType>
  217.  
  218.         </schemaHandling>
  219.         <!--
  220.            Synchronization section describes the synchronization policy, timing,
  221.            reactions and similar synchronization settings.
  222.        -->
  223.         <synchronization>
  224.             <objectSynchronization>
  225.                 <!-- Synchronizing users -->
  226.                 <objectClass>ri:AccountObjectClass</objectClass>
  227.                 <enabled>true</enabled>
  228.  
  229.                 <correlation>
  230.                     <q:description>
  231.                         Correlation expression is a search query.
  232.                         Following search query will look for users that have "name"
  233.                         equal to the "sAMAccountName" attribute of the account. Simply speaking,
  234.                         it will look for match in usernames in the IDM and the resource.
  235.                         The correlation rule always looks for users, so it will not match
  236.                         any other object type.
  237.                     </q:description>
  238.                     <q:equal>
  239.                         <q:path>c:name</q:path>
  240.                         <expression>
  241.                             <path>$shadow/attributes/sAMAccountName</path>
  242.                         </expression>
  243.                     </q:equal>
  244.                 </correlation>
  245.  
  246.                 <!-- Confirmation rule may be here, but as the search above will
  247.                      always return at most one match, the confirmation rule is not needed. -->
  248.  
  249.                 <!-- Following section describes reactions to a situations.
  250.                      The setting here assumes that this resource is authoritative,
  251.                      therefore all accounts created on the resource should be
  252.                      reflected as new users in IDM.
  253.                      See http://wiki.evolveum.com/display/midPoint/Synchronization+Situations
  254.                  -->
  255.                 <reaction>
  256.                     <situation>linked</situation>
  257.                     <action>
  258.                         <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#modifyUser</handlerUri>
  259.                     </action>
  260.                 </reaction>
  261.                 <reaction>
  262.                     <situation>deleted</situation>
  263.                     <action>
  264.                         <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlinkAccount</handlerUri>
  265.                     </action>
  266.                 </reaction>
  267.                 <reaction>
  268.                     <situation>unlinked</situation>
  269.                     <action>
  270.                         <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#linkAccount</handlerUri>
  271.                     </action>
  272.                 </reaction>
  273.                 <reaction>
  274.                     <situation>unmatched</situation>
  275.                     <action>
  276.                         <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addUser</handlerUri>
  277.                     </action>
  278.                 </reaction>
  279.             </objectSynchronization>
  280.  
  281.             <objectSynchronization>
  282.                 <!-- Synchronizing groups with roles -->
  283.                 <objectClass>ri:CustomGroupObjectClass</objectClass>
  284.                 <kind>entitlement</kind>
  285.                 <intent>group</intent>
  286.                 <focusType>c:RoleType</focusType>
  287.                 <enabled>true</enabled>
  288.  
  289.                 <correlation>
  290.                     <q:equal>
  291.                         <q:path>c:name</q:path>
  292.                         <expression>
  293.                             <path>$shadow/attributes/samAccountName</path>
  294.                         </expression>
  295.                     </q:equal>
  296.                 </correlation>
  297.                
  298.                 <reaction>
  299.                     <situation>linked</situation>
  300.                     <synchronize>true</synchronize>
  301.                 </reaction>
  302.                 <reaction>
  303.                     <situation>deleted</situation>
  304.                     <synchronize>true</synchronize>
  305.                     <action>
  306.                         <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
  307.                     </action>
  308.                 </reaction>
  309.                 <reaction>
  310.                     <situation>unlinked</situation>
  311.                     <synchronize>true</synchronize>
  312.                     <action>
  313.                         <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
  314.                     </action>
  315.                 </reaction>
  316.                 <reaction>
  317.                     <situation>unmatched</situation>
  318.                     <synchronize>true</synchronize>
  319.                     <action>
  320.                         <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</handlerUri>
  321.                     </action>
  322.                 </reaction>
  323.             </objectSynchronization>
  324.  
  325.         </synchronization>
  326.     </c:resource>
  327.  
  328.     <task oid="11111111-2222-3333-4444-100000000000">
  329.         <name>Synchronization: Active Directory (users)</name>
  330.         <taskIdentifier>11111111-2222-3333-4444-100000000000</taskIdentifier>
  331.         <ownerRef oid="00000000-0000-0000-0000-000000000002"/>
  332.         <executionStatus>runnable</executionStatus>
  333.         <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/live-sync/handler-3</handlerUri>
  334.         <objectRef oid="11111111-2222-3333-5555-000000000000" type="c:ResourceType"/>
  335.         <recurrence>recurring</recurrence>
  336.         <binding>tight</binding>
  337.         <schedule>
  338.             <interval>5</interval>
  339.         </schedule>
  340.     </task>
  341.  
  342.     <task oid="11111111-2222-3333-4444-100000000001">
  343.         <name>Synchronization: Active Directory (groups)</name>
  344.         <extension>
  345.             <mext:kind xmlns:mext="http://midpoint.evolveum.com/xml/ns/public/model/extension-3">entitlement</mext:kind>
  346.         </extension>
  347.         <taskIdentifier>11111111-2222-3333-4444-100000000001</taskIdentifier>
  348.         <ownerRef oid="00000000-0000-0000-0000-000000000002"/>
  349.         <executionStatus>runnable</executionStatus>
  350.         <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/live-sync/handler-3</handlerUri>
  351.         <objectRef oid="11111111-2222-3333-5555-000000000000" type="c:ResourceType"/>
  352.         <recurrence>recurring</recurrence>
  353.         <binding>tight</binding>
  354.         <schedule>
  355.             <interval>5</interval>
  356.         </schedule>
  357.     </task>
  358.  
  359. </objects>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement