Enabling SSL HTTPS on non-CLM applications
This topic describes how to enable SSL HTTPS on non-CLM applications, for example, BMC Capacity Optimization. It provides detailed configuration steps to make the secured communication between the components.
Before you begin
- Take a snapshot of your VMs or back up your servers. This precaution is necessary if you make a mistake and need to roll back your changes!
- When importing certificates, keypairs, or keystores, use the JRE embedded with the product or the latest version of JRE/Java installed on your host.
- If you are using a Google Chrome browser and encounter the weak ephemeral Diffie-Hellman key error, see KA428034 for a helpful workaround. To review this workaround in context, see To configure AMREPO to work with SSL.
- For detailed steps on creating Root CA certificates or importing self-signed certificates, see Enabling-SSL-HTTPS-on-core-Windows-CLM-applications-that-currently-use-HTTP.
To configure BMC Capacity Optimization with SSL
This is a two-step process:
- Generating a certificate and key to use with Apache
- Enabling Apache to use HTTPS for BMC Capacity Optimization
To generate a certificate and key to use with Apache
- Install the following packages on the host if they are not already present.
- crypto-utils
- mod_ssl
- After installing these packages, generate a new key and a new SSL certificate using the genkey $hostname command.
Here $hostname is the fully qualified domain name of your BMC Capacity Optimization application server machine. To create a certificate request, select the appropriate option.
Enter the certificate fields with your information (Name, Firm, Country, and so on). If you do not want to manually insert a password every time you restart the Apache Httpd server (forexample, if you are in an automatic HA environment), clear the encrypt key option.
During key generation, review the following output on the console:
[root@clm-bco ~]# genkey csm-bco
/usr/bin/keyutil -c genreq -g 2048 -s "CN=csm-bco, OU=CDL, O=BMC, L=PUN, ST=MAHA, C=IN" -v 24 -a -o /etc/pki/tls/certs/csm-bco.0.csr -k /etc/pki/tls/private/csm-bco.key -z /etc/pki/tls/.rand.24660
cmdstr: genreq
cmd_CertReq
command: genreq
keysize = 2048 bits
subject = CN=csm-bco, OU=CDL, O=BMC, L=PUN, ST=MAHA, C=IN
valid for 24 months
output will be written to /etc/pki/tls/certs/csm-bco.0.csr
output key written to /etc/pki/tls/private/csm-bco.key
random seed from /etc/pki/tls/.rand.24660
Generating key. This may take a few moments...
Made a key
Opened /etc/pki/tls/certs/csm-bco.0.csr for writing
Wrote the CSR to /etc/pki/tls/certs/csm-bco.0.csr
Wrote 882 bytes of encoded data to /etc/pki/tls/private/csm-bco.key
Wrote the key to:
/etc/pki/tls/private/csm-bco.key
/usr/bin/keyutil -c makecert -g 2048 -s "CN=csm-bco, OU=CDL, O=BMC, L=PUN, ST=MAHA, C=IN" -v 1 -a -z /etc/pki/tls/.rand.24660 -o /etc/pki/tls/certs/csm-bco.crt -k /etc/pki/tls/private/csm-bco.key
cmdstr: makecert
cmd_CreateNewCert
command: makecert
keysize = 2048 bits
subject = CN=csm-bco, OU=CDL, O=BMC, L=PUN, ST=MAHA, C=IN
valid for 1 months
random seed from /etc/pki/tls/.rand.24660
output will be written to /etc/pki/tls/certs/csm-bco.crt
output key written to /etc/pki/tls/private/csm-bco.keyThe Certificate Signing Request (csm-bco.0.csr) file is generated at the /etc/pki/tls/certs location.
- Copy the csm-bco-0.csr file where you have CA or generate the CA certificate.
Or send this csr file to CA to get certificate. On the OpenSSL host, generate the certifcate, using the csm-bco-0.csr file.
C:\OpenSSL-Win64\bin>openssl x509 -req -days 365 -in C:\CSR\csm-bco.0.csr -CA C:\Certificates\RootCA.crt -CAkey C:\Keys\RootCA.key -set_serial 878 -out C:\Certificates\csm-bco.crt
Loading 'screen' into random state - done
Signature ok
subject=/C=IN/ST=MAHA/L=PUN/O=BMC/OU=CDL/CN=csm-bco
Getting CA Private Key- When you finish generating the key, you have the following results:
- $hostname.crt certificate file in /etc/pki/tls/certs/
- $hostname.key key file in /etc/pki/tls/private/
- Create /pki/tls/certs and /pki/tls/private folders at $CPITBASE/3rd_party/apache2/etc.
- Copy /etc/pki/tls/certs/$hostname.crt to $CPITBASE/3rd_party/apache2/etc/pki/tls/certs/<hostname>.cert.
- Copy /etc/pki/tls/private/$hostname.key to $CPITBASE/3rd_party/apache2/etc/pki/tls/ private/<hostname>.key.
- Change the owner of both the copied files and the created folders to the owner using BMC Capacity Optimization.
To enable HTTPS in Apache
To enable HTTPS in your BMC Capacity Optimization installation, perform the following steps:
Modify the caplan.conf configuration file located at $CPITBASE/3rd_party/apache2/etc/httpd/conf.d, by adding the following information:
SSLEngine on
SSLProxyEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile $CPITBASE/3rd_party/apache2/etc/pki/tls/certs/<hostname>.crt
SSLCertificateKeyFile $CPITBASE/3rd_party/apache2 /etc/pki/tls/private/<hostname>.keyCreate the ssl.conf file in $CPITBASE/3rd_party/apache2/etc/httpd/conf.d and add the following content.
LoadModule ssl_module modules/mod_ssl.so
Listen 8443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
SSLMutex default
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtinMake sure that you change the required SSL port.
- Restart Httpd using the $CPITBASE/cpit restart httpd command.
The new URL to connect to BCO will be https://$hostname:8443/console. Import the certificate into /gfs/cpit/jre/lib/security/cacerts for the trusted CA certificate.
[root@clm-bco bin]# ./keytool -import -alias root -keystore /gfs/cpit/jre/lib/security/cacerts -trustcacerts -file /etc/pki/tls/certs/RootCA.crt
Enter keystore password:
Owner: EMAILADDRESS=clm.bmc.com, CN=CLM, OU=CDL, O=BMC, L=PUN, ST=MAHA, C=IN
Issuer: EMAILADDRESS=clm.bmc.com, CN=CLM, OU=CDL, O=BMC, L=PUN, ST=MAHA, C=IN
Serial number: bfae9d478d3085c1
Valid from: Fri Apr 26 14:32:23 IST 2013 until: Sat Apr 26 14:32:23 IST 2014
Certificate fingerprints:
MD5: E7:87:3D:B3:33:82:9F:17:0B:F6:78:D1:0D:64:EB:F5
SHA1: 47:85:B7:4E:46:C4:8F:21:31:29:86:47:C5:7A:3C:7F:65:B6:36:27
Signature algorithm name: SHA1withRSA
Version: 1
Trust this certificate? [no]: yes
Certificate was added to keystore- When you access the BCO URL, review the following certificate:
To integrate BMC Capacity Optimization and Platform Manager changes into SSL