Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rest): support generateIdToken in impersonation url #14853

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cuiy0006
Copy link
Collaborator

@cuiy0006 cuiy0006 commented Nov 21, 2024

There could be different formats of impersonation URLs in the ADC credential files like:

  1. base_url[:generateAccessToken]
  2. base_url[:generateIdToken]
  3. base_url

We already use base_url:generateAccessToken to generate access token. base_url:generateIdToken is not an alternative approach to generate access token, it is used for requesting a JWT token, then we can decode it and verify the email and aud.

No matter which of them appears in the impersonation URL in the credential file, we will ignore them, we will always use base_url[:generateAccessToken] to request access token, and use base_url[:generateIdToken] to do verification.

As mentioned by Brent, the design of impersonation URL is TBD, :generateAccessToken and :generateIdToken could be removed from the impersonation URL in the credential files. I think it makes sense to support all the formats above.


This change is Reviewable

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.00%. Comparing base (8e7038e) to head (5dda374).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14853   +/-   ##
=======================================
  Coverage   93.00%   93.00%           
=======================================
  Files        2351     2351           
  Lines      209479   209482    +3     
=======================================
+ Hits       194818   194825    +7     
+ Misses      14661    14657    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@cuiy0006 cuiy0006 marked this pull request as ready for review November 21, 2024 21:39
@cuiy0006 cuiy0006 requested a review from a team as a code owner November 21, 2024 21:39
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.

1 participant