Integrate OpenIDM with Oracle DB
Posted in ForgeRock, OpenIDM, Technical on May 16th, 2012 by OpenIDM blog – Comments OffSome questions have popped up in the OpenIDM mailing list regarding integration with various database packages, and with a little help from one of our skilled engineers, here is a little cookbook recipe on how to swiftly and easily integrate with Oracle DB for your provisioning purposes.
Currently there is no public JSON configuration file available for Oracle DBs since the database schemas are different, however ForgeRock provides sample configuration files at http://sources.forgerock.org/browse/openidm/trunk/openidm-zip/src/main/resources/samples/provisioners
One of OpenIDMs governing principles is to be modular and it uses OSGi as its modularity framework so In order to make the DB connectors work you need an OSGi enabled JDBC driver for your Database. The downside is that unfortunately there are not many driver jars ready for OSGi so you need to repack your own.
There is a how-to for Oracle here: https://bugster.forgerock.org/jira/browse/OPENIDM-580
This also works for MS SQL JDBC or http://sourceforge.net/projects/jtds/files/ and deploy to the OpenIDM bundle folder. If you have the proper active JDBC driver then you can use any of these:
http://openicf.forgerock.org/connectors/db.html connectors.
openicf-scriptedsql-connector-1.1.0.0.jar openicf-scriptedsql-connector-1.1.0.1-SNAPSHOT.jar openicf-databasetable-connector-1.1.0.0-SNAPSHOT.jar openicf-db2-connector-1.1.0.0-SNAPSHOT.jar openicf-mysqluser-connector-1.1.0.0-SNAPSHOT.jar openicf-oracle-connector-1.1.0.0-SNAPSHOT.jarDownload the one you need to /openidm/connectors folder and restart OpenIDM. There is a CLI tool to generate the configuration file;
./cli.sh configureconnector oracle Using boot properties at /openidm/conf/boot/boot.properties 0. XML version 1.1.0.0 1. org.forgerock.openicf.scriptedsql.ScriptedSQLConnector version 1.1.0.0 2. Oracle Connector version 1.1.0.0-SNAPSHOT 3. CSV File Connector version 1.1.0.0 4. LDAP Connector version 1.1.0.0 5. Exit Select [0..5]: 2 Edit the configuration file and run the command again. The configuration was saved to /openidm/temp/provisioner.openicf-oracle.jsonYou can edit the provisioner.openicf-oracle.json and run the command again. It will connect to your Oracle DB server and populate the schema part of the config file. If you connect to a DB Table then:
./cli.sh configureconnector myOracleDBTable Using boot properties at /openidm/conf/boot/boot.properties 0. XML version 1.1.0.0 1. org.forgerock.openicf.scriptedsql.ScriptedSQLConnector version 1.1.0.0 2. Oracle Connector version 1.1.0.0-SNAPSHOT 3. CSV File Connector version 1.1.0.0 4. LDAP Connector version 1.1.0.0 5. Database Table Connector version 1.1.0.0-SNAPSHOT 6. Exit Select [0..6]: 5 Edit the configuration file and run the command again. The configuration was saved to /openidm/temp/provisioner.openicf-myOracleDBTable.jsonSo with the above done – its time to start CRUD:ing. Happy CRUD!








This is a big milestone for ForgeRock and the OpenAM project, an open source WebSSO, Authentication, Authorization, Federation and Entitlements solution. After months of development (a few more than we anticipated), we’ve finally released OpenAM 10.0.0, a major version of the product.