Harden JWT auth configuration and disable public token minting#17
Open
Dreamstore2046 wants to merge 1 commit into
Open
Harden JWT auth configuration and disable public token minting#17Dreamstore2046 wants to merge 1 commit into
Dreamstore2046 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
JWT_SECRETfrom configurationJWT_NOT_BEFOREenforcement so deployments can reject tokens issued before a rotation timestamp/auth/logintoken-minting endpoint until wallet signature verification is implementedCloses #13
Security note
This is a P0 mitigation for the published-secret and sign-anything behavior. Operators still need to rotate any production JWT secret and database credentials that may have used previously committed values. A full CIP-30/CIP-8 challenge-response login flow can be added after this stops unauthenticated arbitrary JWT minting.
Validation
corepack yarn test --runInBandcorepack yarn buildgit diff --checkrg "f6193c376fa7037461ef0b1b061c40c556646aef5d72805b4808bc61db73031cea8599910299e9124a32be0cf9b93aed9398c8b0166653bfc8713aa11a64f845|jwtConstants" backend/src -nreturned no matches