4 ms·
I'd observe that this is testing the default TLS configuration when you ask net/http to "Just TLS that connection for me, will you?" with no further details. I
by jerf 11y ago
I'd observe that this is testing the default TLS configuration when you ask net/http to "Just TLS that connection for me, will you?" with no further details. I imagine almost any version could get to A- if you configured it (PFS seems like it may have been a feature that had to be added), and per selectnull's point about Strict Transport Security, you probably should not output that header by default so an A+ with a default configuration would arguably actually be a bad thing.
I certainly do not mean this is an unfair question to ask; quite the contrary! (It has been said "defaults matter", but I'm really coming around to the idea that even that understates the truth. Options almost don't matter. They do. But just barely.) More people should ask this of more code. I just want to make sure non-Go programmers understand what is being said here, that this is the default, not the top capability of the built-in Go TLS stack of those versions.
- tptacek 11y agoAn HSTS default would probably be a good thing, but HSTS is hard to undo, because it's cached in browsers. We'd all be better off if net/http served HSTS by default, but individual users of the library might not be.
- jerf 11y agoHalf in my spare time, half at work I'm working on a Go web framework that tries to turn the web "default deny", and to do so with good API design that makes the default safe (so, it's a lot harder than just "write a middleware that slaps some headers on top"). I'm willing to be a bit of a jerk about cookies (if you want the client to be able to read it, say so, etc.), I'm willing to make you say "Look, just turn off CSP" if that's how you're going to roll... but even as much of a jerk as I'm being, I'm shying away from defaulting HSTS to on. I'm currently thinking of making it simply not defaulted; take a stand one way or the other, but just defaulting it to on is a bit scary.
- tptacek 11y agoIf I was building a framework, I'd probably force users to select an option, rather than providing a silent default either way. The right option name for this is probably "Protect against HTTPS-stripping".
- jerf 11y agoThank you for your confirmation, I will do that then. Not sure when or frankly even if it will go public, but I hope it will. Still have a lot of work to do on it before it's worth anything. Edit: Also, thank you for the name suggestion. One of the other things I've noticed is that a lot of web security is... well... let's say, named in a way that does not always make it clear exactly what it means. I'm trying to make this stuff more clear in the naming too.
- mikecb 11y agoIt's also the grade that 1.4.3 got recently, not when it came out. I wonder if Ivan Ristic could go back in time to the test code then and see what grade it would get.
- deleted 11y ago[deleted]