diff --git a/midpoint/assets/objects/01_sis.xml b/midpoint/assets/objects/01_sis.xml new file mode 100644 index 0000000..d305d98 --- /dev/null +++ b/midpoint/assets/objects/01_sis.xml @@ -0,0 +1,202 @@ + + + + + + + SIS DB Source + + + + + c:connectorType + org.identityconnectors.databasetable.DatabaseTableConnector + + + + + + + 3306 + midpoint-poc-mysql + root + root + myapp_development + users + id + password + com.mysql.jdbc.Driver + jdbc:mysql://%h:%p/%d?useUnicode=true&characterEncoding=utf8&connectionCollation=utf8_bin&useSSL=false + false + true + false + false + updated_at + + + + + + account + Normal Account + true + AccountObjectClass + + + icfs:uid + Entry UUID + + + true + + + + + + icfs:name + name + + 0 + + true + true + true + + + + + + ri:uid + + + $user/name + + + + + + ri:givenname + + + $user/givenName + + + + + + ri:surname + + + $user/familyName + + + + + + ri:fullName + + + $user/fullName + + + + + + ri:lfname + + + $user/nickName + + + + + + ri:email + + + $user/emailAddress + + + + + + + + + + true + + + + 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. + + + name + + $c:account/c:attributes/ri:uid + + + + + + linked + true + + + + deleted + true + + http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink + + + + + unlinked + true + + http://midpoint.evolveum.com/xml/ns/public/model/action-3#link + + + + unmatched + true + + http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus + + + + + + + + + Import SIS Accounts + + account + ri:AccountObjectClass + + + + runnable + ImportingAccounts + http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/import/handler-3 + + single + loose + restart + + + diff --git a/midpoint/assets/objects/import_objects.sh b/midpoint/assets/objects/import_objects.sh index 2802108..5a64d8f 100755 --- a/midpoint/assets/objects/import_objects.sh +++ b/midpoint/assets/objects/import_objects.sh @@ -3,5 +3,6 @@ # import_objects.sh, DESCRIPTION # echo "Importing Midpoint objects" -curl --user administrator:5ecr3t -H "Content-Type: application/xml" -X POST http://localhost:8080/midpoint/ws/rest/resources -d @/midpoint_objects/simple_dbtable.xml -v +# TODO: Change this to loop through all files in directory in ascending order +curl --user administrator:5ecr3t -H "Content-Type: application/xml" -X POST http://localhost:8080/midpoint/ws/rest/resources -d @/midpoint_objects/sis.xml -v echo "Done importing Midpoint objects" diff --git a/midpoint/assets/objects/simple_dbtable.xml b/midpoint/assets/objects/simple_dbtable.xml deleted file mode 100644 index 713885d..0000000 --- a/midpoint/assets/objects/simple_dbtable.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - mysql-sis - - - - - - c:connectorType - org.identityconnectors.databasetable.DatabaseTableConnector - - - - - - - - - - 3306 - - mysql - root - root - myapp_development - users - Id - password - com.mysql.jdbc.Driver - jdbc:mysql://mysql:3306/myapp_development?autoReconnect=true&useSSL=false - false - true - false - false - - - - - - -