Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable HTTP Strict Transport Security (HSTS) #69

Open
dentarg opened this issue Dec 26, 2017 · 8 comments
Open

Enable HTTP Strict Transport Security (HSTS) #69

dentarg opened this issue Dec 26, 2017 · 8 comments

Comments

@dentarg
Copy link
Member

dentarg commented Dec 26, 2017

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

@dentarg
Copy link
Member Author

dentarg commented Dec 26, 2017

@dentarg
Copy link
Member Author

dentarg commented Dec 26, 2017

Should it be done in the Ruby app or in the Nginx proxy?

@dentarg
Copy link
Member Author

dentarg commented Dec 26, 2017

Is there anything we should think of in regards to HSTS / preload and Let's Encrypt?

@jage
Copy link
Member

jage commented Dec 26, 2017

Also preload?

Sure, I do preload on duh.se. IMO if you start with HSTS you should be really committed to HTTPS, thus preload should only be a upside.

Should it be done in the Ruby app or in the Nginx proxy?

Ruby, I think. To avoid being to dependent on this proxy setup.

Is there anything we should think of in regards to HSTS / preload and Let's Encrypt?

Don't think so, except that we are basically bound to use HTTPS forever.

@dentarg dentarg changed the title Enable HTTP Strict Transport Security (HSTS)? Enable HTTP Strict Transport Security (HSTS) Dec 26, 2017
@dentarg dentarg removed the question label Dec 26, 2017
@dentarg
Copy link
Member Author

dentarg commented Dec 26, 2017

https://hstspreload.org/?domain=starkast.wiki says

Error: www subdomain does not support HTTPS
Domain error: The www subdomain exists, but we couldn't connect to it using HTTPS ("x509: certificate is valid for film.starkast.net, fry.starkast.net, huvud-fry.starkast.net, huvud-kif.starkast.net, huvud.starkast.net, im.starkast.net, kif.starkast.net, lara.starkast.net, ludde.starkast.net, patrik.starkast.net, skuld.starkast.net, starkast.net, wiki.starkast.net, www.starkast.net, not www.starkast.wiki"). Since many people type this by habit, HSTS preloading would likely cause issues for your site.

I get the feeling that hstspreload.org doesn't understand SNI.

Can you do HSTS preload with SNI?

@dentarg
Copy link
Member Author

dentarg commented Dec 26, 2017

I get the feeling that hstspreload.org doesn't understand SNI.

Hmm... jekyll/jekyll#6432 (comment)

Yes, hstspreload.org should be able to handle SNI-only sites without problem.

@dentarg
Copy link
Member Author

dentarg commented Dec 26, 2017

Oops

$ curl -s -v https://www.starkast.wiki
* Rebuilt URL to: https://www.starkast.wiki/
*   Trying 212.63.204.17...
* TCP_NODELAY set
* Connected to www.starkast.wiki (212.63.204.17) port 443 (#0)
* SSL certificate problem: Invalid certificate chain
* Closing connection 0

@dentarg
Copy link
Member Author

dentarg commented Jan 15, 2018

Fixed now

$ curl -s -v -o /dev/null https://www.starkast.wiki
* Rebuilt URL to: https://www.starkast.wiki/
*   Trying 80.252.185.193...
* TCP_NODELAY set
* Connected to www.starkast.wiki (80.252.185.193) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate: starkast.wiki
* Server certificate: Let's Encrypt Authority X3
* Server certificate: DST Root CA X3
> GET / HTTP/1.1
> Host: www.starkast.wiki
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Server: nginx
< Date: Mon, 15 Jan 2018 23:58:55 GMT
< Content-Type: text/html
< Content-Length: 178
< Connection: keep-alive
< Location: https://starkast.wiki/
<
{ [178 bytes data]
* Connection #0 to host www.starkast.wiki left intact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants