Skip to content

impl(oauth2): add RegionalAccessBoundary Credentials decorator#16081

Merged
scotthart merged 1 commit intogoogleapis:mainfrom
scotthart:rab_implement_and_decorate
Apr 16, 2026
Merged

impl(oauth2): add RegionalAccessBoundary Credentials decorator#16081
scotthart merged 1 commit intogoogleapis:mainfrom
scotthart:rab_implement_and_decorate

Conversation

@scotthart
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

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

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 the RegionalAccessBoundaryTokenManager to manage and cache routing tokens for Regional Access Boundaries (RAB) across several credential types, including Service Account and External Account credentials. The Credentials interface is refactored to support AllowedLocationsRequest, and the decoration logic is updated to integrate the new manager, controlled by a new testing macro. Feedback highlights the need to maintain C++14 compatibility by replacing C++17 features—such as std::variant, std::scoped_lock, and std::holds_alternative—with absl or standard C++14 alternatives. Furthermore, the retry logic should be expanded to include kDeadlineExceeded, and the AllowedLocations endpoint should be accessed using GET requests.

Comment thread google/cloud/internal/oauth2_credentials.h
Comment thread google/cloud/internal/oauth2_credentials.h
Comment thread google/cloud/internal/oauth2_external_account_credentials.cc
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 98.24561% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.70%. Comparing base (f46998c) to head (beeac5a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...th2_regional_access_boundary_token_manager_test.cc 97.59% 5 Missing ⚠️
...l/oauth2_regional_access_boundary_token_manager.cc 97.82% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16081      +/-   ##
==========================================
+ Coverage   92.66%   92.70%   +0.03%     
==========================================
  Files        2348     2351       +3     
  Lines      217564   217954     +390     
==========================================
+ Hits       201612   202052     +440     
+ Misses      15952    15902      -50     

☔ View full report in Codecov by Sentry.
📢 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 force-pushed the rab_implement_and_decorate branch from 14dad9f to beeac5a Compare April 16, 2026 15:20
@scotthart scotthart marked this pull request as ready for review April 16, 2026 17:47
@scotthart scotthart requested a review from a team as a code owner April 16, 2026 17:47
@scotthart scotthart merged commit 1b9b3c1 into googleapis:main Apr 16, 2026
53 of 59 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