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

Infer the JWS signing algorithm name by looking at the provided key #247

Merged
merged 4 commits into from
Apr 15, 2024

Conversation

erik-h
Copy link
Contributor

@erik-h erik-h commented Apr 12, 2024

This handles cases where the JWS message or the key do not have a proper alg header. The alg header is optional, so some identity providers may not supply it (such as Microsoft Identity).

This handles cases where the JWS message or the key do not have a proper `alg`
header. The `alg` header is optional[0], so some identity providers may not
supply it (such as Microsoft Identity[1])

[0]: https://datatracker.ietf.org/doc/html/rfc7517#section-4.4
[1]: https://login.microsoftonline.com/common/discovery/v2.0/keys

Signed-off-by: Erik Haugrud <[email protected]>
@erik-h erik-h force-pushed the optional-alg-key branch from d1ccea6 to b264d29 Compare April 13, 2024 00:08
@codecov-commenter
Copy link

codecov-commenter commented Apr 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@8e2e849). Click here to learn what that means.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #247   +/-   ##
=======================================
  Coverage        ?   90.31%           
=======================================
  Files           ?       24           
  Lines           ?     1569           
  Branches        ?        0           
=======================================
  Hits            ?     1417           
  Misses          ?      108           
  Partials        ?       44           
Files Coverage Δ
internal/authz/oidc.go 93.55% <100.00%> (ø)

Copy link
Collaborator

@nacx nacx left a comment

Choose a reason for hiding this comment

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

Thank you! This LGTM!
Mind addressing the lint errors and adding some comments?

internal/authz/oidc.go Show resolved Hide resolved
@erik-h erik-h force-pushed the optional-alg-key branch from f0a17b5 to 54013aa Compare April 15, 2024 07:37
@erik-h erik-h force-pushed the optional-alg-key branch from 54013aa to a44ea63 Compare April 15, 2024 07:38
@erik-h erik-h force-pushed the optional-alg-key branch from 75caf08 to 03ec224 Compare April 15, 2024 07:41
@erik-h
Copy link
Contributor Author

erik-h commented Apr 15, 2024

@nacx thanks for the review! I've added a couple comments and fixed the linter issues.

@istio-testing
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erik-h, nacx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nacx
Copy link
Collaborator

nacx commented Apr 15, 2024

Thx!

@istio-testing istio-testing merged commit 11a2002 into istio-ecosystem:main Apr 15, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants