News for hackers. Stuff that matters.
Re:Fencing Your SSL Errors With HSTS by nodesocket on Sunday January 20, 2013 @06:45AM (#5086634)
At http://commando.io we implement HSTS in the nginx server block:

    # Enable Strict-Transport-Security for one year
    add_header Strict-Transport-Security max-age=31556926;
Re:Fencing Your SSL Errors With HSTS by Kudos on Sunday January 20, 2013 @09:24AM (#5086968)
https://commando.io/ serves up your PHPMyAdmin.

Edit: also, because of HSTS I can only visit your "secure" site and can no longer get to your marketing page to see what it is you do.

Re:Fencing Your SSL Errors With HSTS by nodesocket on Sunday January 20, 2013 @10:04AM (#5087092)
Good catch, fixing that now.
Re:Fencing Your SSL Errors With HSTS by Kudos on Sunday January 20, 2013 @10:23AM (#5087135)
I'll just wait a year for the cached HSTS flag to expire ;)
Re:Fencing Your SSL Errors With HSTS by nodesocket on Sunday January 20, 2013 @11:35AM (#5087304)
Should be good now. Just working on a solution for GitHub buttons not supported over SSL.
Re:Fencing Your SSL Errors With HSTS by mguillemot on Sunday January 20, 2013 @07:08AM (#5086676)
It's worth noting that Rails enables HSTS for the whole domain when you use the following in one of your config files (usually production.rb):

    config.force_ssl = true
Re:Fencing Your SSL Errors With HSTS by ch0wn on Sunday January 20, 2013 @08:51AM (#5086873)
And for Flask users there is flask-sslify[0] by Kenneth Reitz for this.

[0] https://github.com/kennethreitz/flask-sslify

Re:Fencing Your SSL Errors With HSTS by Kudos on Sunday January 20, 2013 @09:29AM (#5086995)
I presume something like this is only useful for services like Heroku where you can't set it in your webserver directly?
Re:Fencing Your SSL Errors With HSTS by MichaelGG on Sunday January 20, 2013 @11:21AM (#5087272)
It's also useful if your app requirements trump deployment requirements. You might want a particular app to always require SSL, regardless of how it is deployed.
Re:Fencing Your SSL Errors With HSTS by albay on Sunday January 20, 2013 @06:34AM (#5086606)
Explained HSTS policy in depth. For more information about how to implement it;

http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security

Re:Fencing Your SSL Errors With HSTS by FlyingAvatar on Sunday January 20, 2013 @07:02AM (#5086667)
What is the benefit of using this over simply redirecting / forcing SSL use for form handlers and other sensitive URLs on the application end.

Doesn't this just add more complexity to a problem that is not that hard to solve?

Re:Fencing Your SSL Errors With HSTS by mguillemot on Sunday January 20, 2013 @07:14AM (#5086692)
It prevents anyone controlling the DNS resolvers of your clients to redirect to faked HTTP website (of course, only for those of your clients who already visited your real website).

Imagine you're using my WiFi connection. Without HSTS, I could redirect you to a fake http://www.facebook.com to steal your login credentials if you do not notice the login page is not served over HTTPS (and let's be realistic: most non-technical people won't notice something that's supposed to be there, but is not).

Re:Fencing Your SSL Errors With HSTS by tptacek on Sunday January 20, 2013 @07:15AM (#5086697)
FWIW this is called "SSL stripping".