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

HTTP/2 support #57

Closed
s4y opened this issue Aug 15, 2016 · 40 comments
Closed

HTTP/2 support #57

s4y opened this issue Aug 15, 2016 · 40 comments

Comments

@s4y
Copy link

s4y commented Aug 15, 2016

Submitting a website which supports HTTP/2 fails with "Error: Invalid Certificate Chain".

The message advises running the SSL Labs test, which passes.

It sounds like other folks have experienced the same issue with HTTP/2 sites.

@lgarron
Copy link
Collaborator

lgarron commented Aug 15, 2016

(Copying my observation from the Chromium bug.)

I can perform the scan just fine from the Google corporate network.

screen shot 2016-08-15 at 12 01 57

It's exactly the same Go code as on hstspreload.appspot.com
I strongly suspect that Google Cloud is causing a problem. One potential solution is to move to a Google Compute Engine VM, but that requires some bureaucracy for the DNS (and loses the scalability of flexible environments), so I'd prefer to avoid it.

I'll talk to the Cloud team.

@lgarron
Copy link
Collaborator

lgarron commented Aug 16, 2016

For reference, the Chromium bug initially filed for this was https://crbug.com/637610

@lgarron
Copy link
Collaborator

lgarron commented Aug 16, 2016

I was contacted about this again today. That makes three reports within 4 days, with no previous issues.

@hpvb
Copy link

hpvb commented Sep 6, 2016

It happens for my domains now too after enabling http/2 on my frontends.

@lgarron
Copy link
Collaborator

lgarron commented Sep 6, 2016

It happens for my domains now too after enabling http/2 on my frontends.

Could you post which domain that is?
I'm trying to collect test cases for when it comes time to look at solutions for this.

@hpvb
Copy link

hpvb commented Sep 6, 2016

You can test using

Thanks for looking into it!

@jiri-pejchal
Copy link

Another case:
https://www.czc.cz

@lgarron
Copy link
Collaborator

lgarron commented Nov 2, 2016

A lot of these have come up very recently. We should fix this soon.

@lgarron lgarron self-assigned this Nov 2, 2016
@Ayesh
Copy link

Ayesh commented Nov 2, 2016

Thanks Lucas.
I worked around it by disabling http/2, submitting the site, and enabling http/2 back. Some of my sites are now in the preload list, and hopefully an automatic recheck wouldn't kick in before it can work with http/2 sites properly.

Once again thanks for your effort in this Lucas!

@lgarron
Copy link
Collaborator

lgarron commented Nov 8, 2016

The following appears in the logs a lot: transport: http2Client.notifyError got notified that the client transport was broken EOF

@lgarron lgarron closed this as completed Nov 8, 2016
@lgarron lgarron reopened this Nov 8, 2016
@lgarron
Copy link
Collaborator

lgarron commented Nov 15, 2016

Some more stuff:

I'm currently working on trying to move hosting to a full VM.

@lgarron
Copy link
Collaborator

lgarron commented Nov 15, 2016

Oh, and Go 1.7 for App Engine/Flexible Environment is under way, but not launching soon enough.

@Ayesh
Copy link

Ayesh commented Dec 3, 2016

I worked around it by disabling http/2, submitting the site, and enabling http/2 back. Some of my sites are now in the preload list, and hopefully an automatic recheck wouldn't kick in before it can work with http/2 sites properly.

#35 will eventually remove the site if we don't support HTTP/2 in the scanner.

@lgarron
Copy link
Collaborator

lgarron commented Dec 4, 2016

#35 will eventually remove the site if we don't support HTTP/2 in the scanner.

Note that the scanner supports HTTP/2 if you use the proper version of Go.
However, the submission site still fails on HTTP/2 because the deployment environment is restricted to Go 1.6 right now.

@makuser
Copy link

makuser commented Dec 6, 2016

However, the submission site still fails on HTTP/2 because the deployment environment is restricted to Go 1.6 right now.

@lgarron what can we do about that?
The sites on my servers (eg. https://mynightout.de/) are affected as well, because I use HTTP/2.

@lgarron
Copy link
Collaborator

lgarron commented Dec 6, 2016

@lgarron what can we do about that?

From some looking around, it looks like App Engine / Flexible Environment might support Go 1.7 in beta soon (like, very soon).

Barring that, I could use help figuring out a way to adapt https://github.com/chromium/hstspreload to use HTTP/2 in 1.6 (which I've seen indications is possible, but haven't had time to do).

@keystrike
Copy link

I'm not sure if you need more test cases but I have a number of domains this affects.

biopsychiatry.com
modafinil.com

I've preloaded mdma.net and hedweb.com prior to moving to HTTP/2 and they are still preloaded at the moment.

All of the above sites are on the same server and get the same results on the SSL Labs test.

lgarron added a commit that referenced this issue Dec 17, 2016
This gives us flexibility to swap out the hosting to address issues like #57.
appspot.com subdomains are restricted to App Engine / Flexible Environment, but this way we can switch to using VMs.
@lgarron
Copy link
Collaborator

lgarron commented Jan 12, 2017

From some looking around, it looks like App Engine / Flexible Environment might support Go 1.7 in beta soon (like, very soon).

After a month of trying to track down this planned change, it appears that this won't be happening. :-/

@Ayesh
Copy link

Ayesh commented Jan 12, 2017

Hi - It's working fine with HTTP2 URLs now! Thanks!
hstspreload.org itself is now on http/2:

@lgarron
Copy link
Collaborator

lgarron commented Jan 13, 2017

Are you sure?
It doesn't seem to work with all. liquidlight.co.uk works for me locally, but not on hstspreload.org

@lgarron
Copy link
Collaborator

lgarron commented Jan 13, 2017

Also, someone reported scooter-system.fr today: https://twitter.com/Eroan/status/818760236060340226

@Ayesh
Copy link

Ayesh commented Jan 13, 2017

I'm not 100% sure, but please see (but not submit) this:
https://hstspreload.org/?domain=rs-devdemo.host

This site is using h2, but hstspreload shows me the form to add.

@lgarron
Copy link
Collaborator

lgarron commented Jan 13, 2017

Hmm, interesting. Sounds like some HTTP/2 sites work, and some don't.
https://tools.keycdn.com/http2-test doesn't distinguish between them.

If someone knows a lot about HTTP/2, I could use some help sleuthing to figure out what's different about liquidlight.co.uk and scooter-system.fr.

@Ayesh
Copy link

Ayesh commented Jan 13, 2017

There is a very good chance I'm at wrong here, but I tested the failed domain names (liquidlight.co.uk and others) with h2spec, and none of them passed the test. The domains passing hstspreload test also passed h2spec.

Here is a comparison for your reference: https://gist.github.com/Ayesh/be83385f63699f2946d29bce5cdce7bc

I also tested with curl -Iv --http2 https://hstspreload.org/,and from what I see, the certificate and protocol differences (RSA vs ECDSA, the encryption method/modes, etc) do not make a difference.

For rs-devdemo.host (which did pass the test), I'm using Apache 2.4.25 with ECDSA + RSA2048 certificates if that helps anyone. I tested with RSA2048 alone, and still passed the test.

@lgarron
Copy link
Collaborator

lgarron commented Jan 13, 2017

Hmm, h2spec returns ERROR: HTTP/2 settings negotiation {failed, timeout} for every site, on three of my computers. Am I holding it wrong?

@Ayesh
Copy link

Ayesh commented Jan 14, 2017

h2spec has a rather short timeout. I got the errors too, but a longer timeout fixed it.

h2spec -h hstspreload.org -p 443 -t true -S -o 50 # -o 50 is timeout

@lgarron
Copy link
Collaborator

lgarron commented Jan 18, 2017

It seems h2spec does distinguish between the failure cases correctly.

I've sent Brad Fitzpatrick an email about this, and have sent questions liquidlight.co.uk and scooter-system.fr to see what servers they're using.

@theromi
Copy link

theromi commented Jan 22, 2017

I'm having the same problem (SSL Labs rates me A+).

-> % nginx -v
nginx version: nginx/1.11.8
-> % openssl version
OpenSSL 1.0.2j 26 Sep 2016
-> % uname -a
Linux ... 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/Linux

I'm using certs from Letsencrypt. Anything else you want to know?

@lgarron
Copy link
Collaborator

lgarron commented Jan 23, 2017

I'm using certs from Letsencrypt. Anything else you want to know?

What's your domain?

Also, any chance you can get it to pass h2spec (see above)?

@theromi
Copy link

theromi commented Jan 23, 2017

https://romanmichel.de

I'll see about h2spec this evening (about 4 hours from now for me).

@s4y
Copy link
Author

s4y commented Jan 23, 2017

Another data point: I was able to submit istheinternetdown.com when I saw the comments from ~11 days ago.

But either something else was broken then, or the test changed — that domain redirects to HTTPS only if the request includes Accept: text/html. The goal is to provide HSTS to browser-like UAs without breaking things like curl istheinternetdown.com (which exits and prints nothing if it gets a redirect). This might not be OK for preloading; separate question.

Today, when I submit the domain, it gets rejected because of a missing redirect. If you didn't change anything, then it working temporarily could be evidence of other mysterious/wrong App Engine behavior. But no more certificate chain gripes.

@lgarron
Copy link
Collaborator

lgarron commented Jan 23, 2017

I tried working around this in a few ways:

I might have tried setting transport.TLSNextProto to a value that disables HTTP/2, don't recall.

In any case, I'm running out of ideas short of moving to a custom VM.

For the people on this thread with sites that still fail, could you let me know what stack your server is running?

@theromi
Copy link

theromi commented Jan 23, 2017

h2spec for my domain:
Finished in 111.8529 seconds
145 tests, 115 passed, 0 skipped, 30 failed

So some fail, most go well. Full log: http://pastebin.com/cYvN4eXb

For my stack, see above. Here is my nginx-config: http://pastebin.com/FTMqJ4nT

@Ayesh
Copy link

Ayesh commented Jan 24, 2017

@theromi for comparison, here is the results of a site that is passing the hstspreload test as well (it's from https://http2.pro).
http://pastebin.com/CnN7iDFy

145 tests, 144 passed, 0 skipped, 1 failed

FWIW, above server is running Apache 2.4.25, with ECDSA (prime256v1) + RSA (2048 bits) dual certificates. It produces same results over RSA 2048 as well. For me, the hstspreload test started to pass only after I upgraded Apache from 2.4.23 to 2.4.25. This upgrade contained some HTTP2 security fixes. Unless the hsts check had any changes, upgrading to 2.4.25 will most likely fix the h2spec test. No clue about nginx.

@lgarron
Copy link
Collaborator

lgarron commented Mar 3, 2017

Looks like we're now on Go 1.8; yay!
https://groups.google.com/d/msg/google-appengine-go/QTCsm5aLojU/J75Zc2yIAwAJ

All the examples in this bug seem to work now. If anyone is still seeing issues with HTTP/2, please file a new bug.

@lgarron lgarron closed this as completed Mar 3, 2017
@theromi
Copy link

theromi commented Mar 7, 2017

Unfortunately, my domain (romanmichel.de) still does not work.

@jiri-pejchal
Copy link

Same here, czc.cz returns Invalid certificate chain.

@lgarron
Copy link
Collaborator

lgarron commented Mar 7, 2017

romanmichel.de and czc.cz have issues with Go clients apart from HTTP/2. I would recommend separate bugs if you think there is something worth fixing on the scanner side (but I'll need help diagnosing the details).

@nogweii
Copy link

nogweii commented Jun 25, 2017

I'm running into what I think is the same error with my own website - evaryont.me (running nginx on Centos 7)

@lgarron do you have a recommended client to test Go & HTTP/2? Would httpstat suffice?

@lgarron
Copy link
Collaborator

lgarron commented Jun 26, 2017

I'm running into what I think is the same error with my own website - evaryont.me (running nginx on Centos 7)

I checked locally, and evaryont.me does not have the same error.

However, it seems your headers are malformed. Try removing the second colon after Referrer-Policy:

> https -ph evaryont.me
HTTP/1.1 200 OK
Accept-Ranges: bytes
Connection: keep-alive
Content-Length: 3528
Content-Security-Policy: default-src https: data: 'unsafe-inline' 'unsafe-eval'
Content-Type: text/html
Date: Mon, 26 Jun 2017 19:00:57 GMT
ETag: "594f8032-dc8"
Last-Modified: Sun, 25 Jun 2017 09:19:46 GMT
Referrer-Policy:: strict-origin-when-cross-origin
Server: nginx
Strict-Transport-Security: max-age=15768000
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block

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

9 participants