By Sylvain Duloutre on Oct 06, 2014
Yet another common usage of OUD Transformations to transparently adapt some values during provisioning:
In this real use case, ODIP (Oracle Directory Integration Platform) is used to synchronize some SQL tables with OUD.
The country every user is living in is stored in an Oracle DB and is synchronized by DIP into the LDAP country attribute.
Unfortunatelly, the country name format expected by the applications on the Directory side differ from the one used on the DB side.
In this case, country name is stored in full in the DB (e.g. USA, FRANCE, ITALY) when apps that contact OUD expect standard country short form e.g. US, FR, IT. For administrative and political reasons within the enterprise, it is not possible to create a additional mapping table in the RDBMS that could be used by a SQL JOIN to return the correct values.
OUD Tranformation Framework can be used to address that integration problem: a so-called add inbound tranformation is invoked when a new entry is created and value mapping is applied on the incoming add request before it is processed by the OUD database engine. For sake of peformance, this transformation can be configured to trigger on udates originated from DIP only, using the network group mechanism.
To create a transformation that maps USA to US and France to FR, do the following:
First create the transformation with the appropriate mappings:
dsconfig create-transformation \
–set source-attribute:country=%country%(US,USA)(FR,France)(IT,Italy) \
–type add-inbound-attribute \
–transformation-name mapCountry \
Then stash this transformation to a Transformation Workflow element to be inserted ahead of local DB (userRoot):
dsconfig create-workflow-element \
–set enabled:true \
–set next-workflow-element:userRoot \
–set transformation:mapCountry \
–type transformations \
Then put the Transformation Workflow Element to the appropriate workflow so that it can be invoked:
dsconfig set-workflow-prop \
–workflow-name userRoot1 \
At that stage, appropriate values are automatically stored in OUD.