demo · v140
Header Explorer
Authoring a Permissions-Policy header for the device-attributes API. Pick which origins can call navigator.managed.getDeviceAttributes(), watch the header build, see whether a probe from each origin would succeed.
which origins may call navigator.managed.getDeviceAttributes?
self (this origin)
https://admin.example.com
https://*.intra.example.com
* (any origin)
generated header
simulated probe results
// Set by the IT admin on the IWA root:
Permissions-Policy: device-attributes=(self "https://admin.example.com")
// Inside the policy: ok
const dev = await navigator.managed.getDeviceAttributes();
// Outside: rejected with NotAllowedError
see also
- Permissions Policy for Device Attributes API — feature index
- Permissions Policy spec