MV3 broad host permissions question

已查看 694 次
跳至第一个未读帖子

Evan Carothers

未读,
2021年7月22日 15:05:152021/7/22
收件人 Chromium Extensions
MV3 has done away with host permissions in the manifest definition of permissions/optional permissions and moved them to "host_permission" (https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/#host-permissions).

This is well and good but if I want to have a security model with the least permissive options and explicitly ask/prompt the user for permissions to run on a set of hosts (for example the 'tabs` permission), and I don't know what those hosts are in advance, I have to add broad host permissions (i.e. 'https://*/*') to the "host_permissions" of the manifest.

Even if I then move the permissions to optional that I need for those hosts once the user grants them (scripting, tabs), I'm concerned that since I still ask for broad host permissions that will flag the extension for a longer review process and it won't be obvious to the review team what my intent for permissions is.

Can somebody confirm from the chrome team that using broad hosts permissions (vs having them in "optional_permissions" like in MV2) won't flag my extension for longer review times, as there is no way to explicitly state/show that the broad host permissions are only needed for the OPTIONAL API permissions??

Evan Carothers

未读,
2021年7月22日 15:41:042021/7/22
收件人 Chromium Extensions、Evan Carothers
Following up on this - I cannot request permissions for any hosts not listed in manifest 'host_permissons' (optional or otherwise), but in order to be able to dynamically request permissions for hosts I don't know in advance, I have to add broad host permissions to manifest... in which case I ALREADY have those host permissions so there's no need to request them, however the extension is then much less secure. Am I missing something or is there no way then to request dynamic optional host permissions in an extension in MV3 without whitelisting broad permissions?

Jackie Han

未读,
2021年7月24日 06:12:582021/7/24
收件人 Evan Carothers、Chromium Extensions

Moving forward, we'll be changing host permissions to be optional by default

In my test, at present, "host_permissions" are not optional by default


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/4072f561-d7d8-4b62-90bb-a579216553cdn%40chromium.org.

John Anderson

未读,
2021年8月5日 13:44:532021/8/5
收件人 Chromium Extensions、Jackie Han、Chromium Extensions、ecaro...@indeed.com
+1 on this issue. We need to have optional host permissions for our extension to work properly without a terrifying warning on installation.

Simeon Vincent

未读,
2021年8月6日 21:12:252021/8/6
收件人 John Anderson、Chromium Extensions、Jackie Han、ecaro...@indeed.com
This situation is the unfortunate result of timelines not coming together like we thought they would.

As Jackie's quotation highlighted, we've been planning to change how Chrome handles host permissions grants for all extensions. In fact, this rethinking of host permissions was one of the foundational motivations for Manifest V3. Broadly speaking, it has changed our approach to API design for the platform. More specifically, though, it also manifested as a change to how host permissions are declared in the manifest file itself.

Rather than give extensions whatever host permissions they request at install time, we want host access to be an explicit user choice. This can either be a perminent grant in the form of an explicit grant from the user (clicking yes in a permission prompt) or an implicit temorary grant where permissions are granded on click much like the activeTab permission. The way this would manifest in the browser is basically that we would change the default "Site access" option in an extension's details page from "On all sites" to "On click". 

 
site-access.png
Alt: Screenshot of an extension's site access controls in the chrome://extensions page's detail view.


While we originally planned to have this permission change and Manifest V3 land in the stable release channel at roughly the same time, the UI work to support this change has taken longer than originally anticipated. Regrettably, this also means that our forward-looking redesign of manifest host permissions declarations doesn't entirely match how grants actually work in the browser today.

Simeon - @dotproto
Chrome Extensions DevRel


回复全部
回复作者
转发
0 个新帖子