New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 859137 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

certificateProvider does not allow to specify a certificate chain

Reported by wverhe...@gmail.com, Jun 29 2018

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS aarch64 10575.55.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
Platform: 10575.55.0 (Official Build) stable-channel hana

Steps to reproduce the problem:
1. Create a multi-level PKI: a root certificate, several intermediate certificates, and the leaf certificates that are used for authentication
2. Set up a webserver with apache configured with SSLDNRequestFile pointing to a .pem file with the root certificate, SSLCACertificateFile pointing to a .pem file with all the intermediate certificates, and make it require authentication
3. In the chrome.certificateProvider.onCertificatesRequested callback, send back the root certificate, the CA certificate that signs the leaf certificate, and the leaf certificate itself
4. Install the extension with the certificateProvider and try to log on to that website.

What is the expected behavior?
ChromeOS shows the leaf certificate, allowing the user to log on.

What went wrong?
Chrome in ChromeOS shows the root and CA certificates, but not the leaf certificate, presumably because the leaf certificate does not show up in the DN request in the TLS handshake.

Checking the "my certificates" page in the settings shows that the certificate is found and parsed correctly, and it is listed correctly.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 67.0.3396.87  Channel: stable
OS Version: 10575.55.0
Flash Version: 

This is an issue that I'm running against while trying to write a ChromeOS extension for the Belgin electronic ID card. The Belgian eID has a massive PKI infrastructure, with (currently) four root certificates, about 150 intermediate CAs, and leaf certificates signed by the intermediates.

In other browsers and operating systems, the above setup works just fine. The browser there notices that there is a valid chain from the root certificates in the DN request to the leaf certificate passed by the PKCS#11 module (or macOS tokend or CTKtoken middleware, or the Windows minidriver), and only shows the leaf certificate.

In ChromeOS, this doesn't work. Specifying just the leaf certificate can't work, because then ChromeOS can't know that it is in fact a leaf certificate for the right chain. Specifying all three certificates doesn't work either, because then chrome filters out the leaf certificate (because it isn't signed by the root certificate) and only shows the intermediate and root CA's, rather than just using those to build the intermediate chain.
 
Components: Internals>Network>Certificate Internals>CertAnalysis Internals>Network>SSL
Cc: pmarko@chromium.org emaxx@chromium.org
Components: -Internals>CertAnalysis Platform>Extensions>API
Labels: Needs-Feedback
The way that this is expected to work for ChromeOS - or for any platform - is that the intermediate and root have been made available and installed on the system.

It is not expected that the extension can return the 'correct' chain.

Have you explored this configuration?
Cc: dskaram@chromium.org
Components: -Internals>Network>SSL -Internals>Network>Certificate
Labels: -Type-Bug -Pri-2 -Needs-Feedback Pri-3 Type-Feature
I should clarify: the onCertificatesRequested() callback today only supports returning leaf certificates. There is not a way with the certificateProvider API to provide notions such as 'trusted certificates' or 'supplementary certificates'. It was definitely intentional that the former was considered out of scope - we don't want simply attaching a device to equal installing a trusted root.

This is documented in https://developer.chrome.com/extensions/certificateProvider as part of the API documentation - namely, onCertificatesRequested.addListener's callback notes "The list must only contain certificates for which the extension can sign data using the associated private key." Obviously, this wouldn't be the case for your intermediates or root (I hope!)

Installing certificates ad-hoc is restricted, either for client certs using https://developer.chrome.com/extensions/enterprise_platformKeys#method-importCertificate or for intermediate and root certificates using an Open Network Configuration file, as documented in https://chromium.googlesource.com/chromium/src/+/master/components/onc/docs/onc_spec.md#certificates

It may be reasonable to provide additional APIs to support loading 'not affirmatively trusted' certificates from smart cards as well through this API (e.g. to assist with chain building), although the API can't make any guarantees that those certificates are removed/unloaded from all caches. Tagging this as a Feature request for that team.

Comment 4 by wverhe...@gmail.com, Jun 30 2018

Hi Ryan,

I'd missed that note in the documentation that the callback should only contain leaf certificates, but had figured that much out in the mean time :) thanks for pointing it out, at any rate.

(wearing my "eID contractor hat")
FYI: for performance reasons, the Belgian Federal Authentication Service (FAS) is not going to be sending the intermediate certificates in the DN request, so that means that until an extension is able to provide additional certificates to ChromeOS to assist in chain building for client certificates, people will not be able to use ChromeOS devices to log on to the relevant websites to interact with the government (e.g., to do their tax declaration).

Thanks for considering this feature.
I'm not sure why you say it will not be possible - as noted, installing the correct intermediate on the device resolves this issue.
As I understand it (but do correct me if I'm wrong), the methods you point to cannot be used from an extension, but are for other situations. The first is for enterprise situations (which does not apply to us, we don't own the devices that I'd be writing this extension for), the second is for network administrators (which also doesn't apply to us, we don't know where this will be ran).

So that leaves manually installing the intermediate certificate. While that is an option, it would have to be done for nearly every certificate (by chance two people in the same household might end up being under the same CA, but that is rather unlikely). Also, people would have to get their certificate somehow, and would need to know how to do it.

We could create a page that pops up at extension installation time, I suppose, which allows a user to download the intermediate certificate and which guides them through installing it correctly into ChromeOS, but that would then need to be repeated for every card that people would want to use; they would need to remember that there is this manual installation process, which I suspect most people will not, so this is a usability nightmare and therefore a support nightmare.

If weighing that option against not supporting ChromeOS at all, I think the latter option wins for us.

Sign in to add a comment