Re: B2G, email, and SSL/TLS certificate exceptions for invalid certificates

2014-05-29 Thread Camilo Viecco


Seems like we will have to implement some sort allow invalid certs (it makes
me really sad that the system administrators and/or managers of tcl and 
telefonica seem

slow to understand the risks of allowing MITM for user credentials).

I like Brian Smith's proposal to add some visual indicator when using
a non-secure connection and I also agree that making users type the
fingerprint (on a mobile device) is also a non-solution.
I propose making the user type something like:

'I understand that my password to use $mailprovider cannot be protected by
firefoxOS'

And then allow the 'one click' override. (ditto for non SSL connections).

Also in all these variations we have not discussed what should happen
if the untrusted cert changes, my guess is that we should show some delta
of the two certs (once we have detected we are not behind a captive portal)

Camilo



On 5/28/14, 4:16 PM, David Keeler wrote:

Regarding the current certificate exception mechanism:


* there is only a single certificate store on the device and therefore
that all exceptions are device-wide

This is an implementation detail - it would not be difficult to change
exceptions to per-principal-per-app rather than just per-principal.


* only one exception can exist per domain at a time

In combination with point 3, is this a limitation? Do we want to support
this? If so, again, it wouldn't be that hard.


* the exception is per-domain, not per-port, so if we add an exception
for port 993 (imaps), that would also impact https.

I don't think this is the case. Either way, it shouldn't be the case.
In summary, it would not be difficult to ensure that the certificate
exception service operates on a per-principal-per-app basis, which would
allow for what we want, I believe (e.g. exceptions for
{email-app}/example.com:993 would not affect {browser-app}/example.com:443).

In terms of solving the issue at hand, we have a great opportunity to
not implement the press this button to MITM yourself paradigm that
desktop browsers currently use. The much safer option is to ask the user
for the expected certificate fingerprint. If it matches the certificate
the server provided, then the exception can safely be added. The user
will have to obtain that fingerprint out-of-band over a hopefully secure
channel.
I would be wary of implementing a more involved scheme that involves
remote services.

Cheers,
David

On 05/28/2014 03:30 PM, Andrew Sutherland wrote:

tl;dr: We need to figure out how to safely allow for invalid
certificates to be used in the Firefox OS Gaia email app.  We do want
all users to be able to access their email, but not by compromising the
security of all users.  Read on if you work in the security field / care
about certificates / invalid certificates.


== Invalid Certificates in Email Context

Some mail servers out there use self-signed or otherwise invalid SSL
certificates.  Since dreamhost replaced their custom CA with valid
certificates
(http://www.dreamhoststatus.com/2013/05/09/secure-certificate-changes-coming-for-imap-and-pop-on-homiemail-sub4-and-homiemail-sub5-email-clusters-on-may-14th/)
and StartCom started offering free SSL certificates
(https://www.startssl.com/?app=1), the incidence of invalid certificates
has decreased.  However, there are still servers out there with invalid
certificates.  With deeply regrettable irony, a manufacturer of Firefox
OS devices and one of the companies that certifies Firefox OS devices
both run mail servers with invalid certificates and are our existing
examples of the problem.

The Firefox OS email app requires encrypted connections to servers.
Unencrypted connections are only legal in our unit tests or to
localhost.  This decision was made based on a risk profile of devices
where we assume untrusted/less than 100% secure wi-fi is very probable
and the cellular data infrastructure is only slightly more secure
because there's a higher barrier to entry to setting up a fake cell
tower for active attacks.

In general, other email apps allow both unencrypted connections and
adding certificate exceptions with a friendly/dangerous flow.  I can
speak to Thunderbird as an example.  Historically, Thunderbird and its
predecessors allowed certificate exceptions.  Going into Thunderbird
3.0, Firefox overhauled its exception mechanism and for a short time
Thunderbird's process required significantly greater user intent to add
an exception.  (Preferences, Advanced, Certificates, View Certificates,
Servers, Add Exception.)  At this time DreamHost had invalid
certificates, free certificates were not available, invalid certificates
were fairly common, Thunderbird's autoconfig security model already
assumed a reliable network connection, Thunderbird could only run on
desktops/laptops which were more likely to have a secure network, etc.
We relented and Thunderbird ended up where it is now.  Thunderbird
immediately displays the Add Security Exception UI; the user only
needs to click Confirm Security Exception. 

mozilla::pkix as default in gecko

2014-04-25 Thread Camilo Viecco
As many of you know we have a new ceritificate verificaion library that 
has been enabled by default in Firefox desktop since april 2. Today I am 
landing it as default in Gecko, this change passes all of our tests but 
I want Thunderbird and SeaMonkey developers aware, as there is still one 
bug that might cause regressions for SSL clients (bug 982340 
https://bugzilla.mozilla.org/show_bug.cgi?id=982340 (has a patch that 
addresses that but was not ready to land before the 31 uplift)


Camilo
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform