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

fix(op-app): at_hash does not match #78

Merged
merged 1 commit into from
Nov 20, 2024
Merged

fix(op-app): at_hash does not match #78

merged 1 commit into from
Nov 20, 2024

Conversation

lucacavallaro
Copy link
Member

List of changes

  1. hash at_hash JWT payload value, using the same procedure as https://github.com/panva/node-oidc-provider

Motivation and context

When using the customKeyStore feature to sign ID tokens, the at_hash claim is not valid, causing problems during the JWT verification phase of the OIDC authentication flow.

at_hash, is described by OIDC spec as:

Access Token hash value. Its value is the base64url encoding of the left-most half of the hash of the octets of the ASCII representation of the access_token value, where the hash algorithm used is the hash algorithm used in the alg Header Parameter of the ID Token's JOSE Header. For instance, if the alg is RS256, hash the access_token value with SHA-256, then take the left-most 128 bits and base64url encode them. The at_hash value is a case sensitive string.

@lucacavallaro lucacavallaro requested a review from a team as a code owner November 19, 2024 17:38
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 46.27%. Comparing base (df7f7df) to head (2908242).
Report is 55 commits behind head on main.

Files with missing lines Patch % Lines
apps/op-app/src/adapters/keyvault/keystore.ts 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
- Coverage   54.83%   46.27%   -8.56%     
==========================================
  Files         109      120      +11     
  Lines        6002     5158     -844     
  Branches      369      204     -165     
==========================================
- Hits         3291     2387     -904     
- Misses       2661     2709      +48     
- Partials       50       62      +12     

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


🚨 Try these New Features:

@lucacavallaro lucacavallaro merged commit 9628f09 into main Nov 20, 2024
7 checks passed
@lucacavallaro lucacavallaro deleted the fix-jwt-payload branch November 20, 2024 15:02
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.

3 participants