Permissions Policy investigation to check that browsers apply the same rules
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- css, html, javascript
Direzione di ricerca
Review the existing WPT tests in the permissions-policy, geolocation, and fullscreen directories. Understand the WebDriver BiDi tools for setting permissions and simulating devices. The goal is to extend the test suite to cover response headers, iframe allow lists, nested frames, and navigation, starting with fullscreen and geolocation. Check that the test setup works across browsers and that allowed actions succeed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
I propose an Interop 2027 investigation of how browsers apply Permissions Policy rules, covering response headers, lists of sites allowed to use a feature in an iframe, rules passed from parent pages to embedded pages, nested frames, and navigation.
The goal is a test suite that would follow the Permissions Policy specification.
The first scope should use fullscreen and geolocation, with checks that the required permissions and test setup work. Camera and microphone could follow when tests can reliably grant permissions, simulate devices, and demonstrate that access succeeds when allowed.
Specification and existing tests
- Permissions Policy specification
- WPT Permissions Policy tests
- WPT geolocation tests and fullscreen tests, which contain further policy checks
- Published Permissions Policy results
Rationale
Permissions Policy determines whether embedded content can use capabilities such as geolocation or fullscreen.
The previous focus-area proposal #1082 and investigation proposal #1132 were not selected for Interop 2026. Reviewer feedback on #1082 found that the list included tests mainly about other features, some without an agreed standard or broad browser support. This proposal adds specific tests to review, checks that allowed actions succeed, and clear goals to address that feedback.
MDN compatibility data records a gap in support for the modern response header in Firefox and Safari. Support for headers, iframe rules, the affected APIs, and inspection of policy settings should nevertheless be assessed separately. A single label for the whole mechanism cannot describe the work accurately.
Existing tests show why this separation matters. permissions-policy-header-policy-allowed-for-self.https.sub.html directly calls document.permissionsPolicy.getAllowlistForFeature(). Its failure cannot by itself identify a failure to apply a policy rule. The geolocation header-denial test instead grants user permission and then checks that the policy still blocks the API. Its self-origin counterpart includes successful geolocation and uses the WebDriver BiDi test tools to set permissions and supply a simulated location. The review must check that these tools work in every target browser.
Navigation provides another specific case to review. Specification issue #578 discusses a mismatch after a cross-origin iframe navigates to a same-origin document. The editor's explanation distinguishes the origin of the loaded page, which controls actual access, from the origin assumed by the API that inspects iframe policy. The existing fullscreen navigation test contains an expectation that needs review against that explanation. Its current assertion should not silently become a scoring requirement.
The policy-inspection API also has its own open discussion #401. The newer #591 is closed as a duplicate of that discussion. A suggestion there to rely on the Permissions API is not an agreed removal of the existing interface.
Reasons for including the feature
- Measured use on websites: The 2025 HTTP Archive Web Almanac reports the
Permissions-Policyheader on 3.7% of websites in its mobile crawl. It also reports that 29.2% of the 33.3 million iframe elements observed on mobile had anallowattribute. So websites using a header and iframe elements using an attribute and neither proves that all browsers enforce those rules correctly. - A real application workaround: In the DrChrono developer discussion about microphone access, the platform explains that its policy does not allow microphone or camera access inside the embedded app. It recommends opening the app in another tab or window. This shows how policy choices affect real application flows. It is an example of a hosting restriction, not evidence of a browser bug or a request to bypass that restriction.
- Browser implementation work: Firefox bug 1531012 is the tracking issue for Permissions Policy. The navigation report in specification issue #578 adds a specific case where browsers were reported to behave differently. The investigation can connect clear tests to such reports instead of treating every failed policy-related test as the same problem.
- Direct reviewer feedback: The earlier Interop review asks for a smaller test list that matches the intended proposal. This investigation answers that request. No feature-specific survey percentage is claimed; the website measurements and concrete reports are the evidence offered here.
Investigation Roadmap
This investigation should give developers and implementers a clearer account of which policy operations differ and why while creating a practical foundation for later implementation work.
- Lingua principale
- JavaScript
- Stelle
- 591
- Fork
- 39
- Merge medio
- 3h 8m
- PR unite (30g)
- 2
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di web-platform-tests/interop
-
focus-area-proposal
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
web-platform-tests/interop#1363 · 2 commenti · 32 reazioni ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
web-platform-tests/interop#1362 · 1 commento · 5 reazioni ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
web-platform-tests/interop#1267 · 5 commenti · 2 reazioni ·
-
meta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
web-platform-tests/interop#931 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
web-platform-tests/interop#1522 ·
Tutte le issue di web-platform-tests/interop
Issue simili
-
good first issue type/ci
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
c-w-z/commit-decision-record#20 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
web-platform-tests/wpt#65844 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] 飞书群话题会话键(group:*:managed:/:thread:)无法作为会话同步路由,DSH Web 回合回答不回群(deliverSessionText → unroutable)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[jinja] Undefined values throw in for loops and the list filterForse già presa @prassu017 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
huggingface/huggingface.js#2963 ·
I maintainer di solito rispondono entro 1 giorno
-
integration:coding-agents
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
vectorize-io/hindsight#7028 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno