News for hackers. Stuff that matters.
Re:Google won't ditch third-party cookies in Chrome after all by Buttons840 on Tuesday April 22, 2025 @08:13PM (#43767514)
> You as a user can delete, modity, edit, hack them to your heart's content.

This is not true in practice though. Cryptography means they cannot be altered if their creator doesn't want them to be altered.

Of all the CRUD operations, users can only realiably delete the cookie.

Re:Google won't ditch third-party cookies in Chrome after all by NBJack on Tuesday April 22, 2025 @09:42PM (#43767943)
I gotta ask: how many cryptographically secure cookies have you encountered? In theory, yes. In practice? That's kind of expensive.
Re:Google won't ditch third-party cookies in Chrome after all by briHass on Tuesday April 22, 2025 @10:43PM (#43768201)
Anything on the ASP.NET stack has it in forms auth tickets and role cookies. You could store additional data in the forms auth one, and it auto-rotates the encryption at half the session length.

One of the best authentication libraries at the time.

Re:Google won't ditch third-party cookies in Chrome after all by mubou on Tuesday April 22, 2025 @11:31PM (#43768396)
ASP.NET is so underrated. It's by far the most comprehensive and adaptable web framework I've ever encountered.
Re:Google won't ditch third-party cookies in Chrome after all by solardev on Wednesday April 23, 2025 @12:40AM (#43768649)
Microsoft's developer experience is often world class. If they hadn't burned so much goodwill in the 90s and 2000s through embrace, extend, extinguish, they might have won (or at least stayed relevant) through the Web wars.

It's still hard to trust them today, for me at least.

Re:Google won't ditch third-party cookies in Chrome after all by mubou on Wednesday April 23, 2025 @04:51AM (#43769953)
The fact that we're both being downvoted without a reply/explanation is a testament to that, it seems :(

I can't imagine anyone who's actually used it responding that way.

Re:Google won't ditch third-party cookies in Chrome after all by 3np on Tuesday April 22, 2025 @11:33PM (#43768406)
Storing JWTs as cookies is not that rare in practice.
Re:Google won't ditch third-party cookies in Chrome after all by rileymat2 on Tuesday April 22, 2025 @10:04PM (#43768040)
As far as preventing editing, but not reading, JWTs are very common.
Re:Google won't ditch third-party cookies in Chrome after all by dudeinjapan on Tuesday April 22, 2025 @10:45PM (#43768219)
Many web frameworks like Rails allow you to easily fully encrypt (make unreadable to browser) or sign (make readable but not editable) with a server-side key. Some pen testers will report unsigned or unencrypted cookies so I imagine its quite common.
Re:Google won't ditch third-party cookies in Chrome after all by zeroCalories on Tuesday April 22, 2025 @09:54PM (#43767991)
If you wanna do any kind of restful service securely you need to sign your data.
Re:Google won't ditch third-party cookies in Chrome after all by jkrejcha on Tuesday April 22, 2025 @10:51PM (#43768241)
There's nothing about that that requires JWTs/signed cookies.

You may need JWTs or their moral equivalents for 3rd party services but, especially for 1st party services, session identifiers are a fine enough scheme that are oftentimes implemented more securely and have the same amount of statelessness (at least from a REST perspective) as a JWT.

Not that cookies are allowable within the constraints of REST anyway due to violation of the uniform interface/stateless constraints, but pragmatically cookies have the most user agent support, and when used as just an session identifier, are relatively close to following the constraints and are much better supported than using the Authorization header or whatever[1].

Statelessness (the lack of "sessions") refers generally to the fact that the client and the server don't need to share state, i.e. the client has all it needs to make a request rather than, like, an "authorization context" or something (which is what a "user session" colloquially is). Unfortunately, the difference in the way the terms were used kinda led to this confusion which made people think that they weren't doing REST unless they were using JWTs or signed cookies.

It's the difference between storing the shopping cart in a cookie or what have you vs. creating a shopping cart resource. In the former scenario, the server has to track where in the (often implicit) state machine the current client is[2], whereas in the latter, the client has all it needs (a URI, authz token, etc) to make the request and all the state is stored server-side.

[1]: If browsers had better support for setting the Authorization header somehow, this would almost certainly just be a "best practice" that we take for granted. Automated clients with API keys tend to be better in this regard.

[2]: And there are significant disadvantages to doing it this way, if you've ever lost your cart or got those weird "session expired" errors after hitting the back button, you've ran into the pitfalls of doing it this way.

Re:Google won't ditch third-party cookies in Chrome after all by Fire-Dragon-DoL on Wednesday April 23, 2025 @01:01AM (#43768742)
Rails encrypts them too, or sign them, one of the two. Either way, you cannot tamper them
Re:Google won't ditch third-party cookies in Chrome after all by franga2000 on Wednesday April 23, 2025 @04:27AM (#43769824)
They used to be the norm in Django, Flask, RoR and ASP.NET, which made up the majority of the non-PHP web. These days database queries are cheap enough that most new sites just use session tokens, but that's also not something you can modify (well, besides transplanting it from a different session).
Re:Google won't ditch third-party cookies in Chrome after all by creatonez on Wednesday April 23, 2025 @12:19AM (#43768577)
> Of all the CRUD operations, users can only realiably delete the cookie.

I mean, one other operation I can think of is swapping a cookie out for a different one, so you can have two separate sessions managed independently... Which is essentially what Firefox's container tabs are.