Creating secure endpoints for external services
About this task
OpenShift clusters have a default router that listens on all hostnames of a network subdomain.
Typically *.apps appears in the external address, for example
*.apps.example.com. The Cloud Pak operator creates
routes with hostnames that are in the subdomain by using the pattern
<component>-<namespace>.<router-canonical-name>. The
<component> name is an abbreviation of the service name, for example
cpe for Content Platform Engine. For more information about OpenShift routes, see
Secured routes.
Clients connecting to an endpoint need the certificate that is issued for this route, and the complete list of signer certificates that are used to sign it. Routes use certificates, which must be signed. A shared suffix means that a single HTTPS wildcard certificate can be used to secure all of the routes of a deployment. The subject alternative name (SAN) in the certificate must include the hostname suffix.
If you want to customize the hostname suffix, you must specify a value for the shared_configuration.sc_deployment_hostname_suffix parameter. Again, the shared suffix is used by all the routes that the Cloud Pak deployment created.
sc_deployment_hostname_suffix parameter must follow a precise
pattern that matches {unique-identifier}.{router-canoncial-name}. - Unique-identifier
- A string that is unique in the cluster and can help users recognize the system. It must not exceed 32 characters.
- Router-canonical-name
- The DNS suffix that resolves to your OpenShift router. You can use the following command to
query the exact
value:
oc get route console -n openshift-console -o yaml | grep routerCanonicalHostname
The following custom resource excerpt sets the hostname suffix for all routes as
sales.apps.myocpcluster.com.
shared_configuration:
sc_deployment_hostname_suffix: sales.apps.myocpcluster.comAll the resulting routes include the component name and the hostname suffix. For example, the
route for Content Platform Engine is https://cpe-sales.apps.myocpcluster.com.
The SAN in the wildcard certificate for the example routes might be
DNS:*.apps.myocpcluster.com.
Procedure
What to do next
There are separate tasks that must be done to update certificates for the routes in the foundation layers of the platform. For more information, see IBM Certificate manager (cert-manager).
When your certificates expire, you must take the following actions to renew the secrets:
- Update or re-create the secret with the updated certificate.
- Restart the corresponding pods that are associated with the secret.