Live data from Hacker News

API Shouldn't Redirect HTTP to HTTPS

jviide.iki.fi

221–230 of 310 posts

Re: API Shouldn't Redirect HTTP to HTTPS

#221
> and revoke API keys sent over the unencrypted connection.

Excuse me, short question:

If I am not offering a non-TLS endpoint in the first place, and the client, for some reason, decides to take something that is literally called "SECRET", and decides to shout it across the open internet unencrypted...

...how is that my problem again?

Why should my setup be more complex than it needs to be, to make up for an obvious mistake made by the client?

Re: API Shouldn't Redirect HTTP to HTTPS

#222

Earlier quoted context omitted.

> You have to mitm in order to evesdrop on an encrypted channel. OK but we're talking about evesdropping HTTP, which is unencrypted.

So what? My point was the encryption doesn't matter, it's just the reason you have to impersonate in order to merely evesdrop sometimes.

The point is that you don't need to be 'in the middle' to evesdrop unencrypted data - you can sniff traffic without either end being any the wiser, but if the data is TLS encrypted then you can only decrypt it if you interpose yourself.

Re: API Shouldn't Redirect HTTP to HTTPS

#223

HTTPS and SVCB DNS records will hopefully make it more feasible over time to drop the traditional HTTP server-side redirect. The client agent will be able to read the DNS record and upgrade to the highest available protocol prior to sending the first request.

Seeing how web browsers haven't added support for SRV in decades, I'm not holding my breath.

I'm guessing there's some (?) advantage of SVCB and HTTPS records that can't be achieved with SRV[1] and TXT records, but I haven't read the RFC yet to know what that advantage is.

[1]: `_https._tcp` or `_http3._udp` or whatever.

Re: API Shouldn't Redirect HTTP to HTTPS

#225

As a non-developer, ordinary computer user "providing service" for one user (yours truly) it's easy for me to configure the TLS forward proxy listening on the loopback to send _all_ HTTP requests, from _any_ application, including ones sent to port 80, via HTTPS. This I find preferable to letting a browser try to convert HTTP to HTTPS, e.g., "HTTPS Everywhere", or letting a developer do it with a redirect. Personally…

There’s absolutely nothing ordinary or easy about that setup, but I admire it. I’ve only seen that level of paranoia at a three letter agency.

Do applications with pinned certificates break? A bunch of mobile apps do that to get in the way of Wireshark.

Re: API Shouldn't Redirect HTTP to HTTPS

#226
post #54

The Stack Exchange API used to revoke API keys sent over HTTP (and return an error message), which is my favorite way to handle this.

This sounds like a great way to cause Denial-of-Service attacks.

You need to actually send them the API key, so not really.

Re: API Shouldn't Redirect HTTP to HTTPS

#227
post #54

The Stack Exchange API used to revoke API keys sent over HTTP (and return an error message), which is my favorite way to handle this.

This sounds like a great way to cause Denial-of-Service attacks.

To do that you need to guess or steal the API keys.

Re: API Shouldn't Redirect HTTP to HTTPS

#228

Earlier quoted context omitted.

The push for "TLS all the things" was already a massive overreach that actively made security worse overall, because it further ingrained the user tendency to click through scary browser warnings (all for the sake of encrypting things that were fine in plaintext). And you want to go even further ? No thank you.

> all for the sake of encrypting things that were fine in plaintext What was fine in plaintext?

Who cares how many of the n-dozen routers and switches between you and your favourite blog got to inject a few tags for your convenience?

Encryption is for more than secrecy, folks.

Re: API Shouldn't Redirect HTTP to HTTPS

#229
post #72

Earlier quoted context omitted.

I'm highly surprised by this. It seems very dumb and I have never seen anything like this, though I never use Chrome and very rarely fire Chromium for testing something. Is there something to read about this, like a dev ticket?

There might be but I'm not aware of any tickets. But if you open chrome and navigate to 192.168.20.20 you should see it. Or any domain that resolves to a non-responsive IP, if you have one in mind.

Just tried on Chromium, I get ERR_ADDRESS_UNREACHABLE as I would expect.
Post reply on HN