News for hackers. Stuff that matters.
Re:Biscuit Authorization by tptacek on Thursday December 14, 2023 @12:56AM (#38638280)
So does every Rails and Django encrypted session token.
Re:Biscuit Authorization by gkbrk on Thursday December 14, 2023 @01:38AM (#38638484)
How do you revoke an encrypted session token that doesn't need to hit the database to see if the request is authorized?
Re:Biscuit Authorization by DecoPerson on Thursday December 14, 2023 @01:46AM (#38638531)
Include an expiry time in the encrypted part. The encryption, and the fact the token decrypts invalidly if not encrypted with the correct key, acts like a discount JWT.

Encrypted session tokens with embedded expiry will serve the needs of 99% of applications/services.

Re:Biscuit Authorization by tonyhb on Thursday December 14, 2023 @02:13AM (#38638652)
In that case why not use JWTs which do this for you? In your case you end up building a subset of JWTs yourself.
Re:Biscuit Authorization by grey-area on Thursday December 14, 2023 @04:35AM (#38639505)
A subset of JWTs sounds great given the previous security vulnerabilities found in JWTs and the huge surface area they give you:

https://www.akto.io/blog/jwt-none-algorithm-test

Re:Biscuit Authorization by robertlagrant on Thursday December 14, 2023 @04:51AM (#38639608)
This is not a huge surface area. I don't know why this keeps coming up, but, while a silly default, is incredibly straightforward to not configure / remove / test for.
Re:Biscuit Authorization by grey-area on Saturday December 16, 2023 @02:45AM (#38662543)
JWTs are definitely a much larger surface area than simpler encrypted sessions storage and most people don’t need that.

I cited this as one example of that surface area that led to serious vulnerabilities. Most people don’t need multiple ways to encrypt their data, and certainly not a ‘no encryption’ option. Each added option adds more ways to mess things up.

Re:Biscuit Authorization by the_gipsy on Thursday December 14, 2023 @03:10AM (#38638981)
These might predate JWTs.
Re:Biscuit Authorization by kevindamm on Thursday December 14, 2023 @03:34AM (#38639138)
Indeed, RFC 7519 dates from 2015 while both Rails and Django are older than that by a decade or more.
Re:Biscuit Authorization by DecoPerson on Thursday December 14, 2023 @07:30AM (#38640652)
JWTs are complex.

Encrypted session cookies are a proven solution, widely used, and easy to implement yourself using only core libraries (http, crypto, JSON) without introducing security flaws IFF you are an experienced programmer and don’t deviate from the norm.

JWTs are complex. Too complex to implement yourself, so you need to introduce dependencies. Dependencies are usually huge, and each line of code introduces risk (even if that line is for a configuration you don’t use!). Using JWTs at all is far more risky, even if you are an experienced programmer.

If JWTs provides immense benefits over session tokens for your use case, that risk might be worth it. However, for most web apps, session tokens are good enough.

Re:Biscuit Authorization by marcus_holmes on Sunday December 17, 2023 @09:31PM (#38678630)
No idea why you're being downvoted. This is the truth.
Re:Biscuit Authorization by NovemberWhiskey on Thursday December 14, 2023 @08:13AM (#38640959)
Revocation in this context almost always means "suspension of the validity of a token prior to expiration", so that's not really an answer.
Re:Biscuit Authorization by jameshart on Thursday December 14, 2023 @09:21AM (#38641599)
Sure. Just pushing back on the ‘you’re going to hit the database anyway’ argument. Having some kind of mechanism for eliminating obviously bogus requests is a good idea. Some sort of signed, expiring token is probably a good idea for that. Rolling your own expiry/signing mechanism is probably a bad idea. Correctly validated JWTs are an option (among many) for solving that problem.