influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.95k stars 3.56k forks source link

Bug in Admin gui with HTTPS #6797

Closed willemdh closed 8 years ago

willemdh commented 8 years ago

InfluxDB version v0.13.0. I was asked to make an issue following this thread:

https://groups.google.com/forum/#!topic/influxdb/7FOwP3_UO7A

So there seem to be two issues in the thread:

1) It was not possible for me to connect to InfluxDB on 8086 when https was enabled for the admin gui. After enabling https for 8086 and restarting influxdb service, it does become possible. 2) After enabling https, browing to the http url of the admin gui results in weird symbols being displayed in Firefox and a file to be downloaded in Chrome.

toddboom commented 8 years ago

I followed up on the mailing list, but here's the basic summary:

It sounds like the primary issue occurs when HTTPS is enabled for the admin interface (running on 8083), but not for the write/query API (port 8086). This means that your browser running on a secure connection has to make a non-secure call to issue queries. This is blocked by most browsers for security reasons, and will result in different error messages depending on the browser. The guidance here is that if you enable HTTPS for your admin interface, you should always also enable it on your API. (Besides, if you don't enable it on both, you're still operating over an insecure connection.)

Furthermore, once you enable HTTPS on the admin UI, trying to load the page over plain HTTP will result in an empty response. Some browsers will respond with the 0-byte download file you mentioned. This is because the server is expecting an HTTPS connection, which the browser is not initiating.

I set up a new instance with a self-signed cert and verified that everything works as it should. Since there's not anything actionable to fix, I'm going to close this out.

If you think any part of this is incorrect, ping me and we can reopen this issue.

willemdh commented 8 years ago

Hey, Thanks for looking into this. I expected this was the case, but your colleague asked me to make an issue for it. Grtz Willem