Encrypting your database connection
This topic describes the steps for encrypting your database connection to TrueSight Server Automation.
- Enabling or disabling encryption in a SQL Server database connection
- Enabling TCPS encryption in Oracle database connection
- Related topics
Enabling or disabling encryption in a SQL Server database connection
TrueSight Server Automation does not support using an encrypted Microsoft SQL Server database connection at the time of installation or upgrade. However, after the product is installed or upgraded successfully, TrueSight Server Automation can use an encrypted connection to communicate with the Microsoft SQL Server database.
Enabling encryption in a SQL Server database connection using third-party CA certificates
Depending on your company policy, you can choose any third-party certificate authority (CA) to issue certificates for Server Authentication.
Step 1: Install the certificate on SQL Server
You must first install the third-party CA certificate on the SQL database server.
- In the Microsoft Management Console (MMC), select the File menu and click Add/Remove Snap-in.
- In the Add/Remove Snap-in dialog box, click Add.
- In the Available snap-ins box on the left, click Certificates, and then click Add.
- Select the Computer account option and click Next. In the Certificates snap-in dialog box, click Computer account, and then click Finish.
- Click Close.
- In the Add/Remove Snap-in dialog box, click OK.
- In the Certificates snap-in, expand Certificates, right-click Personal, point to All Tasks, and then click Import.
- Use Certificate Import wizard to import the Public key certificate.
- Complete the Certificate Import Wizard, to add a certificate to the computer.
- Right-click the imported certificate under Personal, point to All Tasks, and then click Manage Private Keys. In the Security dialog box, add read permission for the user account used by the SQL Server service account.
Step 2: Configure the SQL Server to accept encrypted connections
To configure the SQL Server to accept encrypted connections, you must be running SQL Server Configuration Manager with an account that has local administrator privileges.
- In SQL Server Configuration Manager, expand SQL Server Network Configuration, right-click Protocols for the server instance you are using, and select Properties.
- On the Certificate tab, select the desired certificate from the drop down for the Certificate box.
- On the Flags tab, in the ForceEncryption box, select Yes, and then click OK to close the dialog box.
- Start the Microsoft Management Console (MMC),
- Expand Personal and then right-click Certificates, point to All Tasks, click Manage Private Keys, select Add User account and provide "NT Service\MSSQLSERVER" user and select Check option and then click OK.
- Restart the SQL Server service.
Step 3: Configure the TrueSight Server Automation application server
Perform the following steps on all your TrueSight Server Automation application servers:
- Obtain the third-party CA certificate of Database Server and copy to the the TrueSight Server Automation application server in a temporary location.
- From the command prompt navigate to <BMC_Installation_Path>\NSH\JRE|bin
Enter the following command to import the public key certificate file:
keytool -import -v -trustcacerts -alias <dbserver_hostname> -file <path_to_public_key> -keystore <app_server_cacerts>- When prompted for a password, enter the password that is set for JRE cacerts keystore in TrueSight Server Automation. The default password set for cacerts is typically changeit.
Connect to the application server and change the global.properties file with the following URL: url=jdbc\:sqlserver\://;serverName\=<FQDN_db_server>;port\=<port_number>;DatabaseName\=<database_name>;SelectMethod\=cursor;encrypt\=true;trustServerCertificate\=false
Variable
Description
<FQDN_db_server>
Fully qualified domain name of the SQL database server
<database_name>Database name
- Restart the application server.
Step 4: Configure the TrueSight Server Automation PXE server
- Perform the following steps on all your TrueSight Server Automation PXE servers.
- From the command prompt navigate to <BMC_Installation_Path>\NSH\JRE|bin and enter the following command to import the public key certificate file in cacerts.
keytool -import -v -trustcacerts -alias <dbserver_hostname> -file <path_to_public_key> -keystore <pxe_server_cacerts>For example:
keytool -import -v -trustcacerts -alias bmc-pun-123456 -file "C:\SSL\security_certificate.pubkey.cer" -keystore "C:\Program Files\BMC Software\BladeLogic\pxe\jre\lib\security\cacerts" - When prompted for a password, enter the password that is set for JRE cacerts keystore in TrueSight Server Automation. The default password set for cacerts is typically changeit.
Connect to the Application server and change the global.properties file for PXE server with the following URL:
url=jdbc\:sqlserver\://;serverName\=<FQDN_db_server>;port\=<port_number>;DatabaseName\=<database_name>;SelectMethod\=cursor;encrypt\=true;trustServerCertificate\=false<FQDN_db_server>
Fully qualified domain name of the SQL database server
<database_name>Database name
For example:
url=jdbc\:sqlserver\://;serverName\=bmc-pun-123456.bmc.com;port\=1433;DatabaseName\=db_encrpted;SelectMethod\=cursor;encrypt\=true;trustServerCertificate\=false- Restart the PXE server.
Disabling encryption in a SQL Server database connection
To disable encryption in your SQL Server database connection, perform the following steps on your SQL Server database:
- In SQL Server Configuration Manager, expand SQL Server Network Configuration, right-click Protocols for the server instance you are using, and select Properties.
- On the Certificate tab, select the certificate which is currently in use from the drop down in the Certificate box, and then click Clear.
- On the Flags tab, in the ForceEncryption box, select No, and then click OK to close the dialog box.
- Restart the SQL Server service.
Enabling TCPS encryption in Oracle database connection
Step 1: Configure Oracle database to accept encrypted connection
For detailed steps to enable the TCPS encryption on your Oracle database server, using Oracle Advanced Security, refer to the Oracle documentation.
See the following example procedure for encrypting the connection to your Oracle database.
Example: Steps to encrypt the connection to an Oracle database
- Log on to your Oracle database server.
- Navigate to <ORACLE_HOME>/NETWORK/ADMIN, where <ORACLE_HOME> is the path to the Oracle Home directory.
Edit the sqlnet.ora file and add or replace values of the parameters given below. Note that you might need to uncomment the lines containing the parameters in the sqlnet.ora file.
SSL_CIPHER_SUITES = <SSL_Cipher_Suite>
SSL_VERSION = 1.2
SQLNET.ENCRYPTION_SERVER = REQUIRED
SQLNET.ENCRYPTION_TYPES_SERVER= (AES256)
SQLNET.CRYPTO_SEED = <10-70_Random _Characters>Modify the SSL_CIPHER_SUITES and SQLNET.CRYPTO_SEED parameters by replacing the variables mentioned in the table below as described in the second column:
Variable
Description
<SSL_Cipher_Suite>
During an SSL handshake, two nodes negotiate to determine which cipher suite will be used to communicate with each other. Use this parameter to specify which SSL cipher suite you want to use.
<10-70_Random _Characters>
A string of 10-70 random alphanumeric characters that is used to seed a random number generator to generate a cryptographic key.
- Save the sqlnet.ora file.
Step 2: Configure the TrueSight Server Automation application server
Perform the following steps on all your TrueSight Server Automation application servers to communicate with TCPS encrypted database:
- Obtain the Database Server certificate and copy to the TrueSight Server Automation application server in a /tmp location.
From the command prompt, navigate to <BMC_Installation_Path>\NSH\br\java\bin and enter the following command to import the public key certificate file:
{{code language="none"}}
keytool -import -v -trustcacerts -alias <alias_name> -file <path_where_oracle_wallet_cert_is_copied > -keystore <app_server_cacerts>
{{/code}}- When prompted for a password, enter the password that is set for JRE cacerts keystore in TrueSight Server Automation. The default password set for cacerts is typically changeit.
Connect to the application server and change the global.properties file with the following URL:
{{code language="none"}}
url=jdbc\:oracle\:thin\:@(DESCRIPTION\=(ADDRESS\=(PROTOCOL\=TCPS)(PORT\=<tcps_port>)(HOST\=<db_server>))(CONNECT_DATA\=(SERVICE_NAME\=<ServiceName>)))
{{/code}}- Restart the application server and PXE server.
Related topics
Implementing-private-certificates-in-TrueSight-Server-Automation