[midPoint] Get the generated email address back to database

Ivan Noris ivan.noris at evolveum.com
Tue Nov 11 20:13:33 CET 2014


Hi Jason,


> Yes, the real database the CSV file is being dumped from, SQL Server
> 2008 R2, I have already loaded the jdbc driver for SQL Server in the
> rebuilt war so that is already taken care of,

Well, there are several possibilities:

1.
- use the CSV export from SQL DB
- create user with email address in midPoint
- provision to either specific SQL DB table OR LDAP/Active Directory
attribute, from which your SQL DB application will fetch the attribute.

This way you will have no direct connection to SQL DB and you'll keep
most of your current settings. But the SQL DB must fetch the data from
some intermediate table or LDAP/AD attribute.

2.
- use the CSV export from SQL DB
- create user with email address in midPoint
- provision directly to your SQL DB.

This is somehow "dirty" as you will provision to the same resource as
you indirectly use as your authoritative resource. For midPoint, attempt
to provision email attribute to the SQL DB will look like "add"
operation, but connector will discover existing user record in SQL DB
and modify it instead of adding. This requires 100% correct correlation
expression to automagically convert the add to modify.

3.
- use the SQL DB as both authoritative source for your users as well as
target resource for email address provisioning

This is the most clean solution, with no intermediate steps and no
magic. You just set the proper resource mappings (outbounds, inbounds).

The option "3" is recomended over the "2".

As for your SQL DB: connecting (as either source or target resource)
would require a connector. In midPoint, you have three possibilities:

a) DB Table connector: this is suitable for ONE table (no joins). Which,
I suppose is not your case...
b) ScriptedSQL connector: universal scriptable (Groovy) connector. This
can do anything, but you have to write your operations (add, modify,
delete, search etc.). The connector is just a glue that puts the
operation scripts to a form usable from midPoint.
c) custom SQL connector (must be written in Java)

Btw. you don't need to have JDBC drivers bundled in (custom build of)
midpoint. It's completely OK just drop the driver JAR files to
appropriate directory of your application server, in my case for
example, customer's "/opt/tomcat/lib" contains MySQL and MS SQL drivers
needed for the deployment.

Regards,
Ivan

-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer
  evolveum.com
  ___________________________________________
           "Idem per idem - semper idem Vix."




More information about the midPoint mailing list