PingDirectory

DBSync example

PingDataSync provides a DBSync example between two endpoints consisting of a PingDirectory server source and a relational database management system (RDBMS), which will be used in this topic.

The entity-relational diagram for the normalized database schema is available in <server-root>/config/jdbc/samples/oracle-db/ComplexSchema.jpg, and is illustrated here:

Entry relation diagrams for schema tables.

Five tables are represented with their primary keys in bold. The entity relations and foreign keys are marked by the relationship lines. The illustration shows mapping to a custom object class on the directory server, while the "groups" table maps to a standard Lightweight Directory Access Protocol (LDAP) group entry with objectclass:groupOfUniqueNames.

Example directory server entries

The following example assumes that the directory server’s schema is configured to handle the mapped attributes. If configuring a database-to-directory Sync Pipe with a newly installed directory server, make sure that the schema has the correct attributeType and objectClass definitions in place. The definitions can be added in a custom 99-user.ldif file in the config/schema folder of the directory server, if necessary.

The following are the LDAP entries that are used in the synchronization example:

dn: accountid=0,ou=People,dc=example,dc=com
objectClass: site-user
firstName: John
lastName: Smith
accountID: 1234
email: jsmith@example.com
phone: +1 556 805 4454
address: 17121 Green Street
numLogins: 4
lastLogin: 20070408182813.196Z
enabled: true

dn: cn=Group 1,ou=Groups,dc=example,dc=com
objectClass: groupOfUniqueNames
description: This is Group 1
uniqueMember: accountID=0,ou=People,dc=example,dc=com
uniqueMember: accountID=1,ou=People,dc=example,dc=com