feat(kuma-cp): separate CA for Envoy Admin communication #4676
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a separate CA for Envoy Admin communication (CP making requests to the DP).
So far we protected the Envoy Admin server by:
For the client cert that CP presented, we used DP server cert.
This was implemented that way so we can avoid introducing yet another CA/certs that we need to explain to the user.
It worked for most cases, but for some edge cases when a specific DP server cert was provided it didn't.
DP server cert has x509 extension of
ExtKeyUsageServerAuth
so using it as a client cert is technically wrong even though it worked for the majority of cases.Now, we autogenerate separate CA and store it in GlobalSecret from which we generate:
kuma-cp
CA can be replaced, but after replacing, we need to restart all instances of the CP.
To implement it without restart, we would need to do a lot of I/O and cert generation.
Since CP -> DP Envoy Admin communication is not critical, there can easily be downtime while replacing the CA.
Security threats
Obtaining server cert
A malicious actor can present a fake config dump, stats, or clusters. Not much damage.
They cannot impersonate service-to-service communication.
Obtaining client cert == obtaining CA
A malicious actor can terminate all Envoys.
Multizone
We don't sync it because there is no need for it.
Issues resolved
Fix #4582
Documentation
Should we document this or keep it internal?
Testing
Backwards compatibility
We don't need to build backward compatibility because there can be downtime when we swap tls mechanism.
- [ ] UpdateUPGRADE.md
with any steps users will need to take when upgrading.- [ ] Addbackport-to-stable
label if the code follows our backporting policy