Live data from Hacker News

Show HN: WebSession, a Secure Replacement for Cookies

websession.dev

51–60 of 113 posts

Re: Show HN: WebSession, a Secure Replacement for Cookies

#51
Hi! Author of this proposal here.

I’m loving all the feedback and wanted to address some things:

* Yes, nonce tracking is expensive. HTTP request signatures could be used instead of nonces—they’re just not fully fleshed out yet, from what I can tell. And a lot of other crypto systems we rely on in Web traffic today also assume proper nonce tracking. Fortunately you only need to track distinct nonces per established session, so you could wait to allocate storage for them until the client actually tries to set up a WebSession, and use a Bloom filter to save on storage at the risk of some false positives for nonce reuse (could be risky if you’re relying on that as tamper evidence, but you could tune your filters accordingly).

* The stuff about the ergonomics of cookies and banners and auto-log-out as they currently are is mostly incidental. I’m just trying to paint a picture of how tighter integration of the notion of a ‘session’ into the browser itself could improve the UX we currently have today.

* Many people have pointed out that this is not stateless. Indeed! This is supposed to be a more secure way of establishing a stateful connection over a stateless protocol, for which there is already a demand which we’re meeting with the least secure possible method (bearer tokens sent in plaintext over the channel). Issues with scalability need to be addressed on the implementation side, but I believe the protocol is still sound and not inherently unscalable (no more than TLS in its current form).

I am going to look for opportunities to fold these points into the document itself, and maybe rearrange some of it so that these points get covered earlier and more clearly.

Re: Show HN: WebSession, a Secure Replacement for Cookies

#52
post #49

Earlier quoted context omitted.

Still lots of sites have cookie banners because the legal department demands them, even though they are not needed for the cookies they use.

Maybe they need better legal departments that can actually read and understand laws?

Nobody ever got fired for joining the cargo cult.

Re: Show HN: WebSession, a Secure Replacement for Cookies

#53

Cookies are not really about security, but privacy. Their tracking of your online habits are bad; how would that change with WebSessions?

From my reading of the article, WebSessions specifically doesn't do tracking. It's a replacement only for session cookies, not for tracking cookies. So with WebSessions for session maintenance, you can turn of cookies completely, if you want to avoid tracking.

It looks pretty reasonable to me (except possibly the nonce-management bit). I can't be bothered to try and pick it apart, and anyway I'm no expert.

Re: Show HN: WebSession, a Secure Replacement for Cookies

#54

Cookies are not really about security, but privacy. Their tracking of your online habits are bad; how would that change with WebSessions?

I don't clear cookies because session cookies are useful. If cookies are never session cookies, then I can treat all cookies as useless.

Re: Show HN: WebSession, a Secure Replacement for Cookies

#55

> Because WebSession is dedicated to session maintenance and nothing else, a client could theoretically reject all cookies on any supporting site, ideally skipping the jarring cookie banner experience. This has nothing to do with cookies, the banner is required if the site is processing data that is not just technically necessary. In this case the site needs to ask the user for consent or at least inform them of proc…

Still lots of sites have cookie banners because the legal department demands them, even though they are not needed for the cookies they use.

I recall a friend of mine worked support for some sass meeting software (oncehub-like) and got an email from a non-technical user asking if the booking invite page is missing a cookie notice.

He had to explain that they re-engineered the page a while back to not collect any data besides what the person puts into the form (the page explains that collection, but inline) so they wouldn't need one. Don't know if it was an aesthetic choice or if they AB tested it.

Re: Show HN: WebSession, a Secure Replacement for Cookies

#56

It’s also very common that a website wants credentials to be cleared when the user is inactive for a certain amount of time. This is important for sensitive applications such as banking and healthcare. Currently there’s no way to enforce that a cookie is cleared on device lock or user inactivity, especially because security requires that such cookies not be visible to JavaScript. A native session management solution…

Surprisingly, there's several cookie-based approaches that forget to handle any sort of server-side expiration. Here's one: https://github.com/googleapis/nodejs-firestore-session/issue... I agree that WebSession would benefit from a time since last touched expiration, although I'll point out that a time-based approach doesn't handle the "when device is locked" requirement.

I've noticed reddit doesn't invalidate your cookies even if you click the logout button. There is a button in the site settings under your list of sessions, but I haven't tested that.

I noticed it because I delete site cookies often, and paste them in from a file whenever I want to comment. Occasionally click "logout" without thinking. Got creeped out by that year-in-review thing they do once.

Re: Show HN: WebSession, a Secure Replacement for Cookies

#57

> Because WebSession is dedicated to session maintenance and nothing else, a client could theoretically reject all cookies on any supporting site, ideally skipping the jarring cookie banner experience. This has nothing to do with cookies, the banner is required if the site is processing data that is not just technically necessary. In this case the site needs to ask the user for consent or at least inform them of proc…

[deleted]

Re: Show HN: WebSession, a Secure Replacement for Cookies

#58
post #49

Earlier quoted context omitted.

Maybe they need better legal departments that can actually read and understand laws?

Nobody ever got fired for joining the cargo cult.

I wouldn’t be so sure. Joining the cargo cult doesn’t make you immune to the law.

https://noyb.eu/en/noyb-aims-end-cookie-banner-terror-and-is...

Re: Show HN: WebSession, a Secure Replacement for Cookies

#59

The only real advantage I see here is having a dedicated storage for session identifiers as opposed to clubbing it with other non-essential cookies. Everything else in the proposal isn't really required. Considering this, simply choosing a standard name for session cookies suffices. Browsers can give an option to the user to rejects all cookies that don't have the name "WebSession". This is already achievable using e…

The instant you implement that, then everyone will just start squeezing all the tracking information they need into the WebSession cookie. Plus, this isn't backwards compatible with all the existing servers that use custom names for the session cookie. PHPSESSID, session_id, etc.

> everyone will just start squeezing all the tracking information they need into the WebSession cookie

Why would you need to put more information into the cookie if it's already unique?

Re: Show HN: WebSession, a Secure Replacement for Cookies

#60

> Because WebSession is dedicated to session maintenance and nothing else, a client could theoretically reject all cookies on any supporting site, ideally skipping the jarring cookie banner experience. This has nothing to do with cookies, the banner is required if the site is processing data that is not just technically necessary. In this case the site needs to ask the user for consent or at least inform them of proc…

Still lots of sites have cookie banners because the legal department demands them, even though they are not needed for the cookies they use.

Yeah, companies tend to be over-careful. They trust the legal department knows what they're talking about but in this case they don't, but the company decides to listen to them anyway. Especially if the legal department is a part of a US company, thinking they adhere to some EU regulation they can't seem to quite understand fully.

:shrug:

Post reply on HN