TLS certificate management on Android
Whenever an application makes a TLS connection to another host, it should validate the certificate it receives from that host to be sure that the connection has not been intercepted. One aspect of that validation is ensuring that the certificate is issued to the expected site; many apps (on Android and beyond) tend not to bother with that step, assuming that any certificate they get is good enough. There is another important step, though: ensuring that the certificate has been signed by a certificate authority (CA) that the user trusts. After all, anybody can create a certificate that claims to belong to, say, lwn.net, but the established CAs are not supposed to sign them without having somehow convinced themselves that the requestor actually owns the name.
Verifying the provenance of a certificate requires a database of the CAs that are trusted to sign certificates. On full-fledged Linux distributions, that database often comes from Mozilla, with perhaps a few distribution-specific tweaks. On Android, the CA database is managed centrally, so the policies established by Google control the trusting of certificates for most Android apps.
A complicating factor is that certificates that are not signed by one of the "trusted" CAs are common and have many legitimate uses. In some cases, the operator of a web site may just not want to deal with the trouble and expense of getting a recognized certificate. In other cases, there may be a need to set up one's own trusted CA that can issue arbitrary certificates. That is often done in institutional environments to assist with the operation of web proxies and virtual private networks. Such a certificate can also enable just the sort of MITM attack that TLS was meant to thwart; some companies will use them to monitor traffic into and out of their networks, for example.
Android makes it possible for a user to import a new CA certificate; after that, the device will trust certificates that have been signed by that CA. There is just one little difficulty: Android insists on putting up a scary warning at each boot, saying that "a third party is capable of monitoring your network activity". This happens despite the fact that the user has already been through a multi-step, warning-heavy process to install the certificate. There is, it seems, no straightforward way to make it go away.
Unsurprisingly, Android users who have reason to install their own CA certificates find this annoying. Many of them, perhaps, have a dim view of the trustworthiness of some of the CA certificates provided out of the box, and don't like having to slog through warnings to use a certificate they actually do trust. There have been various bug reports filed regarding this problem, but Google's response has been clear: the system is working as intended:
In other words, the only way to get a truly trusted CA certificate installed on Android is to go through the entire CA process for companies that want to sell certificates to the world as a whole. It seems likely that your typical user wanting to install their own CA certificate will balk at that idea.
There are a few unpleasant things that can result from this sort of policy. One is that users will become (even more) used to brushing aside scary warnings without thinking about them. If the system is forever crying wolf, it will be unsurprising if users are not paying attention the one time that there is a true wolf to worry about. Another outcome is that users have a stronger incentive to root their devices so that apps like movecerts, which directly manipulate the certificate store to make the warnings go away, can be run. Rooting the device and running privileged apps, even open-source ones, presents some obvious security hazards of its own.
Bringing security into a discussion often introduces strange distortions,
and TLS is especially prone to that. Web browsers will frighten users over
self-signed certificates, but have no objection to sites that don't use TLS
at all. In the Android case, users who have attempted to make proactive
choices about their security are bombarded with warnings, while those using
apps that fail to validate certificates hear nothing. The security circus,
it seems, is still playing in all three rings.
| Index entries for this article | |
|---|---|
| Security | Android |
| Security | TLS certificates |
