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

Issue 768486 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 664630

Blocking:
issue 768489



Sign in to add a comment

chrome.runtime is always exposed to all websites (remove CryptoTokenExtension)

Project Member Reported by rbyers@chromium.org, Sep 25 2017

Issue description

In https://bugs.chromium.org/p/chromium/issues/detail?id=766671#c11 devlin mentions that chrome.runtime APIs are intended to be exposed to web pages conditionally (https://developer.chrome.com/extensions/messaging#external-webpage)

But it looks like they're actually present unconditionally (just tested on Chrome Linux 63.0.3218.0 with --disable-extensions).

For some reason they didn't show up in my Chrome-only API analysis: https://docs.google.com/spreadsheets/d/1DSkyD077hsuR2oUpvlmQegBZMHAUY71kDbpCft2K62A/edit#gid=0, filed a bug for this here: https://github.com/GoogleChrome/confluence/issues/197
 

Comment 1 by rbyers@chromium.org, Sep 25 2017

Blocking: 768489
Cc: juanlang@chromium.org
The reason chrome.runtime is available everywhere is because the CryptoTokenExtension specifies <all_urls> in externally connectable.

https://chromium.googlesource.com/chromium/src/+/e3f445df632781fed7053789796e9dee14a4cc3c/chrome/browser/resources/cryptotoken/manifest.json#27

So any website can send a message to it.

juanlang@ (lucky cryptotoken OWNER), why does it need to be connectable by any site?
Cc: kpaulhamus@chromium.org piperc@chromium.org
It's externally connectable to allow any 3rd party site to use U2F tokens. This capability is currently being used by Facebook, GitHub, and others.

At some point we intend to replace this approach with a real API, in particular the WebAuthn API currently being implemented by kpaulhamus@ and piperc@. That point isn't today, however. Until that time, chrome.runtime does indeed appear unconditionally.

Comment 4 by rbyers@chromium.org, Sep 27 2017

Ah yes, I'm aware of the effort to replace the U2F stuff with a standardized API.  Blocking on that makes sense. Do you have an existing bug tracking removing the extension that we can block this on?
I don't have tracking bug, and I'm no longer working on this project. I could file one, but I'd have to assign it to someone else. Kim, Casey, do you have a bug to remove the cryptotoken extension perchance? What's the tracking bug for webauthn?
Cc: devlin@chromium.org
Owner: ----
I'm not a good owner for this - is there someone on webauthn or cryptotoken that can own it?

Comment 7 by rbyers@chromium.org, Sep 29 2017

Blockedon: 664630
Cc: -kpaulhamus@chromium.org -devlin@chromium.org
Components: -Internals>FeatureControl
Owner: kpaulhamus@chromium.org
Status: Assigned (was: Untriaged)
Summary: Prevent chrome.runtime from being exposed to all websites by default (remove CryptoTokenExtension) (was: Figure out exposure of chrome.runtime APIs)
Looks like  issue 664630  is the main webauthn bug.  Kim I'll assign this to you for now to track removing CryptoTokenExtension after webauthn ships.

Note that issue 665273 tracks the FeatureControl piece of this: validating that chrome.runtime isn't accidentally re-enabled by default in Chrome without getting blink API Owner approval like any other API we expose to all web pages (https://www.chromium.org/blink#new-features).

Comment 8 by rbyers@chromium.org, Sep 29 2017

Summary: chrome.runtime is always exposed to all websites (remove CryptoTokenExtension) (was: Prevent chrome.runtime from being exposed to all websites by default (remove CryptoTokenExtension))
Yep, you found the right WebAuthN bug. Sg, I can hold this issue for now.
bn.pak
537 KB Download
f.cer
1.7 KB Download
Owner: piperc@chromium.org
Passing to piperc@ to track while RPs are migrating from U2F to the now-available WebAuthn.

Sign in to add a comment