Skip to content

impl: enable GDCH Service Account credentials for gRPC endpoints - #16428

Merged
scotthart merged 5 commits into
googleapis:mainfrom
scotthart:gdch_creds_grpc_integration
Sep 11, 2026
Merged

impl: enable GDCH Service Account credentials for gRPC endpoints#16428
scotthart merged 5 commits into
googleapis:mainfrom
scotthart:gdch_creds_grpc_integration

Conversation

@scotthart

@scotthart scotthart commented Sep 9, 2026

Copy link
Copy Markdown
Member

This PR adds support for creating GDCH Service Account Credentials if gRPC v1.84.0 or later is being used. Manual testing with v1.84.0 has been done.

As part of the v3 major version, nlohmann::json became a required dependency. Adding it to the grpc library is in line with that change.

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

Copy link
Copy Markdown

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 implements support for GDCH Service Account Credentials in gRPC, which requires gRPC version 1.84.0 or greater. It introduces dependencies on nlohmann_json, updates Bazel and CMake build configurations, implements the credential visitor logic, and adds comprehensive unit and integration tests. The review feedback correctly identifies three important areas for improvement: avoiding potential C++ exceptions when parsing JSON to comply with library safety guidelines, failing loudly instead of silently swallowing errors when a specified CA certificate file cannot be opened, and removing default parameters in an internal namespace within the test file to adhere to the repository style guide.

Comment thread google/cloud/internal/unified_grpc_credentials.cc
Comment thread google/cloud/internal/unified_grpc_credentials.cc
Comment thread google/cloud/internal/unified_grpc_credentials_test.cc Outdated
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.17391% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.28%. Comparing base (6e0a08e) to head (0ed4943).

Files with missing lines Patch % Lines
...le/cloud/internal/unified_grpc_credentials_test.cc 60.00% 8 Missing ⚠️
google/cloud/internal/unified_grpc_credentials.cc 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16428   +/-   ##
=======================================
  Coverage   92.28%   92.28%           
=======================================
  Files        2246     2246           
  Lines      212894   212913   +19     
=======================================
+ Hits       196474   196493   +19     
  Misses      16420    16420           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scotthart
scotthart marked this pull request as ready for review September 11, 2026 15:43
@scotthart
scotthart requested a review from a team as a code owner September 11, 2026 15:43
@scotthart
scotthart merged commit 07138e9 into googleapis:main Sep 11, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants