3 ms·
Are you implying that the "encrypted route" doesn't need to be verified on every request?
by k__ 11y ago
Are you implying that the "encrypted route" doesn't need to be verified on every request?
- tracker1 11y agoYou have to decrypt it to read it... you need the key to do that. If you are referring to revoking tokens before expiration, that's a separate issue, and yes it would require a check... but this would be true of any session based system.
- ebbv 11y agoI think the point is regardless of whether you need to decrypt it to read it or not, you should be verifying the content against a signature. Otherwise the content could be forged.
- eloisius 11y agoIf you use something like jwt-ruby, you get signature verification out of the box.
- tracker1 11y agoWhen it's symetrically encrypted, you have the key, it's verified if it decrypts to a valid value. When it's asymetrically signed, you are supposed to verify the signature.
- tracker1 11y agoSeeing a recently posted vulnerability article, I now see your point... which is funny, in practice, I found JWT so easy to implement a naive solution, I only implemented the pieces I needed as my own authority... One time was JWE (encrypted) with a private key, and the other was asymetricly encrypted, not HS256 ... so there wasn't a means to bypass the intended method used by the system. Yes, if you are going to implement/support a number of mixed methods for generating tokens (or a use a client library that does), you absolutely need to confirm that the expected header/signature matches.