This provides the CAChain data on the with pkiCert function. This is necessary to support rotation of a intermediary CA without causing service interruptions.
During intermediary CA rotation, the leaf certificate never expires. Vault agent is not aware nor should it be. The with secret however now pulls a new ca_chain which causes a client certificate to be created that is {Leaf cert v1, Issuing CA V2}. Since The leaf cert was issued by a different issuer (the previous one) the chain that vault-agent creates is invalid (Authority/signatures do not match).
Since ca_chain is returned on the with pkiCert, we no longer make a high number of API calls to vault ca_chain endpoint.
Without this code, we could not find a way to trust a single rootCA & support rotation of a intermediary CA/issuing CA.
This passes existing tests, and I've tested it manually using a self built version of the vault 1.8.0-beta code.
This also retains backwards compatibility (CA object on with pkiCert does not change functionally.
This is for Github issue https://github.com/hashicorp/consul-template/issues/1961
This provides the
CAChain
data on thewith pkiCert
function. This is necessary to support rotation of a intermediary CA without causing service interruptions.Instead of using this template:
I can instead just use:
While similar, this has two critical benefits:
with secret
however now pulls a newca_chain
which causes a client certificate to be created that is{Leaf cert v1, Issuing CA V2}
. Since The leaf cert was issued by a different issuer (the previous one) the chain that vault-agent creates is invalid (Authority/signatures do not match).ca_chain
is returned on thewith pkiCert
, we no longer make a high number of API calls to vaultca_chain
endpoint.Without this code, we could not find a way to trust a single rootCA & support rotation of a intermediary CA/issuing CA.
This passes existing tests, and I've tested it manually using a self built version of the
vault 1.8.0-beta
code.This also retains backwards compatibility (CA object on
with pkiCert
does not change functionally.Please review!