Skip to content

[Security] Plumb SSL key exchange group to auth context. - #42917

Closed
gtcooke94 wants to merge 12 commits into
grpc:masterfrom
gtcooke94:key_exchange_group_plumbing
Closed

gtcooke94 wants to merge 12 commits into
grpc:masterfrom
gtcooke94:key_exchange_group_plumbing

Conversation

@gtcooke94

Copy link
Copy Markdown
Contributor

Plumb the negotiated key exchange group all the way to the custom verification check.
This allows users to check the negotiated key exchange group to ensure, for example, they are using post-quantum crypto.

@gtcooke94

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@gtcooke94

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for retrieving and verifying the negotiated TLS key exchange group in gRPC across C++, Python, and core components, along with corresponding tests. The review feedback highlights several improvement opportunities: zero-initializing the grpc_tls_custom_verification_check_request struct in C++ tests to prevent undefined behavior, refactoring Python tests to avoid fragile hardcoded key exchange groups that depend on the underlying SSL library, and extracting redundant calls to negotiated_key_exchange_group() into a local variable to improve readability.

gtcooke94 and others added 3 commits July 8, 2026 15:46
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@matthewstevenson88 matthewstevenson88 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Generally looks good, one test comment.

Also sanity checks are failing. :)

@gtcooke94

Copy link
Copy Markdown
Contributor Author

Yeah I made a change that must've made a line too long, and the easiest way to get the autoformatting is just to wait for the sanity auto-fix PR

gtcooke94 and others added 3 commits July 8, 2026 16:51
@matthewstevenson88 matthewstevenson88 changed the title [Security] Key exchange group plumbing [Security] Plumb SSL key exchange group to auth context. Jul 10, 2026

@markdroth markdroth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

I know that we talked about whether or not we need a gRFC for this, and I said it would be okay to skip it, since it's such a small change. However, since we're publishing gRFC A120 (grpc/proposal#553) anyway, it would probably make sense to include these changes there. (I'll add a comment there as well.)

@gtcooke94

Copy link
Copy Markdown
Contributor Author

Good point about the gRFC - added

grohman-hub added a commit to grohman-hub/grpc that referenced this pull request Jul 27, 2026
* upstream/master:
  [PSM Interop] : add cleanup for the orphaned resources left for SPIFFE cluster. (grpc#43038)
  [PH2][Trivial] Build (grpc#43069)
  [PH2][Bug][Client] Bug fix
  [Security] Plumb SSL key exchange group to auth context. (grpc#42917)
  [CI] Update debian-based docker images to use cmake 3.25. (grpc#42795)
  [xDS e2e tests] clean up API for verifying server status notification changes (grpc#43052)
  Clamp PosixEndpointImpl adaptive read target to max read chunk size (grpc#42234)
  [tls] Move to grpc_core::PemKeyCertPair and grpc_core::KeyCertPairsOrSelector (grpc#42992)
  [build] Add grpc-proto submodule (grpc#43035)
  fix detecting the number of online CPU (grpc#41585)
  [core][promise-based-filter] Fix for metadata nullptr crash on repoll (grpc#43037)
  skip tls1.3 and <1.1.1 in telemetry test (grpc#43042)
grohman-hub pushed a commit to grohman-hub/grpc that referenced this pull request Jul 28, 2026
Plumb the negotiated key exchange group all the way to the custom verification check.
This allows users to check the negotiated key exchange group to ensure, for example, they are using post-quantum crypto.

Closes grpc#42917

COPYBARA_INTEGRATE_REVIEW=grpc#42917 from gtcooke94:key_exchange_group_plumbing d8c14b6
PiperOrigin-RevId: 953465031
grohman-hub added a commit to grohman-hub/grpc that referenced this pull request Jul 28, 2026
…thon_apic_clients

* upstream/master:
  [PSM Interop] : add cleanup for the orphaned resources left for SPIFFE cluster. (grpc#43038)
  [PH2][Trivial] Build (grpc#43069)
  [PH2][Bug][Client] Bug fix
  [Security] Plumb SSL key exchange group to auth context. (grpc#42917)
  [CI] Update debian-based docker images to use cmake 3.25. (grpc#42795)
  [xDS e2e tests] clean up API for verifying server status notification changes (grpc#43052)
  Clamp PosixEndpointImpl adaptive read target to max read chunk size (grpc#42234)
  [tls] Move to grpc_core::PemKeyCertPair and grpc_core::KeyCertPairsOrSelector (grpc#42992)
asheshvidyut pushed a commit to PeterZhizhin/grpc that referenced this pull request Nov 12, 2026
Plumb the negotiated key exchange group all the way to the custom verification check.
This allows users to check the negotiated key exchange group to ensure, for example, they are using post-quantum crypto.

Closes grpc#42917

COPYBARA_INTEGRATE_REVIEW=grpc#42917 from gtcooke94:key_exchange_group_plumbing d8c14b6
PiperOrigin-RevId: 953465031
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants