News for hackers. Stuff that matters.
Re:Still Why No HTTPS? by namibj on Wednesday December 18, 2019 @06:09AM (#21823759)
Well, the caller is already allowed to run code. Allowing it to use TLS with cert-pinning doesn't make that any less secure.
Re:Still Why No HTTPS? by necovek on Wednesday December 18, 2019 @09:30AM (#21825156)
I apologise, I still don't understand your claims.

Without previous proof that the calling code was not eg. modified in-flight (eg. over HTTP or over HTTPS without a valid certificate), allowing it to use TLS and to either modify the trust root or pin a new certificate would severely reduce the security of the communication, and would be completely against what HTTPS is designed to solve in the first place (mainly MITM snooping and attacks).

And if there is a "previous proof" of genuinity (eg. by serving through properly encrypted HTTPS), what the benefit is to allowing those clients to pin certs? I.e. they'll still need the existing "proper" HTTPS for all the other first time visitors (and return visitors using new browsers/OSes/devices)?

Re:Still Why No HTTPS? by namibj on Wednesday December 18, 2019 @11:52AM (#21826763)
Don't worry.

I don't mean we should allow the fetch API to mess with the browsers trust configuration. It should only allow a temporary override of trust rules, similar to DANE TLSA-RRs, but provided by JavaScript instead of DNSSEC-verified DNS lookups.

Imagine e.g. combining this with an SPA bootloader contained in a data-url (like a bookmarklet), which the user scans via a QR-code or receives via text-based messaging.

CORS would still be in-play, and maybe the insecure nature of the caller is communicated to the API.

The benefit of this pinning would be e.g. allowing direct communication with IoT hardware, or even just prevention passive content analysis.

You could talk to IPs directly and still use TLS without weird wildcards like *.deviceid.servicedevices.com where the dns just has these zone entries:

  deviceid.servicedevices.com  DNAME  has-a.name
, but that's ugly and leaks the device's IP through a DNS lookup.
Re:Still Why No HTTPS? by necovek on Thursday December 19, 2019 @12:59AM (#21832345)
Ah, enabling TLS for access using only an IP address is a great point, thanks.