- JS7 has provision for two levels of integration with an Oracle DBMS:
- JS7 supports use of Oracle as the JS7 - Database.
- JS7 provides job templates for JS7 - JITL Database Jobs that can be used to access Oracle databases. For this scenario see the JS7 - How to make JITL Jobs connect to an Oracle database using Wallet® article.
For both scenarios users might prefer not to provide a user account and password for authentication with the DBMS from readable files.
- The use of passwords is considered insecure when passwords are stored in clear text in external files or in job parameters.
- JS7 enables JS7 - Use of Credential Store with JITL Jobs as an alternative way to store and to retrieve passwords.
- The Oracle Wallet® provides a credential store to connect to an Oracle database without specifying a user account and password from parameters or from readable files.
The Oracle Wallet® configuration is explained in the Oracle documentation:
- To configur clients to use the External Password Store see, for example, http://docs.oracle.com/cd/B19306_01/network.102/b14266/cnctslsh.htm#CBHEHGCE
- An introduction to the technical configuration in https://www.oracle.com/technetwork/database/enterprise-edition/wp-oracle-jdbc-thin-ssl-130128.pdf
- Or in a more condensed version from the Oracle-Base web site e.g. in https://oracle-base.com/articles/10g/secure-external-password-store-10gr2
- The location of the docs depends on the specific Oracle version in use.
Using Oracle Wallet® for JOC Cockpit
An Oracle Client installation is not required at run-time to allow a wallet to be used with the JOC Cockpit. However, users need an Oracle Client to set up and to configure the wallet.
- The wallet does not necessarily have to be created on the machine where the JOC Cockpit is located. The wallet preferably consists of a number of keystore and truststore files that can be copied from a remote machine to the server that hosts JOC Cockpit.
Typical commands for creating a wallet include:
Oracle JDBC Driver
- Check the Oracle JDBC Driver version that ships with the JS7 release - see JS7 - Database, chapter: Individual JDBC Driver Versions. A newer JDBC Driver might be available for download from Oracle.
- Oracle JDBC Drivers that ship for release 18c of the DBMS are reported to work. Previous Oracle JDBC Driver releases, for example 12c, are reported not to work with Oracle Wallet® when used by JS7. If in doubt use the Oracle JDBC Driver version that matches the version of the DBMS.
- To apply a version of the Oracle JDBC Driver that is different to the version that ships with JS7, see the JS7 - Database, chapter: Individual JDBC Driver Versions article.
Oracle PKI Libraries
- The Oracle PKI libraries are required and have to match the version of the Oracle DBMS and Oracle JDBC Driver.
- The .jar files are provided by Oracle for download and are available from an Oracle Client installation, for example from:
- For on premises installations, store the Oracle PKI libraries in the
JETTY_HOME/lib/user_libdirectory of the JOC Cockpit installation directory.
- When running JOC Cockpit containers for Docker® consider storing the Oracle PKI libraries in the
The JOC Cockpit is configured to connect to an Oracle database using Hibernate. In addition, the locations of Oracle configuration files and of the wallet have to be specified.
Hibernate hibernate.cfg.xml Configuration File
JETTY_BASE/resources/joc/hibernate.cfg.xml, see JS7 - Database.
The Hibernate configuration file may look like this:
- Note the empty elements that are used for the account and password. Do not delete these elements from the Hibernate configuration file.
- The connection URL specifies
js7as the key for an entry in the wallet.
TNS_ADMINURL parameter is used to specify the directory of the
tnsnames.oraconfiguration file. JDBC Connections usually do not require this configuration file as connection details (Listener, Service Name, Service ID) are specified in the URL. However, due to use of the
js7wallet key in the URL, it is preferable that connection details are managed in a
- In the example above this file is located in the
/home/js7/walletdirectory which is in fact the directory where the wallet is located. This location is not authoritative as the file can reside in any directory that is accessible to JOC Cockpit.
- Note that an
sqlnet.oraconfiguration file is not used with the above setup for a JDBC connection.
Oracle tnsnames.ora Configuration File
The following example is not authoritative but is intended to explain a few basic settings:
- Line 4: The name
JS7of the first entry in this file corresponds to the key for which credentials have been stored to the wallet.
- Line 5-9: The settings indicate the Listener's host and port and the database Service Name or Service ID.
Wallet Location for Java
The wallet location is specified in a Java define.
- Configure the location of the wallet by using a Java define like this:
-Doracle.net.wallet_location=/home/js7/wallet. This setting should point to the directory where the wallet files are located. This setting can be specified with one of the following options:
- specify the Java define with the
jettyOptionssetting of the
joc_install_xmlinstaller response file like this:
<entry key="jettyOptions" value="-Doracle.net.wallet_location=/home/js7/wallet"/>
- alternatively, for Unix, use one of the following options:
- specify the
JAVA_OPTIONSenvironment variable before running the JOC Cockpit
- create/modify and make executable the
/home/js7/.jocrcfile, assuming that
js7is the JOC Cockpit run-time account. This file should export the
JAVA_OPTIONSenvironment variable like this:
- add the
JAVA_OPTIONSenvironment variable to the
systemdservice file, as described in the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
- specify the
- Further details can be found in the JS7 - How To - Apply Java Options article.
- specify the Java define with the