News for hackers. Stuff that matters.
Re:API Shouldn't Redirect HTTP to HTTPS by Titan2189 on Tuesday May 28, 2024 @08:20PM (#40506943)
I'd argue your reasoning is incorrect. By the time your service is developed you would have already changed it to https, as during development every time you tried your API keys sent via http got disabled. So an in-the-wild MITM would never get to see your http request
Re:API Shouldn't Redirect HTTP to HTTPS by throw__away7391 on Wednesday May 29, 2024 @12:17AM (#40508408)
That's a very good point, I agree. You're always going to run a service at least once.
Re:API Shouldn't Redirect HTTP to HTTPS by fl0ki on Wednesday May 29, 2024 @10:12AM (#40512214)
I agree from a developer point of view, but the people configuring and deploying the application aren't always the same people developing it.

As a developer I like to make many options available for debugging in various situations, including disabling TLS. This isn't controversial, every Go and Rust library I've ever seen defaults to no TLS, preferring to make it easy rather than required, so reflecting those defaults in the service's configuration is natural and intuitive.

I make sure my example configurations are as close to what will be needed in production as possible, including not just TLS but at least one "mutual TLS" validation. I even sync these back from production if it turns out something had to be changed, so the examples in the repository and built artifact are in line with production.

Yet I routinely find at least some of these disabled in at least some production deployments, presumably because the operator saw a shortcut and took it.

Let's rework Murphy's original law: if there are multiple ways to deploy something and one of those will be a security disaster, someone will do it that way.

Re:API Shouldn't Redirect HTTP to HTTPS by sfn42 on Wednesday May 29, 2024 @11:06AM (#40512723)
Won't those people have the same experience? The app won't work until they configure it securely
Re:API Shouldn't Redirect HTTP to HTTPS by ljm on Wednesday May 29, 2024 @12:26PM (#40513735)
There is a non-zero number of developers out there who would sooner deploy a proxy that upgrades http to https because the thought of changing the application code wouldn’t spring to mind
Re:API Shouldn't Redirect HTTP to HTTPS by fl0ki on Wednesday May 29, 2024 @11:16AM (#40512828)
It appears the trick they've found is to disable TLS on both ends :)
Re:API Shouldn't Redirect HTTP to HTTPS by fwip on Wednesday May 29, 2024 @11:35AM (#40513072)
The MITM can be between the developer's machine and Stack Overflow, e.g: the classic Evil Cafe Wifi.