-
Notifications
You must be signed in to change notification settings - Fork 4
drpc: add TLS certificate handling and metadata infra for auth interceptors #11
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
base: main
Are you sure you want to change the base?
drpc: add TLS certificate handling and metadata infra for auth interceptors #11
Conversation
97cbff1
to
89afdcf
Compare
89afdcf
to
b297942
Compare
1082c70
to
3a4f5d1
Compare
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.
Left a few minor comments. Please take a look.
86d94c4
to
3b188c3
Compare
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.
Pull Request Overview
This PR adds TLS certificate handling and metadata infrastructure for authentication interceptors. It extracts TLS peer certificates on the server side and provides improved metadata APIs for managing per-RPC metadata in clients.
- Adds TLS peer certificate extraction and context storage in server connections
- Introduces new metadata utility functions for context manipulation (ClearContext, ClearContextExcept, GetValue)
- Implements client-side per-RPC metadata support with WithPerRPCMetadata option
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
drpcserver/server.go | Adds TLS certificate extraction and context storage during connection handling |
drpcctx/tlscert.go | New module providing TLS peer certificate context utilities |
drpcmetadata/metadata.go | Adds context clearing and value retrieval functions to metadata API |
drpcclient/dialoptions.go | Adds WithPerRPCMetadata dial option for client configuration |
drpcclient/clientconn.go | Implements per-RPC metadata injection in client calls |
3b188c3
to
a2fbe6d
Compare
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.
I left some comments on the PR. Please feel free to take care of them in the followup PR.
…eptors This commit adds infrastructure needed for authentication interceptors: 1. New drpcctx/tlscert.go: Functions to store/retrieve TLS peer certificates in context 2. Server-side TLS certificate extraction in drpcserver 3. Improved metadata API with ClearContext, ClearContextExcept, and GetValue functions 4. Client-side per-RPC metadata support via WithPerRPCMetadata option
a2fbe6d
to
4fd5c54
Compare
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.
lgtm!
This commit adds infrastructure needed for authentication interceptors:
Also, see cockroachdb/cockroach#150225