Managing custom certificates (for VM and Kubernetes deployments)
You can use your own trusted custom certificates so Concert can connect to your external connections (integrations). You can import custom trusted certificates for SSL/TLS verification by adding them to a known location. This helps ensure consistent handling of certificates across different environments. Currently this is supported for VM and Kubernetes deployments only.
In virtual machine (VM) deployments, there is a dedicated folder, while in Kubernetes, it is a specific secret.
Concert uses an internal certificate authority (CA) bundle with all trusted certificates.
It seems like we're missing the second half of this sentence. 'Concert uses an internal certificate authority (CA) bundle with all trusted certificates...' in order to do what, exactly? Briefly, we need to clarify what these certificates are for or how they're used.
What 'updates' are we referring to here? Updates to the software version? Something else?
We haven't explained where or how these certificates are used. What happens if you remove the certificates? Which transactions would be unverified?
As a best practice, it is highly recommended that you create a backup of the private key, self-signed certificate, and CA bundle before updating to ensure that both Concert's internal communications and the external connections (integrations) to which they correspond are secure.
Backing up and restoring certificates for VM deployments
$ export CONCERT_TLS_DIR="<path_to_concert_std>/localstorage/volumes/infra/tls"
$ export BACKUP_FILE="${HOME}/concert-tls-backup.tar.gz"
$ tar cvzf "${HOME}/concert-tls-backup.tar.gz" -C "${CONCERT_TLS_DIR}" tls.key tls.crt tls-ca-bundle.pem
tls.key
tls.crt
tls-ca-bundle.pem
$ tar xzvf "${HOME}/concert-tls-backup.tar.gz" -C "${CONCERT_TLS_DIR}"
tls.key
tls.crt
tls-ca-bundle.pem
Triggering a CA bundle update on a VM deployment
Updated the title as the previous title "VM deployment and triggering CA bundle update" was unclear.
Copy any certificate that you want to add to Concert's CA bundle to localstorage/volumes/infra/custom-ca-certs folder. If you want to remove previously added certificates from the CA bundle, delete them from localstorage/volumes/infra/custom-ca-certs.
After modifying the contents of localstorage/volumes/infra/custom-ca-certs folder, run the cert-mgmt script. The cert-mgmt script is part of ibm-concert-std.tgz package that is published on Concert public GitHub.
<concert-install-directory>/bin/stop
<concert-install-directory>/bin/start
Backup and restore of certificates for Kubernetes deployment
$ export CONCERT_NS=<your_concert_namespace>
$ export CONCERT_TLS_SECRET="${HOME}/app-cfg-internal-tls.yaml"
$ kubectl -n "${CONCERT_NS}" get secret app-cfg-internal-tls -oyaml > "${CONCERT_TLS_SECRET}"
$ kubectl -n "${CONCERT_NS}" apply -f "${CONCERT_TLS_SECRET}"
Updating the certificate secret on Kubernetes deployments
Updated the title as the previous title "Kubernetes deployment" was unclear.
Use the following command to export the name of the namespace where Concert is deployed:
$ export CONCERT_NS=<concert's namespace>
app-cfg-custom-ca-certs exists in the namespace where Concert is deployed. If it does not exist, create it by using the following command:
$ kubectl --namespace "${CONCERT_NS}" create secret generic app-cfg-custom-ca-certs
Edit the secret to add any certificate that you want to add to the secret's data section. The key of each entry in this section is the name of the certificate file, and the value is the content of the certificate, encoded in base64 format.
$ kubectl --namespace "${CONCERT_NS}" edit secret app-cfg-custom-ca-certs
Triggering a CA bundle update on Kubernetes
What is the difference between this step and the previous one? The order of operations is unclear.
$ MGMT_POD=$(kubectl --namespace "${CONCERT_NS}" get pods -o=name | grep 'roja-mgmt-' | head -n1)
$ kubectl --namespace "${CONCERT_NS}" exec -it "${MGMT_POD}" -- bash
bash-5.1$ ls /mnt/infra/custom-ca-certs
bash-5.1$ /app/bin/process_custom_ca_certs.sh
kubectl rollout restart deployment/concert-solis-gw
Adding more than one certificate to the CA bundle
Is this section related to VM or Kubernetes deployments? Is this a required step or just additional information? I think the organization of this topic could be improved, or we should break sections out into separate topics.
To ensure that related certificates (such as a root CA and an intermediate CA) are added in the correct sequence within the CA bundle, they must be entered in the proper order. By doing so, Concert can correctly establish and maintain the desired certificate hierarchy.
$ ls /localstorage/volumes/infra/custom-ca-certs
00-server.crt
01-intermediate.crt
02-root.crt
Similarly, when dealing with Kubernetes secrets, it is essential to maintain consistent naming conventions for the keys within the data section.
This is insufficient. What dedicated folder are we referring to for VM deployments? Are we trying to say that the user has to put the certificates in a specific folder? For Kubernetes, what do we mean by "it is a specific secret"?