第 3 章 Reissuing internal certificates
Each component of Red Hat Advanced Cluster Security for Kubernetes uses an X.509 certificate to authenticate itself to other components. These certificates have expiration dates, and you must reissue, or rotate, certificates before they expire. You can view the certificate expiration dates by selecting Platform Configuration
The Central services contain the Central, Central DB, Scanner, and Scanner V4 components. The Central services use a built-in server certificate for authentication when communicating with other Red Hat Advanced Cluster Security for Kubernetes (RHACS) services. This certificate is unique to your Central service installation. The RHACS portal shows an informational banner when a Central service certificate is about to expire.
The informational banner only appears 15 days before the certificate expiration date.
Beginning with RHACS 4.3.4, the Operator automatically rotates the service transport layer security (TLS) certificates for all of the Central components 6 months before they expire.
- The automated rotation of the TLS certificates applies only to Operator-based installations. For all other installation methods, you must manually rotate the TLS certificates.
- The rotation of the TLS certificates within the secrets does not automatically trigger the components to reload them. If the corresponding pods are not restarted at least every 6 months, you must manually restart the pods to load the new certificates before the old ones expire.
- Certificate authority (CA) certificates are not updated. They are valid for 5 years.
3.1.1. Reissuing internal certificates for Central 复制链接链接已复制到粘贴板!
You can maintain a secure communication between Central and other Red Hat Advanced Cluster Security for Kubernetes (RHACS) components by reissuing the internal certificates.
Prerequisites
-
You have
writepermission for theAdministrationresource.
Procedure
- In the RHACS portal, click the link in the banner that announces the certificate expiration to download a YAML configuration file, which contains a new secret. The secret includes the certificate and key values.
To apply the new YAML configuration file to the cluster where you have installed Central, run the following command:
$ oc apply -f <secret_file.yaml>- To apply the changes, restart Central.
3.1.1.1. Restarting the Central container 复制链接链接已复制到粘贴板!
You can restart the Central container by deleting the Central pod.
If you use Kubernetes, enter kubectl instead of oc.
Procedure
To delete the Central pod, run the following command:
$ oc -n stackrox delete pod -lapp=central
3.1.2. Reissuing internal certificates for Central DB 复制链接链接已复制到粘贴板!
You can maintain a secure communication between Central DB and other Red Hat Advanced Cluster Security for Kubernetes (RHACS) components by reissuing the internal certificates.
Prerequisites
-
You have
writepermission for theAdministrationresource.
Procedure
- In the RHACS portal, click the link in the banner that announces the certificate expiration to download a YAML configuration file, which contains a new secret. The secret includes the certificate and key values.
To apply the new YAML configuration file to the cluster where you have installed Central DB, run the following command:
$ oc apply -f <secret_file.yaml>- To apply the changes, restart Central DB.
3.1.2.1. Restarting the Central DB container 复制链接链接已复制到粘贴板!
You can restart the Central DB container by deleting the Central DB pod.
If you use Kubernetes, enter kubectl instead of oc.
Procedure
To delete the Central DB pod, run the following command:
$ oc -n stackrox delete pod -lapp=central-db
3.1.3. Reissuing internal certificates for Scanner 复制链接链接已复制到粘贴板!
You can maintain a secure communication between Scanner and other Red Hat Advanced Cluster Security for Kubernetes (RHACS) components by reissuing the internal certificates.
Prerequisites
-
You have
writepermission for theAdministrationresource.
Procedure
- Click the link in the banner to download a YAML configuration file, which contains a new OpenShift Container Platform secret, including the certificate and key values.
To apply the new YAML configuration file to the cluster where you have installed Scanner, run the following command:
$ oc apply -f <secret_file.yaml>- To apply the changes, restart Scanner.
You can restart the Scanner and Scanner DB containers by deleting the pods.
If you use Kubernetes, enter kubectl instead of oc.
Procedure
To delete the Scanner pods, run the following command:
$ oc delete pod -n stackrox -l app=scannerTo delete the Scanner DB pods, run the following command:
$ oc -n stackrox delete pod -l app=scanner-db
3.1.4. Reissuing internal certificates for Scanner V4 复制链接链接已复制到粘贴板!
You can maintain a secure communication between Scanner V4 and other Red Hat Advanced Cluster Security for Kubernetes (RHACS) components by reissuing the internal certificates.
Prerequisites
-
You have
writepermission for theAdministrationresource.
Procedure
- Click the link in the banner to download a YAML configuration file, which contains a new OpenShift Container Platform secret, including the certificate and key values.
To apply the new YAML configuration file to the cluster where you have installed Scanner V4, run the following command:
$ oc apply -f <secret_file.yaml>- To apply the changes, restart Scanner V4.
3.1.4.1. Restarting the Scanner V4 containers 复制链接链接已复制到粘贴板!
You can restart the Scanner V4 Matcher, Indexer and DB containers by deleting their corresponding pods.
If you use Kubernetes, enter kubectl instead of oc.
Procedure
To delete the Scanner V4 Matcher pod, run the following command:
$ oc delete pod -n stackrox -l app=scanner-v4-matcherTo delete the Scanner V4 Indexer pod, run the following command:
$ oc delete pod -n stackrox -l app=scanner-v4-indexerTo delete the Scanner V4 DB pod, run the following command:
$ oc delete pod -n stackrox -l app=scanner-v4-db