Skip to content

Commit

Permalink
need to seperate each object type out for seperate REST paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Babb committed Dec 1, 2017
1 parent ca3a51d commit 086ed54
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 204 deletions.
202 changes: 0 additions & 202 deletions midpoint/assets/objects/01_sis.xml

This file was deleted.

187 changes: 187 additions & 0 deletions midpoint/assets/objects/01_sis_resources.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- TODO: is hard coding an OID going to be a problem? -->
<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:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance/ef2bc95b-76e0-48e2-86d6-3d4f02d3eeee"
xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:my="http://myself.me/schemas/whatever"

oid="6573361b-20c9-4d79-8f00-f1445b5902a1">

<name>SIS DB Source</name>

<connectorRef type="ConnectorType">
<filter>
<q:equal>
<q:path>c:connectorType</q:path>
<q:value>org.identityconnectors.databasetable.DatabaseTableConnector</q:value>
</q:equal>
</filter>
</connectorRef>

<connectorConfiguration>
<icfc:configurationProperties
xmlns:icscdbtable = "http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-databasetable/org.identityconnectors.databasetable.DatabaseTableConnector">
<icscdbtable:port>3306</icscdbtable:port>
<icscdbtable:host>midpoint-poc-mysql</icscdbtable:host>
<icscdbtable:user>root</icscdbtable:user>
<icscdbtable:password><clearValue>root</clearValue></icscdbtable:password>
<icscdbtable:database>myapp_development</icscdbtable:database>
<icscdbtable:table>users</icscdbtable:table>
<icscdbtable:keyColumn>id</icscdbtable:keyColumn>
<icscdbtable:passwordColumn>password</icscdbtable:passwordColumn>
<icscdbtable:jdbcDriver>com.mysql.jdbc.Driver</icscdbtable:jdbcDriver>
<icscdbtable:jdbcUrlTemplate>jdbc:mysql://%h:%p/%d?useUnicode=true&amp;characterEncoding=utf8&amp;connectionCollation=utf8_bin&amp;useSSL=false</icscdbtable:jdbcUrlTemplate>
<icscdbtable:enableEmptyString>false</icscdbtable:enableEmptyString>
<icscdbtable:rethrowAllSQLExceptions>true</icscdbtable:rethrowAllSQLExceptions>
<icscdbtable:nativeTimestamps>false</icscdbtable:nativeTimestamps>
<icscdbtable:allNative>false</icscdbtable:allNative>
<icscdbtable:changeLogColumn>updated_at</icscdbtable:changeLogColumn>
</icfc:configurationProperties>
</connectorConfiguration>

<schemaHandling>
<objectType>
<kind>account</kind>
<displayName>Normal Account</displayName>
<default>true</default>
<objectClass>AccountObjectClass</objectClass>

<attribute>
<ref>icfs:uid</ref>
<displayName>Entry UUID</displayName>
<limitations>
<access>
<read>true</read>
</access>
</limitations>
</attribute>

<attribute>
<ref>icfs:name</ref>
<displayName>name</displayName>
<limitations>
<minOccurs>0</minOccurs>
<access>
<read>true</read>
<add>true</add>
<modify>true</modify>
</access>
</limitations>
</attribute>

<attribute>
<ref>ri:uid</ref>
<inbound>
<target>
<path>$user/name</path>
</target>
</inbound>
</attribute>

<attribute>
<ref>ri:givenname</ref>
<inbound>
<target>
<path>$user/givenName</path>
</target>
</inbound>
</attribute>

<attribute>
<ref>ri:surname</ref>
<inbound>
<target>
<path>$user/familyName</path>
</target>
</inbound>
</attribute>

<attribute>
<ref>ri:fullName</ref>
<inbound>
<target>
<path>$user/fullName</path>
</target>
</inbound>
</attribute>

<attribute>
<ref>ri:lfname</ref>
<inbound>
<target>
<path>$user/nickName</path>
</target>
</inbound>
</attribute>

<attribute>
<ref>ri:email</ref>
<inbound>
<target>
<path>$user/emailAddress</path>
</target>
</inbound>
</attribute>

</objectType>
</schemaHandling>

<synchronization>
<objectSynchronization>
<enabled>true</enabled>

<correlation>
<q:description>
Correlation expression is a search query.
Following search queury will look for users that have "name"
equal to the "uid" attribute of the account. Simply speaking,
it will look for match in usernames in the IDM and the resource.
The correlation rule always looks for users, so it will not match
any other object type.
</q:description>
<q:equal>
<q:path>name</q:path>
<c:expression>
<c:path>$c:account/c:attributes/ri:uid</c:path>
</c:expression>
</q:equal>
</correlation>

<reaction>
<situation>linked</situation>
<synchronize>true</synchronize>
</reaction>

<reaction>
<situation>deleted</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
</action>
</reaction>

<reaction>
<situation>unlinked</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
</action>
</reaction>
<reaction>
<situation>unmatched</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</handlerUri>
</action>
</reaction>
</objectSynchronization>
</synchronization>

</resource>

Loading

0 comments on commit 086ed54

Please sign in to comment.