Re:A practical security guide for web developers
by k__ on Friday July 22, 2016 @06:02AM
(#12142670)
Why not using one key per user? Then I would just have to invalidate this one user and not all of them.
[ Parent
| on HN ]
Re:A practical security guide for web developers
by rahkiin on Sunday July 24, 2016 @07:49AM
(#12153068)
You don't know who the user is until you verified the integrity of the JWT. Verifiying the integrity requires the secret. Your solution adds the dependency: the secret requires the user. It is cyclic, unsolvable without breaking a constraint.
You could assume the username is correct, then get the secret, validate. But that sounds like something breakable.