Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Clarify how match patterns work with local origins #4447

Closed
dotproto opened this issue Nov 29, 2022 · 0 comments
Closed

Clarify how match patterns work with local origins #4447

dotproto opened this issue Nov 29, 2022 · 0 comments
Assignees
Labels
content extensions Issues related to extensions documentation. feature request New functionality for the site. P2 A normal priority task. This is the default for most issues.

Comments

@dotproto
Copy link
Contributor

Is your feature request related to a problem? Please describe.
An extension developer recently shared feedback that they were surprised to find that adding a match pattern for https://*/* didn't grant their extension access to secure origins, specifically localhost and other such local origins.

Similarly, we have had a couple of recent WECG issues (#303, #304) related to upgrading http: requests to https: through the introduction of the upgrade-insecure-requests CSP directive.

Describe the solution you'd like
The match patterns page should be updated to clarify that the we view match patterns as intentionally scoped to a specific set of requested capabilities. We do not automatically grant access to additional schemes or origins beyond what an extension explicitly requests.

We may also want to add a new section to describe how extension authors should request permission for local origins. In short, the extension developer will need to add match patterns for each way a local origin can be requested:

  • http://localhost:*/*
  • http://127.0.0.1:*/*
  • http://[::1]:*/*

These patterns should be tested before adding them to documentation.

Describe alternatives you've considered
A description of host permissions grants could be added to another page, such as /docs/extensions/mv3/host-permissions (does not exist). Since we don't have a page on host permissions in general, this will have to do for now.

Additional context
Extensions match patterns are implemented here: https://source.chromium.org/chromium/chromium/src/+/main:extensions/common/url_pattern.h

@dotproto dotproto added feature request New functionality for the site. P2 A normal priority task. This is the default for most issues. extensions Issues related to extensions documentation. content labels Nov 29, 2022
@AmySteam AmySteam self-assigned this May 15, 2023
@AmySteam AmySteam closed this as completed Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
content extensions Issues related to extensions documentation. feature request New functionality for the site. P2 A normal priority task. This is the default for most issues.
Projects
None yet
Development

No branches or pull requests

2 participants