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

Use ID token for OAuth authentication, not Access Token #7621

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

zrhoffman
Copy link
Member

@zrhoffman zrhoffman commented Jul 7, 2023

As specified in OpenID.Core, the ID Token is a required security token that must be a JWT, but nothing requires that access tokens are JWTs, or even that they exist. #7621 makes our OAuth implementation use id_token, not access_token, which fixes #7626.

#7621 also moves the AccessToken and IDToken constants to the rfc package, because they are standardized.


Which Traffic Control components are affected by this PR?

  • Traffic Ops

PR submission checklist

@zrhoffman zrhoffman added bug something isn't working as intended Traffic Ops related to Traffic Ops authentication Relating to login, registration, passwords, tokens, etc. labels Jul 7, 2023
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #7621 (1c52cc6) into master (46f602a) will decrease coverage by 33.13%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master    #7621       +/-   ##
=============================================
- Coverage     65.04%   31.92%   -33.13%     
  Complexity       98       98               
=============================================
  Files           314      497      +183     
  Lines         12365    39459    +27094     
  Branches        907       90      -817     
=============================================
+ Hits           8043    12596     +4553     
- Misses         3968    25693    +21725     
- Partials        354     1170      +816     
Flag Coverage Δ
golib_unit 48.30% <ø> (?)
grove_unit 4.60% <ø> (?)
t3c_unit 5.28% <ø> (?)
traffic_monitor_unit 21.30% <ø> (?)
traffic_portal_v2 ?
traffic_stats_unit 10.14% <ø> (?)
unit_tests 25.49% <ø> (-48.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 401 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@zrhoffman zrhoffman force-pushed the oauth-id-token branch 2 times, most recently from bb6f6e9 to a23adbc Compare July 10, 2023 12:59
Copy link
Contributor

@kdamichie kdamichie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Tested and it works

@rimashah25 rimashah25 merged commit fbd097b into apache:master Jul 10, 2023
@zrhoffman zrhoffman deleted the oauth-id-token branch July 10, 2023 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication Relating to login, registration, passwords, tokens, etc. bug something isn't working as intended Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TO OAuth uses Access Token, not ID Token
3 participants