Repository navigation
fix(backend): Stop verifying ES256 tokens - #11105
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
🦋 Changeset detectedLatest commit: 7ce41c3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
maxmil
left a comment
There was a problem hiding this comment.
Nice to see we've actually simplified things.
Minor nitpik: Not sure we need to prove we can verify RS384 and RS512 as these are not in spec
Small wording error in the PR body: it says a P-256 jwtKey fails as token-invalid-signature. It actually fails as token-verification-failed ("Invalid key type"). Either way the user is signed out.
…-es256 # Conflicts: # packages/backend/src/tokens/keys.ts
…-es256 # Conflicts: # packages/backend/src/tokens/keys.ts
# Conflicts: # packages/backend/src/tokens/__tests__/keys.test.ts # packages/backend/src/tokens/__tests__/verify.test.ts # packages/backend/src/tokens/keys.ts


Summary
Stacked on #11107.
@clerk/backendremoves the ES256 support added in 3.34.0 and stops accepting ES256 tokens, and a configuredjwtKeyis always used to verify. Multi-key JWKS, composite kids and kid-based key selection from #11036 stay.Evidence
After:
verify.test.ts"rejects an ES256 session JWT with token-invalid-algorithm" passes, and an RS256 token still verifies while the JWKS lists an EC key.jwtKeymakes 0 JWKS requests when the signature check fails.Merge Danger
Door: two-way
A revert restores ES256. An ES256 session cookie is signed out on this version, not refreshed through a handshake.
Blast Radius: verification
jwtKeyset to a P-256 key stops working.signJwt/verifyJwtthrow forES256.jwtKeynever calls the network, which matches the behavior before 3.34.