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

Bump the jwt-verifier group in /prime-router with 2 updates #13329

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 11, 2024

Bumps the jwt-verifier group in /prime-router with 2 updates: com.okta.jwt:okta-jwt-verifier and com.okta.jwt:okta-jwt-verifier-impl.

Updates com.okta.jwt:okta-jwt-verifier from 0.5.7 to 0.5.8

Updates com.okta.jwt:okta-jwt-verifier-impl from 0.5.7 to 0.5.8

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

@dependabot dependabot bot requested a review from a team as a code owner February 11, 2024 08:19
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Feb 11, 2024
Copy link
Contributor

github-actions bot commented Feb 11, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

@snesm snesm added the security Work Type label to flag work related to security label Feb 13, 2024
Copy link
Contributor

github-actions bot commented Feb 15, 2024

Test Results

1 092 tests  ±0   1 054 ✅  - 34   5m 44s ⏱️ -2s
  131 suites ±0       4 💤 ± 0 
  131 files   ±0      34 ❌ +34 

For more details on these failures, see this check.

Results for commit fee5c92. ± Comparison against base commit 3c03a1a.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Feb 15, 2024

Integration Test Results

0 files   -  52  0 suites   - 52   0s ⏱️ - 12m 57s
0 tests  - 358  0 ✅  - 348  0 💤  - 10  0 ❌ ±0 
0 runs   - 361  0 ✅  - 351  0 💤  - 10  0 ❌ ±0 

Results for commit fee5c92. ± Comparison against base commit 3c03a1a.

♻️ This comment has been updated with latest results.

@thetaurean
Copy link
Collaborator

thetaurean commented Mar 12, 2024

There is a feature branch with most of the issues in merging this resolved platform/thetaurean/13329-fix-jwt. There is an issue that remains that may prompt changes in our key storage patterns.

The Problem

We use a method parseUnsecuredClaims to deserialize and parse the payload of the token prior to verifying the signature. This required a workaround: truncating the signature for the token or the library would complain. In the latest version the workaround is no longer enough because the alg value is set and the library complains that the token is signed.

Compounding the problem

The library provides a KeyLocator that can be provided to the parser to locate the key. But this pattern only provides the headers -- no built-in access to the payload. This is problematic because we use the issuer claim (in the payload) to determine which organization to pull keys for. More problematic still is there could be multiple keys we have to try.

Current Conclusion

We are going to wait until the jjwt library gets closer to a 1.0.

More Info

Security Concern

The general consensus is that we should not be unpacking the payload before verifying the signature if possible.

Possible solutions

Force the library

Remove the alg value from the header for the initial parse so the library doesn't complain.

Move existing logic inside KeyLocator

Move the existing logic flow of peeking the payload and trying keys into a KeyLocator.

Unique KIDs

Make the kid value unique across orgs -- then we can use this value in the header to find the key. We then just have to make sure the kid belongs to the appropriate org.

Custom Header

We can add our own new header to the JWT that represents the organization ID we are authorizing as

Exposed Issuer

There are some IETF discussions around exposing the issuer somehow. Last discussion was in early January and the draft expires 4/25/2024 so low optimism on this coming to fruition.

Related reading:

GitHub Issue - Closed issue on the library with the same problem we are having (needing access to the issuer in the payload)
JWT Best Practices RFC - Describes best practices with JWT (including unpacking payload without signature verification)
IETF Draft Proposal - Draft proposing changes to provide access to issuer
FHIR Auth Best Practices

@snesm
Copy link
Contributor

snesm commented Mar 13, 2024

@dependabot recreate

@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch 3 times, most recently from 60f1382 to f2b5f09 Compare March 17, 2024 07:25
@snesm snesm removed the security Work Type label to flag work related to security label Mar 20, 2024
@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch 2 times, most recently from 8605274 to a4edd73 Compare March 26, 2024 21:06
@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch from a4edd73 to af49b2d Compare March 31, 2024 07:45
@snesm
Copy link
Contributor

snesm commented Apr 4, 2024

@dependabot recreate

@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch 2 times, most recently from e9c20a7 to dbda63b Compare April 7, 2024 07:23
@snesm
Copy link
Contributor

snesm commented Apr 10, 2024

@dependabot recreate

@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch 2 times, most recently from eb6a637 to 96d1906 Compare April 14, 2024 07:46
@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch from 96d1906 to b0458ce Compare April 21, 2024 07:43
@snesm
Copy link
Contributor

snesm commented Apr 24, 2024

@dependabot recreate

@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch 2 times, most recently from df15ada to a75f702 Compare April 28, 2024 07:22
@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch from a75f702 to 62b8833 Compare May 5, 2024 07:57
@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch 2 times, most recently from 0bef162 to 087cdaf Compare May 19, 2024 07:39
@thetaurean thetaurean removed their assignment May 23, 2024
@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch 2 times, most recently from bb4c210 to 9e28acf Compare May 26, 2024 07:58
@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch from 9e28acf to 3706486 Compare June 2, 2024 07:03
@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch 2 times, most recently from 679d093 to 2df5e0b Compare June 12, 2024 17:06
@snesm snesm added security Work Type label to flag work related to security and removed security Work Type label to flag work related to security labels Jun 13, 2024
Bumps the jwt-verifier group in /prime-router with 2 updates: com.okta.jwt:okta-jwt-verifier and com.okta.jwt:okta-jwt-verifier-impl.


Updates `com.okta.jwt:okta-jwt-verifier` from 0.5.7 to 0.5.8

Updates `com.okta.jwt:okta-jwt-verifier-impl` from 0.5.7 to 0.5.8

---
updated-dependencies:
- dependency-name: com.okta.jwt:okta-jwt-verifier
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jwt-verifier
- dependency-name: com.okta.jwt:okta-jwt-verifier-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: jwt-verifier
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch from 2df5e0b to 6a533da Compare June 16, 2024 07:44
@snesm
Copy link
Contributor

snesm commented Jul 1, 2024

superseded by #14947

@snesm snesm closed this Jul 1, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 1, 2024

This pull request was built based on a group rule. Closing it will not ignore any of these versions in future pull requests.

To ignore these dependencies, configure ignore rules in dependabot.yml

@dependabot dependabot bot deleted the dependabot/gradle/prime-router/jwt-verifier-624a7a47db branch July 1, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants