Configuring Trusted TLS Flashcards
Where are the certs used?
1) wildcard cert in ingress controller operator (all .apps subdomains)
2) API certificate.
3) Edge route that uses a wildcard certificate.
What are requirements for wildcard cert
1) PEM format
2) Extension subjectAltName with value: *.apps./OPENSHIFT-DOMAIN/
Changing the certificate used by the ingress controller operator does affect certificates signed by the internal OpenShift certificate authority. True or False
False
Steps to setup ingres controler cert
1) create a new ccm in the openshift-config namespace
2) Configure the cluster proxy to use the new cm
3) Create a new TLS secret in the openshift-ingress namespace
4) Modify the default ingress controller operator in the openshift-ingress-operator namespace so that defaultCertificate uses the newly created secret
Create a cm to setup ingres controler wildcard domain
oc create configmap <CONFIGMAP-NAME> \
--from-file ca-bundle.crt=<PATH-TO-CERTIFICATE> \
-n openshift-config</PATH-TO-CERTIFICATE></CONFIGMAP-NAME>
Configure cluster proxy to use a new cm to setup ingres controler wildcard domain
oc patch proxy/cluster –type=merge \
–patch=’{“spec”:{“trustedCA”:{“name”:”<CONFIGMAP-NAME>"}}}'</CONFIGMAP-NAME>
Create TLS secret to setup ingres controler wildcard domain
oc create secret tls <SECRET-NAME> \
--cert <PATH-TO-CERTIFICATE> \
--key <PATH-TO-KEY> \
-n openshift-ingress</PATH-TO-KEY></PATH-TO-CERTIFICATE></SECRET-NAME>
Modify the default ingress controller operator in the openshift-ingress-operator namespace so that defaultCertificate uses the newly created secret
oc patch ingresscontroller.operator/default \
-n openshift-ingress-operator –type=merge \
–patch=’{“spec”: {“defaultCertificate”: {“name”: “<SECRET-NAME>"}}}'</SECRET-NAME>
Check the progress of setting up ingres controller wildcard domain
watch oc get pods -n openshift-ingress
What is the impact of changing the OpenShift master API?
allows users to log in securely using the oc command
Requirements to change the master API certificate
1) PEM format.
2) The certificate is issued through master API, such as api.ocp4.example.com.
3) subjectAltName extension contains the URL used to access the master API, such as DNS: api.ocp4.example.com.
Steps to change the master API cert
1) Create TLS secret in the openshift-config namespace using the master API certificate and key
2) Modify the cluster API server to use the new secret
Check that master api change is taking effect
1) oc get clusteroperator/kube-apiserver
2) oc get pods -l app=openshift-kube-apiserver \
-n openshift-kube-apiserver”
Create TLS secret in the openshift-config namespace using the master API certificate and key
oc create secret tls <SECRET-NAME> \
--cert <PATH-TO-CERTIFICATE> \
--key <PATH-TO-KEY> \
-n openshift-config</PATH-TO-KEY></PATH-TO-CERTIFICATE></SECRET-NAME>
Modify the cluster API server to use the new secret
oc patch apiserver cluster –type=merge \
-p ‘{“spec”: {“servingCerts”: {“namedCertificates”:’\
‘[{“names”: [“<API-SERVER-URL>"],'\
'"servingCertificate": {"name": "<SECRET-NAME>"}}]}}}'</SECRET-NAME></API-SERVER-URL>
Configure your system can be to trust your enterprise CA
1) Copy your enterprise CA certificate to the /etc/pki/ca-trust/source/anchors
2) Run the update-ca-trust extract command