From 91bce9903446dc611fb3c32378ef9e41a6c660f7 Mon Sep 17 00:00:00 2001 From: Radovan Semancik Date: Fri, 16 Sep 2016 16:18:54 +0200 Subject: [PATCH] Book samples --- samples/book/2/create-table-crm.sql | 12 + samples/book/2/create-table-portal.sql | 8 + samples/book/2/resource-crm.xml | 153 +++++++ samples/book/2/resource-csv-hr-bare.xml | 66 +++ samples/book/2/resource-csv-hr.xml | 180 ++++++++ samples/book/2/resource-openldap.xml | 531 ++++++++++++++++++++++++ samples/book/2/resource-portal.xml | 126 ++++++ 7 files changed, 1076 insertions(+) create mode 100644 samples/book/2/create-table-crm.sql create mode 100644 samples/book/2/create-table-portal.sql create mode 100644 samples/book/2/resource-crm.xml create mode 100644 samples/book/2/resource-csv-hr-bare.xml create mode 100644 samples/book/2/resource-csv-hr.xml create mode 100644 samples/book/2/resource-openldap.xml create mode 100644 samples/book/2/resource-portal.xml diff --git a/samples/book/2/create-table-crm.sql b/samples/book/2/create-table-crm.sql new file mode 100644 index 00000000000..8be2f8950f5 --- /dev/null +++ b/samples/book/2/create-table-crm.sql @@ -0,0 +1,12 @@ + +CREATE TABLE crmusers ( + userId VARCHAR(16) NOT NULL, + password VARCHAR(16) NOT NULL, + firstName VARCHAR(16), + lastName VARCHAR(16), + fullName VARCHAR(32), + description VARCHAR(256), + accessLevel VARCHAR(256), + disabled BOOLEAN, + PRIMARY KEY (userId) +); diff --git a/samples/book/2/create-table-portal.sql b/samples/book/2/create-table-portal.sql new file mode 100644 index 00000000000..6dddad8ffa7 --- /dev/null +++ b/samples/book/2/create-table-portal.sql @@ -0,0 +1,8 @@ + +CREATE TABLE portalusers ( + login VARCHAR(16) NOT NULL, + ldapDn VARCHAR(128), + fullName VARCHAR(32), + disabled BOOLEAN, + PRIMARY KEY (login) +); diff --git a/samples/book/2/resource-crm.xml b/samples/book/2/resource-crm.xml new file mode 100644 index 00000000000..1e586c8ab91 --- /dev/null +++ b/samples/book/2/resource-crm.xml @@ -0,0 +1,153 @@ + + + + + + CRM + + + + + c:connectorType + org.identityconnectors.databasetable.DatabaseTableConnector + + + + + + + + 5432 + localhost + crm + qwe123 + crm + crmusers + userId + password + org.postgresql.Driver + jdbc:postgresql://%h:%p/%d + false + true + false + false + + + + + + + + Default Account + true + ri:AccountObjectClass + + icfs:uid + User ID + + + true + + + + + icfs:name + Name + + 0 + + true + true + true + + + + + $user/name + + + + + + ri:firstname + First name + + + $user/givenName + + + + + + ri:lastname + Last name + + + $user/familyName + + + + + + ri:fullname + Full name + + + $user/fullName + + + + + + + + + + + + + + + + + + + + + + + + ri:disabled + + false + true + + + + + + diff --git a/samples/book/2/resource-csv-hr-bare.xml b/samples/book/2/resource-csv-hr-bare.xml new file mode 100644 index 00000000000..11ea82d942d --- /dev/null +++ b/samples/book/2/resource-csv-hr-bare.xml @@ -0,0 +1,66 @@ + + + + + + + + HR System + + + + + c:connectorType + com.evolveum.polygon.csvfile.CSVFileConnector + + + + + + + + + /var/opt/midpoint-example/resources/hr.csv + utf-8 + " + , + ; + false + id + + password + + + + + + + diff --git a/samples/book/2/resource-csv-hr.xml b/samples/book/2/resource-csv-hr.xml new file mode 100644 index 00000000000..f72acfe0fa1 --- /dev/null +++ b/samples/book/2/resource-csv-hr.xml @@ -0,0 +1,180 @@ + + + + + + + + HR System + + + + + c:connectorType + com.evolveum.polygon.csvfile.CSVFileConnector + + + + + + + + + /var/opt/midpoint-example/resources/hr.csv + utf-8 + " + , + ; + false + id + + password + + + + + + + + + Default Account + true + ri:AccountObjectClass + + icfs:uid + ID + + + true + + + + + icfs:name + Name + + 0 + + true + true + true + + + + + $user/name + + + + + ri:firstname + First name + + + $user/givenName + + + + + + ri:lastname + Last name + + + $user/familyName + + + + + + + + + + + + + weak + + + + + + + + + + + + + none + + + + + true + + + c:name + + $account/attributes/icfs:name + + + + + linked + true + + + deleted + true + + http://midpoint.evolveum.com/xml/ns/public/model/action-3#deleteFocus + + + + 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 + + + + + + diff --git a/samples/book/2/resource-openldap.xml b/samples/book/2/resource-openldap.xml new file mode 100644 index 00000000000..a87c0a58c35 --- /dev/null +++ b/samples/book/2/resource-openldap.xml @@ -0,0 +1,531 @@ + + + + + + LDAP + + + LDAP resource using a ConnId LDAP connector. It contains configuration + for use with OpenLDAP servers. + + + + + + c:connectorType + com.evolveum.polygon.connector.ldap.LdapConnector + + + + + + + 389 + localhost + dc=example,dc=com + cn=idm,ou=Administrators,dc=example,dc=com + + secret + + auto + SSHA + uid,cn,ou,dc + 2.5.13.3 + memberOf + createTimestamp + always + openldap + + + false + false + false + + + + + + account + Normal Account + true + ri:inetOrgPerson + + ri:dn + Distinguished Name + + 0 + + true + true + true + + + + + $user/name + + + + + + + + ri:entryUUID + Entry UUID + + + true + false + true + + + + + ri:cn + Common Name + + 0 + + true + true + true + + + + + + fullName + + + + + fullName + + + + + ri:sn + Surname + + 0 + + + + familyName + + + + + familyName + + + + + ri:givenName + Given Name + + + givenName + + + + + givenName + + + + + ri:uid + Login Name + + weak + + name + + + + + + + + name + + + + + ri:description + + weak + + Created by midPoint + + + + + ri:mail + Mail + false + + strong + + emailAddress + + + + + ri:l + Location + + + locality + + + + + ri:employeeType + Employee Type + false + + strong + + employeeType + + + + + ri:employeeNumber + Employee Number + false + + strong + + employeeNumber + + + + + + ri:ldapGroup + LDAP Group Membership + entitlement + ldapGroup + objectToSubject + ri:member + ri:dn + + + + ri:posixGroup + POSIX Group Membership + entitlement + posixGroup + objectToSubject + ri:memberUid + ri:uid + + + + 5 + + + + + + http://prism.evolveum.com/xml/ns/public/matching-rule-3#stringIgnoreCase + attributes/ri:dn + cn=idm,ou=Administrators,dc=example,dc=com + + + + + + + + + weak + + + + + + + + + + + + + + + + + + + weak + + + + + + + + + + + entitlement + ldapGroup + LDAP Group + ri:groupOfNames + + ri:organizationalUnit + + + attributes/dn + ou=groups,dc=example,dc=com + + + + + + ri:dn + + + name + + + + + + + + ri:member + minimal + + weak + + cn=fake,dc=example,dc=com + + + + + ri:cn + + weak + + name + + + + + + ri:cn + + + + + + entitlement + posixGroup + POSIX Group + ri:posixGroup + + ri:organizationalUnit + + + attributes/dn + ou=posixgroups,dc=example,dc=com + + + + + + ri:dn + + + name + + + + + + + + ri:cn + + weak + + name + + + + + + ri:cn + + + + + + + + + ri:inetOrgPerson + account + default + UserType + true + + + + name + + $account/attributes/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 + + + + + + + ri:groupOfNames + entitlement + ldapGroup + OrgType + true + + + + name + + $account/attributes/cn + + + + + + + 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 + + + + + + + ri:posixGroup + entitlement + posixGroup + OrgType + true + + + + name + + $account/attributes/cn + + + + + + + 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 + + + + + + + + + diff --git a/samples/book/2/resource-portal.xml b/samples/book/2/resource-portal.xml new file mode 100644 index 00000000000..99c8616e61d --- /dev/null +++ b/samples/book/2/resource-portal.xml @@ -0,0 +1,126 @@ + + + + + + Portal + + + + + c:connectorType + org.identityconnectors.databasetable.DatabaseTableConnector + + + + + + + + 5432 + localhost + crm + qwe123 + crm + portalusers + login + org.postgresql.Driver + jdbc:postgresql://%h:%p/%d + false + true + false + false + + + + + + + + Default Account + true + ri:AccountObjectClass + + icfs:uid + User ID + + + true + + + + + icfs:name + Name + + 0 + + true + true + true + + + + + $user/name + + + + + + ri:fullname + Full name + + + $user/fullName + + + + + + + + + + + + + + + + + + ri:disabled + + false + true + + + + + +