News for hackers. Stuff that matters.
Re:Still Why No HTTPS? by zozbot234 on Tuesday December 17, 2019 @08:23AM (#21813165)
Do they? IME, they just ask you if you want to trust the self-signed certificate and allow you to optionally store that "trust" indefinitely, ending up with something like Trust On First Use. The warnings have to be scary initially because the security model is so radically different from the usual case of CA's; specifically, getting that "first use" validation correct is critically important.
Re:Still Why No HTTPS? by dm33tri on Tuesday December 17, 2019 @08:33AM (#21813242)
They show big red error and prompt to continue is hidden under spoiler. Also XHR requests just cut off, it's painful when developing and testing.
Re:Still Why No HTTPS? by zozbot234 on Tuesday December 17, 2019 @08:40AM (#21813295)
Well, a XHR cannot programmatically decide whether a self-signed cert should be trusted. Perhaps browsers should pop up a warning bar in such cases, explaining that some site functionality is being blocked for security reasons. Clicking it would take the user to the big scary warning page, where they would be allowed to indicate that they trust the self-signed cert (permanently or not) and reload the original page.
Re:Still Why No HTTPS? by namibj on Tuesday December 17, 2019 @09:21AM (#21813647)
The XHR api could allow specifying a trust root and/or cert-pinning though.
Re:Still Why No HTTPS? by necovek on Tuesday December 17, 2019 @03:30PM (#21818436)
How do you imagine this to work? XHR caller and XHR endpoint are both coming from untrusted sources at that point — if you allow either side to define a trust root, you are fully opening up to MITM attacks.

For development purposes, I imagine the approach akin to cross-origin support in browsers for loopback networks might work (i.e. don't enforce checks on them).

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.
Re:Still Why No HTTPS? by edoceo on Tuesday December 17, 2019 @10:18AM (#21814273)
It already does, put your self-CA in the browser trust store.
Re:Still Why No HTTPS? by gmiller123456 on Tuesday December 17, 2019 @02:37PM (#21817761)
The "trust this site" can be disabled, and usually is by many corporate policies. Additionally they use words like "unsafe" and "not trusted", but never use those words, nor big red screens, to warm against plain HTTP requests.