000019263 - How does ClearTrust determine what JDBC driver to use?

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000019263
Applies ToRSA ClearTrust
IssueHow does ClearTrust determine which JDBC driver to use?
ResolutionThe JDBC driver used by a ClearTrust server is derived from the directive, securecontrol.db.driver, as defined in: CLEARTRUST_HOME/securecontrol//conf/Default.conf. The default definition of this directive is based on the database [either Oracle or Sybase] specified during the ClearTrust installation, as follows: For Oracle, securecontrol.db.driver will be defined as sirrus.entitlements.common.oracle.OracleJDBCDriver For Sybase, securecontrol.db.driver will be defined as com.sybase.jdbc2.jdbc.SybDriver The value of securecontrol.db.driver is internally used by ClearTrust to register the JDBC driver (by calling a method that will import the Java class that corresponds to the specified JDBC driver object). ClearTrust will search each location included in the CLASSPATH variable definition when attempting to import this class. ClearTrust will stop processing the CLASSPATH when the class is found and successfully imported. The CLASSPATH variable is automatically defined by ClearTrust. During the ClearTrust installation, the .profile (for Bourne Shell) or .cshrc (for C Shell) for the ClearTrust owner is modified so a script named secctrl_envs.sh or secctrl_envs.csh is executed during login. The secctrl_envs.* scripts are designed to set up a shell environment for the ClearTrust owner that reflects the given ClearTrust installation. Included in this shell environment is a definition for the CLASSPATH variable. ClearTrust will define the CLASSPATH variable such that it contains the JDBC driver class that corresponds to the database that is being used, based upon the value of the securecontrol.db.url directive; if securecontrol.db.url begins with jdbc:oracle, then Oracle is assumed; if securecontrol.db.url begins with jdbc:sybase, then Sybase is assumed; if securecontrol.db.url does not begin with either string, such as when a default ClearTrust installation has been performed, then a default driver will be used. Based upon this logic, the secctrl_envs scripts will define the CLASSPATH as follows: For Oracle, the script will append either "$DB_HOME/jdbc/lib/classes12.zip" or $DB_HOME/classes12.zip to your CLASSPATH definition - if such a file exists. If neither file exists, the script will append a default value of: $CLEARTRUST_HOME/securecontrol/classes/classes12.zip to your CLASSPATH definition For Sybase, the script will append "$CLEARTRUST_HOME/securecontrol/classes/jconn2.jar" to your CLASSPATH definition. If neither Oracle or Sybase were matched by the secctrl_envs script, the script will define the LD_LIBRARY_PATH variable to include a default, platform dependant, value. How do I instruct ClearTrust to use a Type 2 or a Type 4 driver? For Type 2 drivers, define the securecontrol.db.url directive as jdbc:oracle:oci8. In this scenario, ClearTrust will construct the complete JDBC URL by appending your database service name (as derived from securecontrol.db.instance) to the value of securecontrol.db.url.  For example, "jdbc:oracle:oci8@CT". For Type 4 drivers, define the securecontrol.db.url directive as jdbc:oracle:thin@hostname:port:instance. In this case, it is necessary to provide the hostname, port and instance in the definition of the securecontrol.db.url directive.
Legacy Article IDa7518