Red Hat OpenShift: Installing a self-signed certificate
This section describes how to set up secure access from an LDAP server, to a Turbonomic platform. It assumes you have authorization to get a certificate from the LDAP server, as well as admin authority on the Turbonomic platform.
Download your LDAP Server certificate to the Turbonomic instance.
Acquire a certificate from your LDAP administrator, and download it to the Turbonomic platform. For example, you can download it temporarily to the file
/tmp/ldapserver.crt
.-
Import the
.crt
file to the Turbonomic TrustStore by using thekeytool
utility.Note:This step modifies the
cacerts
file on the Turbonomic platform.-
Copy the
/tmp/ldapserver.crt
file inside theauth
pod.cp ldapserver.crt auth-d6f94c4c7-vx2pp:home/turbonomic/data
-
Log into the
auth
pod.oc rsh auth-d6f94c4c7-vx2pp
-
Move the
cacerts
file from/etc/pki/ca-trust/extracted/java/cacerts
to/home/turbonomic/data/cacerts
.cp /etc/pki/ca-trust/extracted/java/cacerts /home/turbonomic/data/cacerts
-
Run the following
keytool
command inside theauth
pod to import your new certificate to the TrustStore:keytool -import -alias ldapcert1 -file ldapserver.crt -keystore cacerts -deststoretype jks -storepass changeit -noprompt
-
-
Add the TrustStore to the Turbonomic authorization pod.
oc cp cacerts $auth_pod:/home/turbonomic/data/cacerts
-
Update the platform's Operator Chart to use the TrustStore.
-
Open the yaml file for editing.
oc edit xl xl-release
Alternatively, you can edit the file directly in the Red Hat OpenShift UI.
-
Add the TrustStore as an authorization spec for the component options.
In the yaml file, find the
spec:
section. Within that section, find theauth:
subsection.This should be the second subsection in
spec:
, afterglobal:
. If there is noauth:
subsection, you can add it tospec:
. -
Add the TrustStore to the
auth:
subsection.Add the TrustStore path to a
javaComponentOptions:
statement within theauth:
subsection. Add the path as a-D
option. Use the same path that you copied thecacerts
file to in the Turbonomic authorization pod.The
auth:
subsection should be similar to the following, withauth
indented by two spaces andjavaComponentOptions
indented by four spaces:# Pass in the JAVA_OPTS to the auth POD to set up additional options such as # a trustStore for AD Certificate(s) for LDAPS (Secure LDAP) spec: auth: javaComponentOptions: "-Djavax.net.ssl.trustStore=/home/turbonomic/data/cacerts"
The authorization component restarts so that it can use the new setting. As the component restarts, the
rsyslog
output should include the following message or you can exec intoauth
pod and runps -ef | grep java
.-Djavax.net.ssl.trustStore=/home/turbonomic/data/cacerts
-