Use runtime ADC for gateway auth secret access#3520
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3520 +/- ##
==========================================
- Coverage 77.00% 76.68% -0.33%
==========================================
Files 63 63
Lines 3418 3444 +26
Branches 617 620 +3
==========================================
+ Hits 2632 2641 +9
- Misses 612 629 +17
Partials 174 174 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3521
Summary
This changes API v1 to use the App Engine runtime service account for Secret Manager access instead of a baked
GOOGLE_APPLICATION_CREDENTIALSfile in the deployed image.It also adds GitHub OIDC Workload Identity Federation support to the repo workflows, with fallback to the existing
GCP_SA_KEYpath during migration.Changes
GOOGLE_APPLICATION_CREDENTIALSinto the App Engine runtime image.gac.jsonfor runtime use in the deploy export pathpush.ymlandpr.ymlid-token: writepermissions to jobs that authenticate to GCPValidation
uv run pytest --noconftest tests/unit/libs/test_gateway_auth.py tests/unit/libs/test_simulation_api_modal.pyuv run ruff check policyengine_api/gcp_logging.py gcp/export.pyGCP_WORKLOAD_IDENTITY_PROVIDERGCP_DEPLOY_SERVICE_ACCOUNTFollow-up
Once CI/deploy is green on WIF, we should remove fallback use of
GCP_SA_KEYand then delete that secret.