Database Management
SSL connections from DPA to Oracle monitored instance
This article addresses the issue where a user is unable to connect to DPA to monitor an Oracle instance that requires SSL connections.
First published date
Last published date
Overview
This article addresses the issue where a user is unable to connect to DPA to monitor an Oracle instance that requires SSL connections.
Product section
Resolution
See the appropriate section below:
- The Oracle monitored instance is running on Amazon Relational Database Service (RDS)
- The Oracle monitored instance is not running on Amazon RDS
If the Oracle monitored instance is running on Amazon RDS
Task 1 (RDS): Patch the Oracle JDBC driver (DPA 12.0 and earlier only)
If you are using DPA 12.0 or earlier and you need the TLS 1.1 or TLS 1.2 protocols, you must first patch the Oracle JDBC driver that DPA uses.
Note: Do not perform this task if you are using DPA 12.1 or later.
- Log in to your Oracle support account.
- Download Patch 19030178: ADD TLSV1.1 AND TLSV1.2 IN JDBC THIN from the Oracle site, and select Release: Oracle 11.2.0.4.0.
- Shut down DPA.
- Extract
p19030178_112040_Generic.zipinto a temporary directory. - Navigate to the
<temp_dir>\19030178\files\jdbc\libdirectory. - Extract the
ojdbc5.jarfile, which will result in anoraclesubdirectory. - Copy the entire
oracledirectory to<DPA_install_dir>\iwc\tomcat\webapps\iwc\WEB-INF\classes.The result should be:
<DPA_install_dir>\iwc\tomcat\webapps\iwc\WEB-INF\classes\oracle\net\nt\TcpsConfigure.class - Start DPA.
Task 2 (RDS): Export the Oracle certificate from the Oracle server
- Download the Amazon RDS root CA certificate.
- Convert it to DER format using
openssl.- For Windows, download openssl (© 2019 Slashdot Media, available at https://sourceforge.net, obtained on March 5, 2019).
- Open a command prompt as Administrator.
- Set
OPENSSL_CONF=<openssl_path>\bin\openssl.cfg
- In the
<openssl path>\bindirectory, issue the following command:openssl x509 -outform der -in rds-ca-2015-root.pem -out rds-ca-2015-root.der
- In the
<openssl path>\bindirectory, verify that there is a file called:rds-ca-2015-root.pem-out rds-ca-2015-root.der
Task 3 (RDS): Make DPA trust the Oracle certificate by adding it to the cert trust store
You have several options for importing the certificate.
Import the certificate using DPA
If you have DPA 2020.2 or later, use the DPA Trusted Certificate Management options to import the certificate to the DPA trust store.
The imported certificate will be available globally. DPA will be able to connect to any other database instance that accepts this server certificate. No further configuration is required.
Configure DPA to use a server certificate for a single database connection
DPA allows having an SSL server certificate configured for a single database connection. To enable this functionality, set the following properties in the Advanced connection properties field of the Registration Wizard or Update Connection Wizard:
- The path to a custom trust store where server certificate is stored
- The password
- The trust store type
For example: javax.net.ssl.trustStore=C:\certificates\oracle\oratruststore.jks;javax.net.ssl.trustStorePassword=changeit;javax.net.ssl.trustStoreType=JKS
Note: An SSL configuration for a single database connection overrides all default DPA SSL properties. To use the “Verify-Full” SSL mode, you must manually add the property oracle.net.ssl_server_dn_match=true. So, the full set of connection properties for enabling the “Verify-Full” SSL mode look like this:
javax.net.ssl.trustStore=C:\certificates\oracle\oratruststore.jks;javax.net.ssl.trustStorePassword=changeit;javax.net.ssl.trustStoreType=JKS;oracle.net.ssl_server_dn_match=true
Import the certificate using the Portecle utility
If you have DPA 2019.4 or earlier:- Download and install Portecle (© 2019 Slashdot Media, available at https://sourceforge.net, obtained on March 5, 2019).
-
Open the Portecle utility as an Administrator.
- Click File > Open keystore file, and then choose one of the following options:
- If you have a custom trust store configured in
system.propertiesin thejavax.net.ssl.trustStoreproperty, locate this trust store file. - For an embedded java cacerts trust store, go to one of the following locations and use the password
changeit.Note: If you use this option, you will have to reimport the certificate when you upgrade DPA.
- Windows:
<DPA home>/iwc/jre/lib/security/cacerts - Linux:
<DPA home>/iwc/jre_linux/lib/security/cacerts
- Windows:
-
For a DPA standard trust store, go to the following location and use the password
changeit:<DPA home>/iwc/tomcat/ignite_config/security/dpa-truststore.jks
- If you have a custom trust store configured in
- Click Tools -> Import Trusted Certificate -> Import server certificate, and locate your Oracle server certificate.
- Confirm that you trust the certificate and proceed with the import.
- After the certificate is imported, choose File > Save keystore.
- Close Portecle.
- Start DPA.
Import the certificate using the keytool command
If you have DPA 2019.4 or earlier:- Use the keytool utility in the following directory:
- Windows: <
dpa_home>\iwc\jre\bin\ - Linux: <
dpa_home>/iwc/jre_linux/bin/
- Windows: <
-
Run the following command:
<path_to_keytool>/keytool -import -keystore <path_to_trust_store> -alias <specify_alias_for_certificate> -file <path_to_Oracle_certificate> -storepass <password_to_trust_store>
The
<path_to_trust_store>and <password_to_trust_store>are the same as specified above, depending on the option you choose.
Task 4 (RDS): If you are using Java 1.8, set the Java policy jars to unlimited
If you are using strong encryption (key size is 256 or greater), then the Java policy jars must be set to unlimited. If you are using Java 1.8, complete the following steps. (This is enabled by default for later versions.)
- Go to one of the following locations:
- Windows:
<DPA_home>\iwc\jre\lib\security - Linux: <
DPA_home>/iwc/jre_linux/conf/security
- Windows:
- Open the
java.securityfile in a text editor. - Find the
crypto.policy=unlimitedrow and uncomment it. - Restart DPA for the changes to take effect.
Task 5 (RDS): Register the Oracle database instance in DPA
When you register the database instance in DPA:
- On Step 2 of the database registration wizard, select the TNS Connect Descriptor option.
-
In the Connect Descriptor field, specify
tcpsas the protocol. For example:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=<host_name>)(PORT=<port>))(CONNECT_DATA=(SERVICE_NAME=<service_name>)))
If the Oracle monitored instance is NOT running on Amazon RDS
Task 1 (non-RDS): Create a self-signed wallet and export it as a certificate
- On the Oracle server, create an empty wallet with auto-login enabled:
>orapki wallet create -wallet "<wallet_location_path>" -auto_login
Two files are created in the specified directory:
cwallet.ssoandewallet.p12 -
Add a self-signed certificate to the wallet (a new pair of private/public keys will be created):
>orapki wallet add -wallet "<wallet_location_path>" -dn "CN=<your_server_name>" -keysize 2048 -self_signed -sign_alg sha -validity 3650 -pwd <your_wallet_password>
-
Export the wallet as a certificate:
>orapki wallet export -wallet "<wallet_location_path>” –dn "CN=< your_server_name >" –cert "<certificate_location_path>\<your_certificate_name>.cert"
Task 2 (non-RDS): Configure your Oracle server to enable SSL connection
-
Enter the following settings in the
listener.orafile:SSL_CLIENT_AUTHENTICATION = FALSE WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = <wallet_location_path>) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = <your_host>)(PORT = <your_tcp_port>)) ) (DESCRIPTION = (ADDRESS = (PROTOCOL = TCPS)(HOST = <your_host>)(PORT = <your_tcps_port>)) )
-
Enter the following settings in the
sqlnet.orafile:SQLNET.AUTHENTICATION_SERVICES= (BEQ, TCPS, NTS) SSL_VERSION = 0 SSL_CLIENT_AUTHENTICATION = FALSE WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = <wallet_location_path>) ) ) SSL_CIPHER_SUITES= (SSL_RSA_WITH_AES_128_GCM_SHA256, SSL_RSA_WITH_AES_128_CBC_SHA256, SSL_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, SSL_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256) NAMES.DIRECTORY_PATH = (TNSNAMES, ONAMES, HOSTNAME)
-
Enter the following settings in the
tnsnames.orafile:ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = <your_host>)(PORT = <your_tcp_port>)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) ) LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = <your_host>)(PORT = <your_tcp_port>)) ORCLSSL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCPS)(HOST = <your_host>)(PORT = <your_tcps_port>)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL) ) ) LISTENER_ORCLSSL = (ADDRESS = (PROTOCOL = TCPS)(HOST = <your_host>)(PORT = <your_tcps_port>))
-
Test your SSL connection to the Oracle instance using sqlplus client:
>sqlplus "<login>/<password>@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCPS)(HOST = <your_host>)(PORT = <your_tcps_port>)) (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = ORCL)))"
Task 3 (non-RDS): Change the DPA ojdbc5 driver
To use TLS 1.2 protocol, you must first change the standard DPA ojdbc5 driver.
-
To be able to connect to an Oracle 12.2 instance, download ojdbc8.jar driver from:
https://www.oracle.com/technetwork/d...ex-091264.html (© 2019 Oracle, available at https://www.oracle.com, obtained on March 5, 2019)
- Follow the instructions in Replace the Oracle JDBC driver with a different version in DPA
Task 4 (non-RDS): Make DPA trust the Oracle certificate by adding it to the cert trust store
You have several options for importing the certificate.
Import the certificate using DPA
If you have DPA 2020.2 or later, use the DPA Trusted Certificate Management options to import the certificate to the DPA trust store.
The imported certificate will be available globally. DPA will be able to connect to any other database instance that accepts this server certificate. No further configuration is required.
Configure DPA to use a server certificate for a single database connection
DPA allows having an SSL server certificate configured for a single database connection. To enable this functionality, set the following properties in the Advanced connection properties field of the Registration Wizard or Update Connection Wizard:
- The path to a custom trust store where server certificate is stored
- The password
- The trust store type
For example: javax.net.ssl.trustStore=C:\certificates\oracle\oratruststore.jks;javax.net.ssl.trustStorePassword=changeit;javax.net.ssl.trustStoreType=JKS
Note: An SSL configuration for a single database connection overrides all default DPA SSL properties. To use the “Verify-Full” SSL mode, you must manually add the property oracle.net.ssl_server_dn_match=true. So, the full set of connection properties for enabling the “Verify-Full” SSL mode look like this:
javax.net.ssl.trustStore=C:\certificates\oracle\oratruststore.jks;javax.net.ssl.trustStorePassword=changeit;javax.net.ssl.trustStoreType=JKS;oracle.net.ssl_server_dn_match=true
Import the certificate using the Portecle utility
If you have DPA 2019.4 or earlier:- Download and install Portecle (© 2019 Slashdot Media, available at https://sourceforge.net, obtained on March 5, 2019).
-
Open the Portecle utility as an Administrator.
- Click File > Open keystore file, and then choose one of the following options:
- If you have a custom trust store configured in
system.propertiesin thejavax.net.ssl.trustStoreproperty, locate this trust store file. - For an embedded java cacerts trust store, go to one of the following locations and use the password
changeit.Note: If you use this option, you will have to reimport the certificate when you upgrade DPA.
- Windows:
<DPA home>/iwc/jre/lib/security/cacerts - Linux:
<DPA home>/iwc/jre_linux/lib/security/cacerts
- Windows:
-
For a DPA standard trust store, go to the following location and use the password
changeit:<DPA home>/iwc/tomcat/ignite_config/security/dpa-truststore.jks
- If you have a custom trust store configured in
- Click Tools -> Import Trusted Certificate -> Import server certificate, and locate your Oracle server certificate.
- Confirm that you trust the certificate and proceed with the import.
- After the certificate is imported, choose File > Save keystore.
- Close Portecle.
- Start DPA.
Import the certificate using the keytool command
If you have DPA 2019.4 or earlier:- Use the keytool utility in the following directory:
- Windows: <
dpa_home>\iwc\jre\bin\ - Linux: <
dpa_home>/iwc/jre_linux/bin/
- Windows: <
-
Run the following command:
<path_to_keytool>/keytool -import -keystore <path_to_trust_store> -alias <specify_alias_for_certificate> -file <path_to_Oracle_certificate> -storepass <password_to_trust_store>
The
<path_to_trust_store>and <password_to_trust_store>are the same as specified above, depending on the option you choose.
Task 5 (non-RDS): If you are using Java 1.8, set the Java policy jars to unlimited
If you are using strong encryption (key size is 256 or greater), then the Java policy jars must be set to unlimited. If you are using Java 1.8, complete the following steps. (This is enabled by default for later versions.)
- Go to one of the following locations:
- Windows:
<DPA_home>\iwc\jre\lib\security - Linux: <
DPA_home>/iwc/jre_linux/conf/security
- Windows:
- Open the
java.securityfile in a text editor. - Find the
crypto.policy=unlimitedrow and uncomment it. - Restart DPA for the changes to take effect.
Task 6 (non-RDS): Register the Oracle database instance in DPA
When you register the database instance in DPA:
- On Step 2 of the database registration wizard, select the TNS Connect Descriptor option.
- In the Connect Descriptor field, specify
tcpsas the protocol. For example:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=<host_name>)(PORT=<port>))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = <service_name>)))Alternatively, you can use:
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCPS)(HOST = <your_host>)(PORT = <port>))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = <service_name>))) -
If you imported an Oracle certificate to the DPA standard trust store, click the Advanced Connection Properties link and provide the path to dpa-truststore in the Connection Properties field:
javax.net.ssl.trustStore=<DPA_install_dir>/iwc/tomcat/ignite_config/security/dpa-truststore.jks;javax.net.ssl.trustStoreType=JKS;javax.net.ssl.trustStorePassword=changeit
Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment. You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.