Live data from Hacker News

A modern approach to preventing CSRF in Go

alexedwards.net

101–104 of 104 posts

Re: A modern approach to preventing CSRF in Go

#101

Earlier quoted context omitted.

No, in CSRF the browser is not the adversary, it is a confused deputy, and it’s perfectly reasonable to collaborate with it against the attacker (which is another site). You might want to read https://words.filippo.io/csrf .

You might want to read https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Re...

You might want to develop some critical thinking skills. The doc is wrong, and will soon be updated to say that Sec-Fetch-Site is sufficient on its own.

https://github.com/OWASP/CheatSheetSeries/issues/1803

Re: A modern approach to preventing CSRF in Go

#102
post #86

Earlier quoted context omitted.

https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Re...

Yes, this is documenting one particular way of doing CSRF. A specific implementation. The OP is documenting another implementation to protect against CSRF, which is unsuitable for many since it fails to protect 5% of browsers, but still an interesting look at the road ahead for CSRF and in some years perhaps everyone will change how this is done. And you say isn't OK, but have not in my opinion properly argued for wh…

It doesn't actually fail to protect 5%, as the top-line 5% aren't really "browsers". Even things like checkboxes often top out at around 95%!

You can change a setting on caniuse.com and it excludes untracked browsers. Sec-Fetch-Site goes up to 97.6, with remainder being a bit of safari (which will likely update soon) and some people still on ancient versions of chrome.

The fallback origin header goes to 99.8 coverage.

Re: A modern approach to preventing CSRF in Go

#103
post #51

Earlier quoted context omitted.

Sorry, but you seem to be lost. I, the article and most comments here quite explicitly talked about server security via Auth and csrf protections. None of this has anything to do with browser security, such as stealing csrf tokens (which tend to be stored as hidden fields on elements in the html, not cookies). MOREOVER, Sec-Fetch-Site obviates the need for csrf tokens.

"MOREOVER, Sec-Fetch-Site obviates the need for csrf tokens.", you're just posting misinformation, you are flat out wrong. "It is important to note that Fetch Metadata headers should be implemented as an additional layer defense in depth concept. This attribute should not replace a [sic] CSRF tokens (or equivalent framework protections)." -- OWASP; https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Re...

Once again, you have no idea what you're talking about. Moreover, you lack critical thinking skills - the Sec-Fetch-Site section in that doc is senseless and will now be modified to say that Sec-Fetch-Site is sufficient on its own.

https://github.com/OWASP/CheatSheetSeries/issues/1803

Re: A modern approach to preventing CSRF in Go

#104
post #100

Earlier quoted context omitted.

https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Re...

The doc is wrong and will be updated soon to say that Sec-Fetch-Site is sufficient on its own. https://github.com/OWASP/CheatSheetSeries/issues/1803

Wow, nice thread!
Post reply on HN