Honor the configured credential lifetime for GCS service account impersonation #6187
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.60) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 219 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.323
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #6187"
general
weight: 0.35
dimas-b
Polaris always requests a one hour source token when it impersonates a GCS service account. A realm configured for 900 seconds therefore still sends 3600 seconds to Google IAM.
Use
STORAGE_CREDENTIAL_DURATION_SECONDSfor the IAM request in both ordinary impersonation and principal attribution through Workload Identity Federation. With the default configuration Polaris still requests one hour. Direct use of ambient credentials skips IAM impersonation. Polaris reports the expiration on the downscoped token returned by the Google SDK.Related to #408 and the documentation discussion in #6170.
Verification
I reviewed the change twice. First I traced how Polaris selects the source credentials and how it reports the expiration to the client. Then I ran the new tests against both implementations. The original code failed the 900 second impersonation case and the 1800 second federation case. Both pass with this change.
./gradlew format compileAlland./gradlew :polaris-core:checkpassed. The GCS test class had 45 passing tests and 3 tests skipped because they require live GCS credentials. I also regenerated the configuration reference and ran the license and changelog checks. The full local./gradlew checkreported failures in other modules. This environment denies access to Docker and local sockets.Checklist
[x] Reviewed the security reporting guidance.
[x] Explained the behavior and linked the related issue.
[x] Covered the default, configured durations, direct credentials, and the expiration returned to clients.
[x] Reviewed the existing explanation of the impersonation flow.
[x] Added a changelog entry.
[x] Updated the unreleased configuration reference.
Prepared with assistance from OpenAI Codex.