-
Notifications
You must be signed in to change notification settings - Fork 248
A65: mTLS Credentials in xDS Bootstrap File #372
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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,100 @@ | ||
A65: mTLS Credentials in xDS Bootstrap File | ||
---- | ||
* Author(s): @markdroth | ||
* Approver: @ejona86 | ||
* Status: {Draft, In Review, Ready for Implementation, Implemented} | ||
* Implemented in: <language, ...> | ||
* Last updated: 2023-05-24 | ||
* Discussion at: https://groups.google.com/g/grpc-io/c/h_LQnTimyt4 | ||
|
||
## Abstract | ||
|
||
This proposal adds support for configuring the use of mTLS for | ||
communicating with the xDS server via the xDS bootstrap file. | ||
|
||
## Background | ||
|
||
[gRFC A27][A27] defines the xDS bootstrap file format for setting | ||
the channel creds used to communicate with the xDS server, with the | ||
initial options of `google_default` and `insecure`. It suggested that a | ||
general-purpose mechanism could be added to configure arbitrary channel | ||
creds types, which has subsequently been done, albeit not intended as | ||
a public API. | ||
|
||
[gRFC A29][A29] describes the certificate provider framework used for | ||
configuring mTLS for data plane communication in xDS. It also defines | ||
the file-watcher certificate provider. | ||
|
||
This proposal defines a new channel creds type to be used in the | ||
bootstrap file for using mTLS with the xDS server, leveraging the | ||
functionality of the file-watcher certificate provider. | ||
|
||
### Related Proposals: | ||
* [gRFC A27: xDS-Based Global Load Balancing][A27] | ||
* [gRFC A29: xDS-Based Security for gRPC Clients and Servers][A29] | ||
|
||
## Proposal | ||
|
||
We will define a new credential type in the bootstrap file called `tls`. | ||
Its configuration will be essentially the same as that of the file-watcher | ||
certificate provider described in [gRFC A29][A29]. Specifically, the | ||
config will look like this: | ||
|
||
```json | ||
{ | ||
// Path to CA certificate file. | ||
// If unset, system-wide root certs are used. | ||
"ca_certificate_file": <string>, | ||
|
||
// Paths to identity certificate file and private key file. | ||
// If either of these fields are set, both must be set. | ||
// If set, mTLS will be used; if unset, normal TLS will be used. | ||
"certificate_file": <string>, | ||
"private_key_file": <string>, | ||
|
||
// How often to re-read the certificate files. | ||
// Value is the JSON format described for a google.protobuf.Duration | ||
// message in https://protobuf.dev/programming-guides/proto3/#json. | ||
// If unset, defaults to "600s". | ||
"refresh_interval": <string> | ||
} | ||
``` | ||
|
||
The only difference between the file-watcher certificate provider config | ||
and this one is that in the file-watcher certificate provider, at least | ||
one of the "certificate_file" or "ca_certificate_file" fields must be | ||
specified, whereas in this configuration, it is acceptable to specify | ||
neither one. | ||
|
||
Implementations should be able to internally configure the use of the | ||
file-watcher certificate provider for the certificate-reloading | ||
functionality. | ||
|
||
### Temporary environment variable protection | ||
|
||
This feature is not enabled via remote I/O, and we don't have a good way | ||
to interop test it, so we will not use env var protection for this feature. | ||
Unit tests in individual languages should be sufficient to verify the | ||
functionality. | ||
|
||
## Rationale | ||
|
||
We considered phrasing the credential config in a way that exposes the | ||
certificate provider framework directly, since that would have allowed it | ||
to automatically support any new cert provider implementations we may | ||
add in the future. However, the plumbing for that turned out to be a | ||
bit challenging, so we decided to only directly expose the file-watcher | ||
certificate provider mechanism. If we add other certificate providers | ||
in the future, we can consider adding fields to expose them in this | ||
configuration. | ||
|
||
## Implementation | ||
|
||
Implemented in C-core in https://github.com/grpc/grpc/pull/33234. | ||
|
||
## Open issues (if applicable) | ||
|
||
N/A | ||
|
||
[A27]: A27-xds-global-load-balancing.md | ||
[A29]: A29-xds-tls-security.md |
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.
Uh oh!
There was an error while loading. Please reload this page.