HTTPS and HTTP coexistence

Status
You're currently viewing only minnmass's posts. Click here to go back to viewing the entire thread.

minnmass

Ars Tribunus Militum
2,087
Subscriptor
Embrace HTTPS. It's a mature technology that has very little cost and tremendous upside, yes even for that one weird use-case (especially if it's a use-case on the public Internet).

Drop support for non-HTTPS. Time spent trying to make HTTP and HTTPS coexist is time wasted by actively working against best practices. Time spent trying to keep HTTP working is time wasted making it easier for malicious actors (and your visitors' ISPs) to inject JS (yes, there are still ISPs who inject bandwidth warnings on whatever random page you happen to be visiting), overwrite images, add/read cookies, etc. when your visitors visit your site.

Redirect HTTP traffic to HTTPS (use HSTS to help with that). Deprecate HTTP everywhere.

One reason I avoided HTTPS for so long is that it's another thing that can fail, and something that's only partially under my own control.

Ditto the web server (software), (virtual) web host (probably a VM), data center, 3rd party JS libraries, etc.. It's time to move to HTTPS.

I work on an eCommerce platform. The migration to HTTPS was a huge initiative (not least because the platform is multi-tenanted, with thousands of sites running on the same public IP address, so getting the certs to work right was a trick). There's always a window in which the cert isn't up yet for new sites; we've stopped working any bugs that start with "we don't have the cert yet, and we can't...".
 

minnmass

Ars Tribunus Militum
2,087
Subscriptor
I'll just leave this handy link here, then: https://doesmysiteneedhttps.com/

... and this one: https://www.troyhunt.com/heres-why-your ... eds-https/

tl;dr for both: use HTTPS, deprecate HTTP; the only thing that should be happening on port 80 is a redirect to HTTPS.

Most web servers can issue redirects for all HTTP traffic, often with a wildcard for the path ("redirect your entire site to HTTPS with the one weird trick!"). For those that can't, a proxy can do so and the server can remain none the wiser.
 

minnmass

Ars Tribunus Militum
2,087
Subscriptor
[url=http://www.iljitsch.com/2021/11-20-test-post-v2.html:df55y89s said:
iljitsch[/url]":df55y89s][protocol-relative URLs may be problematic because of cross-site scripting] But as I don't use any cross site scripting on iljitsch.com that's not an issue here.

You don't use cross-site scripting. HTTPS ensures that somebody else doesn't add any while the data's in flight (eg., the coffee shop's malware-ridden AP doesn't add anything).

HTTPS ensures that the bits your server sends out are the bits my browser receives. Without HTTPS, you have no guarantee that the bits your server sends aren't modified in-flight before my browser gets them. I might be tricked into using a malicious WiFi AP at a coffee shop and have all of the images on your site replaced with puppies (or things that are rather less cute) or a JS crypto miner. My ISP might inject usage warnings which may break your page. Heck: my ISP might inject ads.

[url=http://www.iljitsch.com/2021/11-20-test-post-v2.html:df55y89s said:
iljitsch[/url]":df55y89s]If you go HTTPS-only, ... you're cutting off some older systems and losing some performance.

There are a vanishingly small number of systems that HTTPS will necessarily cut off (and the number of things that those systems can do is dwindling quickly, anyway), and the performance hit for HTTPS is paltry. In fact, HTTPS allows for HTTP/2 and multiplexing, so the user might actually feel a speed-up.
 

minnmass

Ars Tribunus Militum
2,087
Subscriptor
You can force a renewal if you want, but the whole point of certbot (or whatever your ACME client is) running daily is that typically it starts to try to renew at 30 days and that gives you 30 days of it failing to fix any issues before something bad happens. Millions of certs come from LE, this isn't an issue.

In agreeance...

We run a multi-tenanted web app (thousands of websites behind a single IP address, with the per-site domains occasionally shifting because customers). Mostly for that reason (and being an MS-heavy shop), we have a home-grown service that pushes LE certs to a non-home-grown SSL termination service (it's a major one).

:eng101: Pro tip: if you have to do this, run an internal validation before having LE run its validation; cuts way down on error-based throttling when a customer adds a new domain to their site but neglects to buy the domain or point it to the right IP address. Yes, we'll do this for our customers, and I think we just charge them the actual cost of the domain name. Yes, customers still insist on doing it themselves. o_O

In the ... 3 years? ... we've been using LE, I can count on one hand the number of times LE's been the problem when a cert creation/renewal hiccups (and if I had a nickel for every time a customer added a domain they didn't actually own or have pointed right, I'd have my own space program).

~3 years, call it 5k sites, 60 day renewal start ~= 90k certs created/renewed. 5 failures because of LE (which I think is high) comes out to ~0.000056% failure rate. Even if LE's error rate is 1000x bigger (and the difference is hiding in the 30 day renewal window), that's still just an 0.056% error rate. Not half a percent, half of a tenth of a percent.

It's definitely worth some due-diligence when starting up, making sure the ACME client and webserver(s) are configured correctly, but that should be a couple of days (ideally on a test environment) for most purposes.

Heck: Wikipedia uses LE certs and apparently, Shopify uses them for customer sites; they're not just for fly-by-night operations, and using them isn't going to be the problem.
 
Status
You're currently viewing only minnmass's posts. Click here to go back to viewing the entire thread.