Repository navigation
fix(auth): accept IAP issuer when verifying id tokens - #7279
Conversation
The id token verifier only accepted the Google account issuers so tokens issued by Identity-Aware Proxy were rejected with an invalid issuer error IAP signs its tokens with ES256 and uses the Cloud IAP issuer which is now part of the accepted issuer list Add regression coverage using an ES256 token with the IAP issuer Fixes googleapis#6704
There was a problem hiding this comment.
Code Review
This pull request adds support for verifying Identity-Aware Proxy (IAP) signed ID tokens by adding https://cloud.google.com/iap to the list of accepted issuers in the verifier. It also introduces a helper function generate_test_id_token_es256_with_claims in the test module to facilitate testing ES256 tokens with custom claims, and adds a unit test verifying successful validation of IAP-issued tokens. I have no feedback to provide on these changes.
|
/gcbrun |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7279 +/- ##
==========================================
- Coverage 97.53% 97.53% -0.01%
==========================================
Files 332 332
Lines 139867 139895 +28
==========================================
+ Hits 136419 136444 +25
- Misses 3448 3451 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Reproduction
JWT token iss field is invalid: InvalidIssuerVerification
credentials::mds::tests::adc_overridden_mds, fails with a 502 from the metadata host in this environment, and it fails the same way at the baseline revisionFixes #6704