Sun[TM] Identity Manager 8.0 Installation Guide |
Appendix B
Configuring Data Sources for Identity ManagerThis appendix provides procedures for creating data sources for Identity Manager in the following sections:
Configuring a WebSphere Data Source for Identity ManagerUse the following information to configure a WebSphere Data Source for Identity Manager. this section includes:
Servlet 2.3 Data Sources
As of the Identity Manager 6.0 Release, the deployment descriptor in the WEB-INF/web.xml file refers to Servlet 2.3. Because of this, the Identity Manager web application can no longer be used with a WebSphere Application Server Version 4 Data Source.
Use the following steps to configure a WebSphere data source for Identity Manager:
These steps are discussed in detail below.
Configuring a JDBC Provider
Use WebSphere's administration console to configure a new JDBC Provider.
- Click the Resources tab in the left pane to display a list of resource types.
- Click JDBC then JDBC Providers to display a table of configured JDBC providers.
- Click the New button above the table of configured JDBC providers.
- Select from the list of JDBC database types, provider types, and implementation types. Optionally modify the Name and Description fields.
Oracle, Oracle JDBC Drive, and Connection pool Data Source will be used for this example.
Click Next.
- Enter database classpath information. The contents of the Enter database class path information page may vary, depending on what you selected in the previous step.
- Complete any other fields as required. The selected database, provider, and implementation types determine which fields are displayed. Click Next when you have completed the dialog.
- A summary page is displayed. When you are finished reviewing your selections, click the Finish button at the bottom of the table. Click the Save link to keep your definition. The right pane should display the provider you added.
To configure a data source that uses this JDBC provider, see Point the Identity Manager Repository to the Data Source.
Configuring a WebSphere JDBC Data Source
Use WebSphere's Administrative Console to define a data source with an existing JDBC Provider.
Configure the Authentication Data
Before you can finish configuring the data source, you must configure authentication data. These aliases contain credentials that are used to connect to the DBMS.
- Click Security > Secure administration, applications, and infrastructure.
- Under Authentication, click Java Authentiation and Authorization Service configuration > J2C authentication data. The JAAS - J2C authentication data panel is displayed.
- Click New.
- Enter a unique alias, a valid user ID, a valid password, and a short description (optional). The user ID must be valid on the target database.
- Click OK or Apply. No validation for the user ID and password is required.
- Click Save.
Configure the Data Source
- Click Resources > JDBC Providers > Your_JDBC_Provider_Name > Data Sources tab in the left pane to display the Data sources page. The right pane displays a table of data sources configured for use with this JDBC provider. Click the New button above the table of data sources.
- Use the wizard provided to configure the general properties for the new data source. Note the following on the Enter basic data source information page:
- The JNDI Name is the path to the DataSource object in the directory service. You must specify this same value as the -f argument in
setRepo -tdbms -iinitCtxFac -ffilepath.- Select the Component-managed Authentication Alias that you created in Configuring a JDBC Provider. These are the credentials that will be used to access the DBMS (to which this DataSource points).
Click Next when you have configured this panel. The Create New JDBC provider page is displayed.
- Configure the database-specific properties for this data source as needed. Refer to the online help for information about the available properties.
Make sure Use this data source in container-managed persistence (CMP) is unchecked. Identity Manager does not use Enterprise Java Beans (EJBs). Click Next to goto the summary page.
- Click Finish to save your data source.
Configure the Data Source in a Websphere Cluster
When configuring the data source in clustered WebSphere environments, configure it at the cell level. This allows the data source to be accessed from all nodes in the cell.
To configure this use the -D $propertiesFilePath option where $propertiesFilePath contains:
java.naming.provider.url=iiop://localhost:jndi_port/
or:
-u iiop://localhost:jndi_port/
To determine the JNDI port to specify, examine the WebSphere configuration.
- In the WebSphere administration console, navigate to Servers > Application Servers > Your_Server > Ports.
- Look at the BOOTSTRAP_ADDRESS property. Use the specified port in the java.naming.provider.url property.
Point the Identity Manager Repository to the Data Source
Use the following steps to point the repository to the newly created data source.
- Set the WSHOME environment variable to point to your Identity Manager installation; for example:
export WSHOME=$WAS_HOME/installedApps/idm.ear/idm.war
where $WAS_HOME is the WebSphere home directory, such as /usr/WebSphere/AppServer
- Make sure that the JAVA_HOME environment variable is set correctly; for example:
export JAVA_HOME=$WAS_HOME/java
- Make sure that the Java executable is in your path; for example:
export PATH=$JAVA_HOME/bin;$PATH
- Make sure the classpath is pointing to the WebSphere properties directory. For example
export CLASSPATH=$WAS_HOME/properties
- Change to the $WSHOME/bin directory.
- (For SQLServer only): Install JTA support:
- Copy the sqljdbc.dll file located in the SQLServer JTA directory to the SQL_SERVER_ROOT/binn directory of the SQLServer database server.
- From the database server, use the ISQL or OSQL utility to run the instjdbc.sql script, which is also found in the SQLServer JTA directory. The following examples illustrate the use of these utilities:
isql -Usa -psa_password -Sserver_name
-ilocation\instjdbc.sql
osql -E -ilocation\instjdbc.sql- Archive a copy of the existing ServerRepository.xml file, in case you need to revert. By default, this file is located in $WSHOME/WEB-INF.
- Point the repository to the new location. For example:
lh -Djava.ext.dirs="$JAVA_HOME/jre/lib:$JAVA_HOME/jre/lib/ext: $WASHOME/lib:$WASHOME/:$WASHOME/runtimes" setRepo
-Uusername
-Ppassword
-toracle -icom.ibm.websphere.naming.WsnInitialContextFactory -fDataSourcePath -n -oIn the above example the DataSourcePath might be jdbc/jndiname. The -Djava.ext.dirs option adds all of the JAR files all of the JAR files in WebSphere's lib/ and java/jre/lib/ext/ directories to the CLASSPATH. This is necessary in order for the setRepo command to run normally.
Change the -f option to match the value you specified for the JNDI Name field when configuring the data source. See setRepo Reference for more information about this command.
- In the RepositoryConfiguration configuration object, set the connectionPoolDisable attribute to true.
<RepositoryConfiguration connectionPoolDisable='true'>
This setting prevents WebSphere from sending extraneous warnings to the SystemOut.log file. For more information, see http://www-1.ibm.com/support/docview.wss?uid=swg21121449
- Restart WebSphere to pick up changes. (This also restarts the system.)
Specifying Additional JNDI Properties to the setRepo Command
The setRepo command provides an option that allows you to specify an arbitrary set of properties. The -D $propertiesFilePath option allows you to specify any number of settings, including vendor-specific properties not specified by JNDI, by including them in a properties file that you create.
For example, to specify a different JNDI port number, include a line like the following in your properties file:
java.naming.provider.url=iiop://localhost:2909
Configuring a WebLogic Data Source for Identity ManagerUse the following procedure to update the repository configuration in Identity Manager to point to a WebLogic Data Source. This section includes:
Create a WebLogic Data Source
This example procedure describes configuration steps to use an Oracle database driver. Specific entries you make will differ, depending on your database type.
Create a Connection Pool
- Log in to the WebLogic Administrator Web console (by default, http://localhost:7001/console/).
- Expand the Services folder for the domain located in the navigation (left) pane.
- Expand the JDBC folder.
- Expand the Connection Pools folder.
- In the right pane (JDBC Connection Pools), click Configure a new JDBC Connection Pool.
- For Database Type select Oracle. You can use any of the applicable types. Note that drivers must be installed in order to use them.
- Select an applicable drive in the Database Driver selection box. In this example, select Oracle’s Driver (Thin).
- Click Continue.
- Configure the JDBC driver as follows:
- Click Continue.
- Test the database connection on this page or click Skip this step. You may need to add additional properties depending on your installation. See the administrator’s guide for your target database.
- Click Create and deploy.
- Configure connection settings for this connection pool:
Example Connection Settings:
Initial Capacity:20
Maximum Capacity:100
Capacity Increment: 10
Statement Cache Type: LRU
Statement Cache Size: 20
Create a JDBC Data Source
- Expand the Services folder for the domain located in the navigation (left) pane.
- Expand the JDBC folder.
- Expand the Data Source folder.
- In the right pane (JDBC Data Sources), click Configure a new JDBC Data Source.
- Configure the JDBC Data Source as follows:
- Click Continue.
- Select the connection pool from part A. This allows an application to get a connection from the underlying connection pool.
- Click Continue.
- Select the servers on which you want deploy the new data source.
- Click Create.
Point the Identity Manager Repository to the Data Source
- Set the WSHOME environment variable to point to your Identity Manager installation; for example:
set WSHOME=C:\bea\user_projects\domains\mydomain\applications\idm
- Make sure that the JAVA_HOME environment variable is set correctly; for example:
set JAVA_HOME=C:\j2sdk1.5
- Make sure that your chosen database drivers are installed for you Weblogic Server. See the Weblogic documentation for further information. In this example, the Oracle drivers and classes12.jar are installed in following directory:
WebLogicHome\server\lib
- Include weblogic.jar in your CLASSPATH. On Windows, enter:
set CLASSPATH=%CLASSPATH%;WeblogicHome\server\lib\weblogic.jar
For example:
set CLASSPATH=%CLASSPATH%;c:\bea\weblogic81\server\lib\weblogic.jar
- Change to the %WSHOME directory.
- Remove the j2ee.jar file from WEB-INF\lib\ after making a backup.
- Change directory to the %WSHOME\bin directory
- Point the repository to the new location. For example:
lh setRepo -v -tOracle -iweblogic.jndi.WLInitialContextFactory -fDatasourceName -u"t3:Server:Port" -U"Username" -P"Password"
For example:
lh setRepo -v -tOracle -iweblogic.jndi.WLInitialContextFactory -fMyOraDataSource -u"t3://localhost:7001/" -U"weblogic" -P"weblogic"
- If there are no reported errors, restart WebLogic to pick up the changes. (This also restarts the Identity Manager system.)
Configuring a Sun Application Server Data Source for Identity ManagerRefer to the documentation for the Sun Application Server for information about creating and configuring a data source.
Use the following steps to point the repository to an Application Server data source.
- Remove the j2ee.jar file from the $WSHOME/WEB-INF/lib directory. This file causes conflicts with the j2ee.jar that ships with Application Server.
- If you are not using default host name and port, then you must add the following flags to your JAVA_OPTS:
-Dorg.omg.CORBA.ORBInitialHost=Hostname -Dorg.omg.CORBA.ORBInitialPort=Port
The default values for Hostname and Port are localhost and 3700, respectively.
- Set your CLASSPATH to include the following Application Server JAR files (in order):
SAS_INSTALL_DIR/lib/appserv-admin.jar
SAS_INSTALL_DIR/lib/appserv-rt.jar
SAS_IMQ_DIR/lib/imq.jar
SAS_INSTALL_DIR/lib/j2ee.jar
- Set your CLASSPATH to include the JAR file or files required for your JDBC connection. For example:
DataDirect JDBC Driver for Oracle
- Change directories to $WSHOME/WEB-INF.
- If you are using any driver other than Data Direct JDBC Driver for Oracle that ships with Sun Application Server, connect to the data source with the following command:
lh setRepo -v -tType -iInitContextFactory -fDataSourcePath -uiiop://hostname:port
For example:
lh setRepo -v -tOracle -icom.sun.enterprise.naming.SerialInitContextFactory -fjdbc/idm
-uiiop://localhost:3700
- The Data Direct JDBC Driver for Oracle that ships with Sun Application Server is “locked” so that it works only with embedded applications. That is, the driver works only within the web container. As a result, to use the lh command, you must create a separate connection.
Configuring a JBoss Data Source for Identity ManagerRefer to the documentation for the JBoss application server for detailed information about creating and configuring a data source.
Create the Data Source
- Copy the JDBC driver classes for your database type to the lib directory of your application server, such as JBossInstallDir\server\default\lib.
- Create a data source configuration file. These end in -ds.xml. Example files can be found in JBossInstallDir\docs\examples\jca. The file should configure a local transaction data source.
- Copy the configuration file to the JBossInstallDir\server\default\deploy directory on your application server.
Point Identity Manager to the Data Source
- Make sure that the WSHOME and JAVA_HOME environment variables are set correctly.
- Connect to the data source with the following command:
- Point the repository to the data source. For example:
lh setRepo -v -tType -iInitContextFactory -fDataSourcePath
For example:
lh setRepo -v -tOracle -iorg.jnp.interfaces.NamingContextFactory -fjava:DatasourceName
- Start the JBoss server.
Configuring an Oracle Application Server Data Source for Identity ManagerData source configuration can be performed entirely in the Oracle Enterprise Manager 10g Application Server Control Console. The online help in the Application Server Control Console provides useful information on data source settings.
Use the following procedure to update the repository configuration in Identity Manager to point to an Oracle Application Server Data Source. This section includes:
Create an Oracle Application Server Data Source
This example procedure describes configuration steps to use an Oracle database driver. Specific entries you make will differ, depending on your database type.
Create a Connection Pool
- Log in to the Oracle 10g Application Server Control console (by default, http://localhost:Port/em).
- On the Cluster Topology page select View By Application Servers
- Click the OC4J home link, then on the OC4J:home page click the Administration link.
- Click the Go to Task icon for Services -> JDBC Resources (Create/delete/view data sources and connection pools).
- Under Connection Pools, click the Create button
- Select idm from Application drop-down list
- Select the New Connection Pool radio button, then click Continue.
- On the Create Connection Pool page, configure the new connection pool as follows:
- Click the Test Connection button to ensure connectivity.
- You may need to add additional properties on the Attributes and Properties pages depending on your installation. See the administrator's guide for your target database.
- Click the Finish button.
Create a JDBC Data Source
- On the JDBC Resources page, under Data Sources, click the Create button:
- Select idm from Application drop-down list
- Select the Managed Data Source radio button
- Click the Continue button
- On the Create Data Source - Managed Data Source page, configure the JDBC Data Source as follows:
It is not necessary to enter Username and Cleartext Password information in the Credentials section unless you need to override the information already provided in the connection pool configuration.
- Click the Finish button.
Point the Identity Manager Repository to the Data Source
- Set the WSHOME environment variable to point to your Identity Manager installation; for example:
set WSHOME=C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\idm
- Make sure that the JAVA_HOME environment variable is set correctly; for example:
set JAVA_HOME=C:\product\10.1.3.1\OracleAS_1\jdk
- Make sure that your chosen database drivers are installed for your Oracle Application Server. Set the class path to include these files. See the Oracle Application Server documentation for further information.
- Include OLITE40.JAR in your CLASSPATH. On Windows, for example, enter:
set CLASSPATH=%CLASSPATH%;C:\product\10.1.3.1\OracleAS_1\MOBILE\Sdk\bin\OLI TE40.JAR;
- Change to the %WSHOME% directory.
- Make a backup of WEB-INF\ServerRepository.xml file and move it out of the directory. This is your direct connection setup from the original install of Identity Manager.
- Change directory to the %WSHOME%\bin directory
- Point the repository to the new location using the Identity Manager lh command. For example:
lh setRepo -v -tOracle -icom.evermind.server.ApplicationClientInitialContextFactory -fDatasourceName -n -o ServerRepository.xml
- If there are no reported errors, restart your Oracle Application Server to pick up te changes. (This also restarts the Identity Manager system.)