Hi Siddhit,
You can switch between the self-signed CA and an external CA signed intermediate cert.
It is important to run the following command when switching from one to the other. This clears flags the charm pays attention to and guarantees the charm re-runs some tasks:
juju run-action --wait vault/0 disable-pki
Question 1: I double checked the action parameters [0] and it looks like allowed-domains
is only for the generate-root-ca
(self-signed) action. This seems like a documentation bug. See all the options for upload-signed-csr
in [0]. So, the command will look like this assuming the /tmp/vault-charm-int.pem and ./ca/example.com.pem files have all the potential intermediates per [1]:
juju run-action --wait vault/0 upload-signed-csr \
pem=“$(cat /tmp/vault-charm-int.pem | base64)" \
root-ca="$(cat ./ca/example.com.pem | base64)"
Question 2: When changing a CA it takes time for the model to update and for each service to get the new CA and begin using a new certificate. So there is a downtime window to be aware of always. And yes, if the cert was signed incorrectly it is possible to cause communication failures. You can reset and re-create a new self-signed cert with the following procedure:
juju run-action --wait vault/0 disable-pki
juju run-action --wait vault/0 generate-root-ca
Question 3: reissue-certificates
is an action for manually recreating certificates from the requester’s CSRs. This creates new certificates for all the requesting services and notifies them of a new certificate. This is used when certificate’s are about to expire and need to be re-created. Both the generate-root-ca
and the upload-signed-csr
actions automatically do this at the end of their execution so no need to manually run this in this context.
So the procedure will look like the following:
juju run-action --wait vault/0 disable-pki
juju run-action --wait vault/0 upload-signed-csr \
pem=“$(cat /tmp/vault-charm-int.pem | base64)" \
root-ca="$(cat ./ca/example.com.pem | base64)"
If it becomes necessary to go back to a self-signed CA:
juju run-action --wait vault/0 disable-pki
juju run-action --wait vault/0 generate-root-ca
[0] https://api.jujucharms.com/charmstore/v5/vault-41/archive/actions.yaml
[1] https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-certificate-management.html
Thank you,
–
David Ames