From 2d0f23b5fa22d4a12d670801e3bbd1c76391b23e Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 9 Jan 2025 14:09:15 -0800 Subject: [PATCH] Add support for 'ch-ua-high-entropy-values' permission policy This (currently disabled) policy allows a top-level site to restrict which documents are able to collect high-entropy client hints via the navigator.userAgentData.getHighEntropyValues() JS API. Restricting collection of high-entropy hints over HTTP is already possible via permissions-policy. Spec: https://wicg.github.io/ua-client-hints/#ch-ua-high-entropy-values Bug: 385161047 Change-Id: I13e648f52811ee30af6727520b733d260b9d579a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107648 Reviewed-by: Nate Chapin Commit-Queue: Mike Taylor Reviewed-by: Ken Buchanan Reviewed-by: Ari Chivukula Cr-Commit-Position: refs/heads/main@{#1404420} --- ...-attribute-redirect-on-load.https.sub.html | 56 ++++++++++++++++ ...-default-permissions-policy.https.sub.html | 42 ++++++++++++ ...abled-by-permissions-policy.https.sub.html | 44 +++++++++++++ ...-permissions-policy.https.sub.html.headers | 1 + ...abled-by-permissions-policy.https.sub.html | 42 ++++++++++++ ...-permissions-policy.https.sub.html.headers | 1 + ...rigin-by-permissions-policy.https.sub.html | 42 ++++++++++++ ...-permissions-policy.https.sub.html.headers | 1 + ...ermissions-policy-attribute.https.sub.html | 64 +++++++++++++++++++ ...ions-policy-ch-ua-high-entropy-values.html | 10 +++ 10 files changed, 303 insertions(+) create mode 100644 client-hints/permissions-policy/ch-ua-high-entropy-values-allowed-by-permissions-policy-attribute-redirect-on-load.https.sub.html create mode 100644 client-hints/permissions-policy/ch-ua-high-entropy-values-default-permissions-policy.https.sub.html create mode 100644 client-hints/permissions-policy/ch-ua-high-entropy-values-disabled-by-permissions-policy.https.sub.html create mode 100644 client-hints/permissions-policy/ch-ua-high-entropy-values-disabled-by-permissions-policy.https.sub.html.headers create mode 100644 client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-by-permissions-policy.https.sub.html create mode 100644 client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-by-permissions-policy.https.sub.html.headers create mode 100644 client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-on-self-origin-by-permissions-policy.https.sub.html create mode 100644 client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-on-self-origin-by-permissions-policy.https.sub.html.headers create mode 100644 client-hints/permissions-policy/ch-ua-high-entropy-values-permissions-policy-attribute.https.sub.html create mode 100644 permissions-policy/resources/permissions-policy-ch-ua-high-entropy-values.html diff --git a/client-hints/permissions-policy/ch-ua-high-entropy-values-allowed-by-permissions-policy-attribute-redirect-on-load.https.sub.html b/client-hints/permissions-policy/ch-ua-high-entropy-values-allowed-by-permissions-policy-attribute-redirect-on-load.https.sub.html new file mode 100644 index 00000000000000..da66bd0feb9ea8 --- /dev/null +++ b/client-hints/permissions-policy/ch-ua-high-entropy-values-allowed-by-permissions-policy-attribute-redirect-on-load.https.sub.html @@ -0,0 +1,56 @@ + + + + + + + + \ No newline at end of file diff --git a/client-hints/permissions-policy/ch-ua-high-entropy-values-default-permissions-policy.https.sub.html b/client-hints/permissions-policy/ch-ua-high-entropy-values-default-permissions-policy.https.sub.html new file mode 100644 index 00000000000000..d73d61d5ac31e2 --- /dev/null +++ b/client-hints/permissions-policy/ch-ua-high-entropy-values-default-permissions-policy.https.sub.html @@ -0,0 +1,42 @@ + + + + + + + \ No newline at end of file diff --git a/client-hints/permissions-policy/ch-ua-high-entropy-values-disabled-by-permissions-policy.https.sub.html b/client-hints/permissions-policy/ch-ua-high-entropy-values-disabled-by-permissions-policy.https.sub.html new file mode 100644 index 00000000000000..c86d3829d5c9fb --- /dev/null +++ b/client-hints/permissions-policy/ch-ua-high-entropy-values-disabled-by-permissions-policy.https.sub.html @@ -0,0 +1,44 @@ + + + + + + + \ No newline at end of file diff --git a/client-hints/permissions-policy/ch-ua-high-entropy-values-disabled-by-permissions-policy.https.sub.html.headers b/client-hints/permissions-policy/ch-ua-high-entropy-values-disabled-by-permissions-policy.https.sub.html.headers new file mode 100644 index 00000000000000..fcf474880843e2 --- /dev/null +++ b/client-hints/permissions-policy/ch-ua-high-entropy-values-disabled-by-permissions-policy.https.sub.html.headers @@ -0,0 +1 @@ +Permissions-Policy: ch-ua-high-entropy-values=() \ No newline at end of file diff --git a/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-by-permissions-policy.https.sub.html b/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-by-permissions-policy.https.sub.html new file mode 100644 index 00000000000000..7e05749816173a --- /dev/null +++ b/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-by-permissions-policy.https.sub.html @@ -0,0 +1,42 @@ + + + + + + + \ No newline at end of file diff --git a/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-by-permissions-policy.https.sub.html.headers b/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-by-permissions-policy.https.sub.html.headers new file mode 100644 index 00000000000000..ac74cfd647f07a --- /dev/null +++ b/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-by-permissions-policy.https.sub.html.headers @@ -0,0 +1 @@ +Permissions-Policy: ch-ua-high-entropy-values=* \ No newline at end of file diff --git a/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-on-self-origin-by-permissions-policy.https.sub.html b/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-on-self-origin-by-permissions-policy.https.sub.html new file mode 100644 index 00000000000000..24161b3cc02540 --- /dev/null +++ b/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-on-self-origin-by-permissions-policy.https.sub.html @@ -0,0 +1,42 @@ + + + + + + + \ No newline at end of file diff --git a/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-on-self-origin-by-permissions-policy.https.sub.html.headers b/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-on-self-origin-by-permissions-policy.https.sub.html.headers new file mode 100644 index 00000000000000..9c876c03f3cf59 --- /dev/null +++ b/client-hints/permissions-policy/ch-ua-high-entropy-values-enabled-on-self-origin-by-permissions-policy.https.sub.html.headers @@ -0,0 +1 @@ +Permissions-Policy: ch-ua-high-entropy-values=self \ No newline at end of file diff --git a/client-hints/permissions-policy/ch-ua-high-entropy-values-permissions-policy-attribute.https.sub.html b/client-hints/permissions-policy/ch-ua-high-entropy-values-permissions-policy-attribute.https.sub.html new file mode 100644 index 00000000000000..a6f9bbf73ee6e0 --- /dev/null +++ b/client-hints/permissions-policy/ch-ua-high-entropy-values-permissions-policy-attribute.https.sub.html @@ -0,0 +1,64 @@ + + + + + + + \ No newline at end of file diff --git a/permissions-policy/resources/permissions-policy-ch-ua-high-entropy-values.html b/permissions-policy/resources/permissions-policy-ch-ua-high-entropy-values.html new file mode 100644 index 00000000000000..842cf590293dad --- /dev/null +++ b/permissions-policy/resources/permissions-policy-ch-ua-high-entropy-values.html @@ -0,0 +1,10 @@ + + + +