-
Notifications
You must be signed in to change notification settings - Fork 514
EP-11219: tls in xds #11221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yuval-k
wants to merge
1
commit into
main
Choose a base branch
from
ep-xds-tls
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
EP-11219: tls in xds #11221
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# EP-11219: TLS Support for kgateway-Envoy Communication | ||
|
||
* Issue: [#11219](URL to GitHub issue) | ||
|
||
|
||
## Background | ||
|
||
|
||
Currently, the communication between kgateway and Envoy is unencrypted. This EP proposes adding TLS support to secure this communication channel. The implementation will focus on one-way TLS where kgateway presents a certificate that Envoy verifies using a provided CA certificate. | ||
|
||
## Motivation | ||
|
||
Securing the communication between kgateway and Envoy is required for: | ||
- Protecting sensitive configuration data in transit | ||
- Meeting security compliance requirements | ||
|
||
### Goals | ||
|
||
|
||
1. Implement one-way TLS where kgateway presents a certificate to Envoy | ||
2. Allow configuration of TLS certificates through Kubernetes secrets | ||
3. Automatically propagate CA certificate to Envoy's bootstrap configuration | ||
4. Support TLS configuration through Helm values | ||
|
||
### Non-Goals | ||
|
||
- Mutual TLS authentication (mTLS) | ||
- Dynamic certificate rotation | ||
- Certificate management automation | ||
- Support anything other than k8s secrets for storing the certificates | ||
|
||
## Implementation Details | ||
|
||
### Configuration | ||
|
||
1. New Helm values: | ||
```yaml | ||
tls: | ||
enabled: true | ||
secretName: kgateway-tls-secret # Name of the secret containing certs | ||
``` | ||
|
||
2. Required secret format: | ||
```yaml | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: kgateway-tls-secret | ||
type: Opaque | ||
data: | ||
tls.crt: <base64 encoded server certificate> | ||
tls.key: <base64 encoded private key> | ||
ca.crt: <base64 encoded CA certificate> | ||
``` | ||
|
||
### Server | ||
|
||
The cert secret will be mounted into the kgateway xDS server pod. | ||
|
||
The TLS configuration will be handled by the kgateway xDS server: | ||
- Load TLS certificates from the specified secret. | ||
- if the secret is not found, the server will not start. | ||
- if the secret changes, the server will use the updated certificates (with no restart). | ||
- Configure the gRPC server with TLS settings | ||
|
||
### Controllers | ||
|
||
No new controllers required, as the secret is mounted into the kgateway xDS server pod. | ||
|
||
### Deployer | ||
|
||
The deployer will be updated to: | ||
- Read the CA certificate from the secret | ||
- Inject the CA certificate into Envoy's bootstrap configuration | ||
- Update the bootstrap configuration to enable TLS verification | ||
|
||
### Test Plan | ||
|
||
1. Unit Tests: | ||
- As needed | ||
|
||
2. E2E Tests: | ||
- Complete deployment with TLS enabled | ||
- Communication verification | ||
- Certificate rotation works, and the new certificates are used after rotation. | ||
|
||
## Alternatives | ||
|
||
|
||
1. Using ConfigMaps for the CA instead of placing it in Secret: | ||
- Pros: CA is technically not a secret, and can be placed in a ConfigMap. | ||
- Cons: One more resource to manage. | ||
|
||
2. Mutual TLS: | ||
- Pros: Unclear if mTLS is more secure in this use case, using the k8s jwt should suffice for auth (see ep-10651). | ||
- Cons: More complex to manage. | ||
|
||
## Open Questions | ||
|
||
1. Any reason to use TLS version lower than TLS1.3? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] It would be beneficial to include a recommended default for TLS protocol versions and cipher suites in the design to provide clear guidance on the security posture. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
2. Should we limit the default TLS cipher suites? |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider elaborating on the failure mode when the TLS secret is missing, such as including potential error messages or operational guidance for debugging.
Copilot uses AI. Check for mistakes.