|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * security/zero_trust_workload_identity_manager/zero-trust-manager-upstream-authority plugins.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="zero-trust-manager-configure-cert-manager_{context}"] |
| 7 | += Configuring the cert-manager plugin |
| 8 | + |
| 9 | +The cert-manager plugin for the SPIRE server is designed to automate the management of the SPIRE server intermediate signing certificates by integrating with cert-manager. The cert-manager plugin enables the SPIRE server to dynamically request and receive intermediate signing certificates from cert-manager. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* Access to a Kubernetes cluster where the SPIRE server runs. |
| 14 | +
|
| 15 | +* cert-manager must be installed and running within the Kubernetes cluster. For more information about installing cert-manager, see link:https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html-single/security_and_compliance/index#cert-manager-operator-install[Installing the cert-manager Operator for Red{nbsp}Hat OpenShift]. |
| 16 | +
|
| 17 | +* A pre-configured cert-manager `Issuer` capable of signing intermediate Certificate Authority (CA) certificates. |
| 18 | +
|
| 19 | +.Procedure |
| 20 | + |
| 21 | +Before the cert-manager plugin can be configured, an `Issuer` needs to be created since the `Issuer` represents the CA and defines how certificates are issued. You create a cert-manager `Issuer` by performing the following steps: |
| 22 | + |
| 23 | +. Generate the Transport Layer Security (TLS) secret by running the following command: |
| 24 | ++ |
| 25 | +[source,terminal] |
| 26 | +---- |
| 27 | +$ oc create secret tls my-ca-key-pair-secret \ |
| 28 | + --cert=path/to/your/ca.crt \ |
| 29 | + --key=path/to/your/ca.key \ |
| 30 | + --namespace=my-namespace |
| 31 | +---- |
| 32 | + |
| 33 | +. Create a YAML file that defines the `Issuer`, for example `ca-issuer.yaml`: |
| 34 | ++ |
| 35 | +.Example `ca-issuer.yaml` |
| 36 | ++ |
| 37 | +[source,yaml] |
| 38 | +---- |
| 39 | +apiVersion: cert-manager.io/v1 |
| 40 | +kind: Issuer |
| 41 | +metadata: |
| 42 | + name: my-ca-issuer |
| 43 | + namespace: my-namespace |
| 44 | +spec: |
| 45 | + ca: |
| 46 | + secretName: my-ca-key-pair-secret <1> |
| 47 | +---- |
| 48 | +<1> The name of the Kubernetes Secret that holds the `tls.cert` and `tls.key` files. This secret must exist before you create the `Issuer`. |
| 49 | + |
| 50 | +. Apply the configuration by running the following command: |
| 51 | ++ |
| 52 | +[source, terminal] |
| 53 | +---- |
| 54 | +$ oc apply -f ca-issuer.yaml |
| 55 | +---- |
0 commit comments