Earlier quoted context omitted.
The proposal says that server-side expiration is still required. The ability to request that the client delete the token when the computer is locked is purely additive; if the client does not honor it, at worst you just get something equivalent to the status quo with cookies. If the client works correctly, you get a security feature that is currently impossible with cookies (wiping the session as soon as the laptop l…
It is possible currently. Just attach an `beforeunload` listener which asks the server to invalidate the current session.
Show HN: WebSession, a Secure Replacement for Cookies
101–110 of 113 posts
Re: Show HN: WebSession, a Secure Replacement for Cookies
#102Cookies 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
#103Hi! 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 s…
Noces are a non-starter for me. You cite trivial issues such as setting flags on a cookie, then go on to require checking nonces for uniqueness. You know what most people would do? They would ignore the expensive nonce check. This would turn this into an expensive client generated opeque token. How would you handle sites setup with sub domains? Reading between the lines, it sounds like you want a alternative session…
Re: Show HN: WebSession, a Secure Replacement for Cookies
#104Hi! 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 s…
Trying again to be more constructive, rather than having a nonce, make the nonce meaningful, so there is a time component, such as seconds from initiating the session, and a validation portion that shows this came from the session function and attests the time portion is valid. Then nonce storage, if you do it, can be limited to window when it is valid.
Re: Show HN: WebSession, a Secure Replacement for Cookies
#105I know this is a replacement for cookie, but some web apps use JS and sessionStorage on browser to store session token instead of using cookie. This protocol seems to also depend on JS to do client side cryto logic and adding HTTP headers. Unless by browser/client it means the actual browser, which would take ages to get implemented across all user agents. In which case, it would likely be polyfilled by JS first as t…
> This protocol seems to also depend on JS It doesn't mention any dependency on JS, there's pseudocode in Python to demonstrate generating/using the token. > but some web apps use JS and sessionStorage on browser to store session token instead of using cookie This is particularly strange, I've seen that frontend apps do this but I can't understand why because it's error prone and excellent attack vector. It boils dow…
Also, sessionStorage is a web standard and it is designed to store data to be used in the session. If you think frontend devs shouldn't use it because they are incompetent at handling XSS, then maybe backend devs should also not use databases because they might leave the port open to public internet.
Re: Show HN: WebSession, a Secure Replacement for Cookies
#106I know this is a replacement for cookie, but some web apps use JS and sessionStorage on browser to store session token instead of using cookie. This protocol seems to also depend on JS to do client side cryto logic and adding HTTP headers. Unless by browser/client it means the actual browser, which would take ages to get implemented across all user agents. In which case, it would likely be polyfilled by JS first as t…
The protocol does provide for fallback: if the client doesn’t understand the WWW-Authenticate: WebSession header, it can just choose to ignore it and send a request without Authorization, at which point the server can fall back to a traditional session mechanism.
Re: Show HN: WebSession, a Secure Replacement for Cookies
#107The 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…
Re: Show HN: WebSession, a Secure Replacement for Cookies
#108>>>If someone steals this cookie, they can impersonate you. Right; but with WebSession, if someone steals the client keypair (and generated shared secret), they can impersonate you just as easily. Why would this be any more secure against that? Cookies aren't perfect, for sure, but I don't think this solves it.
You can steal a bearer token just by observing the request. You can’t steal a private key by observing a signed request. With a WebSession the attacker has to pwn your machine instead of your DNS.
This seems to help mostly against servers improperly using cookies, servers improperly logging request content, and users improperly uploading HAR files that include bearer token.
And anyone who does those things improperly will also implement WebSession improperly - like not bothering to keep track of nonces - so what does it really gain us?
edit: just broadly on "pwn your machine vs pwn your DNS" - overall, in the general case, machines are much much easier to pwn.
Re: Show HN: WebSession, a Secure Replacement for Cookies
#109Re: Show HN: WebSession, a Secure Replacement for Cookies
#110Earlier quoted context omitted.
You can steal a bearer token just by observing the request. You can’t steal a private key by observing a signed request. With a WebSession the attacker has to pwn your machine instead of your DNS.
Has to pwn your DNS and SSL, you mean. If someone has broken that, they'll get my credentials when I have to login at some point. This seems to help mostly against servers improperly using cookies, servers improperly logging request content, and users improperly uploading HAR files that include bearer token. And anyone who does those things improperly will also implement WebSession improperly - like not bothering to…