https://github.com/WICG/keyboard-map/issues/38
https://wicg.github.io/keyboard-map/#permissions-policy
getLayoutMap() used in conjunction with code solves the problem of identifying the actual key pressed in keyboard with different layout maps such as English vs French keyboards, but since getLayoutMap() isn't available in all contexts (can't be used inside iframes), Office web apps like Excel, Word, PowerPoint, etc. that show up as embedded experiences in Outlook Web, Teams, etc. and are running in iframes, can't use this API. Adding keyboard-map to the allow attribute list solves this problem.
See
this Github issue for more info.
Not applicable as this is API has been shipped.
Not applicable
Currently Keyboard API is not supported on Safari and Firefox so interop risk is minimal. Moreover, this proposal only allows the usage of the Keyboard API inside an iframe if it's explicitly specified in the allow attribute list by the web author.
The feature policy names are based on the permission names, which have been part of the permission policy spec.
Gecko: Negative (https://github.com/mozilla/standards-positions/pull/310)
WebKit: Negative (https://github.com/WICG/keyboard-map/issues/30#issue-487691188)
Web developers: Positive (https://github.com/WICG/keyboard-map/issues/38#issue-934823530)
None.
None.
While there are fingerprinting concerns, this API has been shipped in Chrome 69 and adding to the allow attribute list (like HID, clipboard-read/write etc) allows sites like Office web apps to use this API.
The default value would be "self" (= top-level browsing context) but sites could add it to allow list to access within iframe context.
The allow attribute has basic tooling support as described in
this doc.
Yes
False
https://bugs.chromium.org/p/chromium/issues/detail?id=1258242
97
https://www.chromestatus.com/feature/5657965899022336
This intent message was generated by Chrome Platform Status.
Contact emails
Explainer
https://github.com/WICG/keyboard-map/issues/38
Specification
https://wicg.github.io/keyboard-map/#permissions-policy
Summary
getLayoutMap() used in conjunction with code solves the problem of identifying the actual key pressed in keyboard with different layout maps such as English vs French keyboards, but since getLayoutMap() isn't available in all contexts (can't be used inside iframes), Office web apps like Excel, Word, PowerPoint, etc. that show up as embedded experiences in Outlook Web, Teams, etc. and are running in iframes, can't use this API. Adding keyboard-map to the allow attribute list solves this problem.
Can you clarify what the current situation is?
getLayoutMap() which is part of the Keyboard API can only be accessed in the top browsing context which cuts off access from same and cross origin iframes.
With this permission policy based solution, the default value would be “Self” that grants access to same origin iframe by-default, but requires web authors to add the “keyboard-map” value to allow attribute in order to grant access within cross-origin iframes.
IIUC, currently layout maps are not available at all to iframes. Is that correct?
Correct.
Also, are you suggesting to add a permission policy that would enable it by default for same-origin iframes, and enable explicit delegation for cross-origin iframes?
Yes.
-Anupam
getLayoutMap() can already be accessed by the top level browsing context and I believe it does have fingerprinting concerns: a site can gain knowledge of the keyboard layout of the user even before the user has typed anything. Try this site switching between French and English keyboard layouts: https://fortunate-onyx-wren.glitch.me/french-or-english.html. The privacy mitigation section describes some mitigations we could add for fingerprinting related concerns.
I don't think exposing this by default to same origin iframes and allowing the top-level browsing context to delegate its authority to use getLayoutMap() to other iframes increases the concern any. If I'm thinking about that wrong please let me know.
For the privacy section: I’ll make a change to add permission policy along with the top level browsing context restriction to the spec.
Reading through https://wicg.github.io/keyboard-map/#privacy the only risk here is increased fingerprinting surface. Is that correct?
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/BL0PR00MB038743E3690A397D6851C7F5CFB99%40BL0PR00MB0387.namprd00.prod.outlook.com.
LGTM1
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Created an issue to get feedback from TAG: https://github.com/w3ctag/design-reviews/issues/685
I added this to the webappsec-permission policy: https://github.com/w3c/webappsec-permissions-policy/pull/428, but will also create an issue to investigate Permissions API integration. Thanks!
LGTM1
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/DM5PR00MB039046006135653C635811A0CF859%40DM5PR00MB0390.namprd00.prod.outlook.com.
I’m not sure if checking that in the browser would make sense here because the allow attribute restriction is specified in the DOM and the browser process isn’t involved. I did ask this in the slack channel and pretty much got the same response that the renderer should be enforcing this check. If you have any other ideas though, then please let me know!
LGTM1
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/BL0PR00MB038743E3690A397D6851C7F5CFB99%40BL0PR00MB0387.namprd00.prod.outlook.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.