ca: Support separate Vault providers per DC #11159
Labels
theme/certificates
Related to creating, distributing, and rotating certificates in Consul
theme/connect
Anything related to Consul Connect, Service Mesh, Side Car Proxies
theme/consul-vault
Relating to Consul & Vault interactions
type/enhancement
Proposed improvement or new feature
Currently the Connect CA requires that when the Vault provider is used, all Consul DCs must either:
root_pki_path
to all clusters, orThis requirement comes with a number of disadvantages. The manual option is extra work that shouldn't be necessary, and both of the other options require setting separate paths for
intermediate_pki_path
in every DC, otherwise things are pretty broken.We can allow a separate Vault cluster per Consul DC by changing the two calls to
provider.ActiveRoot
inSignCertificate
andinitializeSecondaryCA
to use the root CA that is fetched from the primary DC, instead of attempting to retrieve it directly from Vault.This would not only enable separate Vault instances, but would also allow someone to use different CA providers per datacenter. While that may not be a desirable long term option, it does seem like a pretty important thing to support for doing an incremental switch over from one provider to another, one DC at a time.
Acceptance Criteria
Provider.ActiveRoot
only happen in those scenarios, so we won't notice the problem until those operations are performed.ca.Provider
interface makes no distinction between the methods that are safe for use in the secondary DC. We should split up this interface intoProviderPrimary
andProviderSecondary
. Also, any methods onCAManager
should either be safe for both primary and secondary, or they should be explicitly namedprimaryX
orsecondaryX
to make it clear where they are used. In the future we may be able to split those methods further onto separate types. This work was started in ca: split the Provider interface into Primary/Secondary #11340.The text was updated successfully, but these errors were encountered: