Skip to content

Conversation

@sai-sunder-s
Copy link
Contributor

If impersonated json contains scopes field and the user does not provide scopes through options, then use the scopes field value for the impersonated token.

Sample JSON:

{
  "delegates": [],
  "scopes": [
    "https://www.googleapis.com/auth/drive"
  ],
  "service_account_impersonation_url": "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/[email protected]:generateAccessToken",
  "source_credentials": {
    "client_id": "oauth_client_id",
    "client_secret": "oauth_client_secret",
    "refresh_token": "user_refresh_token",
    "type": "authorized_user",
    "universe_domain": "googleapis.com"
  },
  "type": "impersonated_service_account"
}

@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

❌ Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.10%. Comparing base (ed85fbe) to head (dff6b31).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
google/cloud/internal/oauth2_google_credentials.cc 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15675      +/-   ##
==========================================
- Coverage   93.11%   93.10%   -0.02%     
==========================================
  Files        2442     2442              
  Lines      224365   224533     +168     
==========================================
+ Hits       208915   209043     +128     
- Misses      15450    15490      +40     

☔ 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.

@sai-sunder-s sai-sunder-s marked this pull request as ready for review November 3, 2025 17:37
@sai-sunder-s sai-sunder-s requested a review from a team as a code owner November 3, 2025 17:37
@sai-sunder-s sai-sunder-s enabled auto-merge (squash) November 3, 2025 18:07
@sai-sunder-s sai-sunder-s merged commit c33b7b5 into googleapis:main Nov 3, 2025
62 of 71 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