AWS Security ChangesHomeSearch

AWS clean-rooms: Clean Rooms comparison controls: add always-allowed literal values

Service: clean-rooms · 2026-10-10 · Documentation medium

File: clean-rooms/latest/userguide/custom-comparison-controls.md · Type: authz

Summary

Expands the Clean Rooms custom comparison controls doc to describe a new category of 'always-allowed values' (NULL/IS NULL, empty string, Boolean true/false, numeric zero) that can be compared even when a column is absent from allowedLiteralComparisonColumns or listed in identityColumns. Clarifies that these fixed values can't be changed by a query runner to target specific records, that they still apply inside expressions (CASE, IF, COALESCE, UPPER) but not when the column is wrapped in a function or arithmetic (e.g., ABS(revenue) = 0), and rewords the identity-column/minimum-aggregation-threshold examples accordingly.

Security assessment

The change documents a privacy/access-control control in AWS Clean Rooms: the allowlist for literal comparisons, the identityColumns restriction tied to minimum aggregation thresholds, and a new exception for immutable always-allowed literal values. This is security/anti-re-identification guidance (backed by the added statement that these values are fixed 'so a query runner can't change them to target a specific value in your data'), but no specific vulnerability, incident, or advisory is referenced, so security_issue_related is false while adds_security_documentation is true. Severity is medium: it is authoritative authorization-guidance for query filtering rather than a credential/encryption fix, and the diff refines (slightly relaxes) an existing control rather than patching a flaw.

Evidence

+AWS Clean Rooms always allows a query to compare a column to the following literal values, called _always-allowed values_ , even if the column isn't listed in `allowedLiteralComparisonColumns` or is listed in `identityColumns`:

Diff

diff --git a/clean-rooms/latest/userguide/custom-comparison-controls.md b/clean-rooms/latest/userguide/custom-comparison-controls.md
index e647798..52ae899 100644
--- a//clean-rooms/latest/userguide/custom-comparison-controls.md
+++ b//clean-rooms/latest/userguide/custom-comparison-controls.md
@@ -15 +15 @@ In SQL, literal comparison matches a column from your dataset against a literal
-Comparison controls are an allowlist. Once you set `allowedLiteralComparisonColumns`, only the columns you list can be compared to a literal value, and every column you do not list is blocked. The same applies to `allowedColumnComparisonColumns` for column-to-column comparisons. Adding a column to one allowlist does not add it to the other.
+Comparison controls are an allowlist. Once you set `allowedLiteralComparisonColumns`, only the columns you list can be compared to a literal value, and every column you do not list is blocked, except for comparisons against always-allowed values. For more information, see Literal values that are always allowed. The same allowlist behavior applies to `allowedColumnComparisonColumns` for column-to-column comparisons. Adding a column to one allowlist does not add it to the other.
@@ -19 +19 @@ If you do not configure `comparisonControls`, AWS Clean Rooms applies no compari
-If you do not configure `comparisonControls` but you do set a minimum aggregation threshold, comparisons remain otherwise unrestricted. However, AWS Clean Rooms never allows a literal comparison on a column listed in `identityColumns`. That restriction comes from the threshold itself, so it applies whether or not you configure comparison controls. For more information, see [Minimum aggregation thresholds](./custom-min-agg-thresholds.html).
+If you do not configure `comparisonControls` but you do set a minimum aggregation threshold, comparisons remain otherwise unrestricted. However, AWS Clean Rooms does not allow a literal comparison on a column listed in `identityColumns`. The only exception is comparisons against always-allowed values. That restriction comes from the threshold itself, so it applies whether or not you configure comparison controls. For more information, see [Minimum aggregation thresholds](./custom-min-agg-thresholds.html) and Literal values that are always allowed.
@@ -25 +25 @@ If you configure `comparisonControls` together with disallowed output columns, t
-A literal comparison evaluates a column against a single hardcoded constant (a string, number, or date). The right side of the operator never changes during the query execution. Syntax examples include:
+A literal comparison evaluates a column against a single hardcoded constant (for example, a string, number, date, Boolean value, or `NULL`). The right side of the operator never changes during the query execution. Syntax examples include:
@@ -34 +34 @@ A literal comparison evaluates a column against a single hardcoded constant (a s
-When you use [Minimum aggregation thresholds](./custom-min-agg-thresholds.html), AWS Clean Rooms does not allow literal comparison on the `identityColumns` value. This prevents the query runner from submitting a query filtered down to an individual or specific set of users. Avoid allowing literal comparison on low cardinality columns that can single out small groups or individual data subjects.
+When you use [Minimum aggregation thresholds](./custom-min-agg-thresholds.html), AWS Clean Rooms does not allow literal comparison on the `identityColumns` value, except against always-allowed values (see Literal values that are always allowed). This helps prevent the query runner from submitting a query filtered down to an individual or specific set of users. Avoid allowing literal comparison on low cardinality columns that can single out small groups or individual data subjects.
@@ -49,0 +50,37 @@ Allow literal comparison only on columns that don't identify individuals or smal
+### Literal values that are always allowed
+
+AWS Clean Rooms always allows a query to compare a column to the following literal values, called _always-allowed values_ , even if the column isn't listed in `allowedLiteralComparisonColumns` or is listed in `identityColumns`:
+
+  * `NULL`, including `IS NULL` and `IS NOT NULL` conditions
+
+  * The empty string (`''`)
+
+  * The Boolean values `true` and `false`
+
+  * The number zero in any numeric form, such as `0`, `0.0`, or `-0`. The string `'0'` isn't a number, so it follows the comparison controls.
+
+
+
+
+Because these values are fixed, a query runner can't change them to target a specific value in your data.
+
+This applies when the column is compared directly, or inside an expression such as CASE, IF, COALESCE, or UPPER. If the column is wrapped in another function or in arithmetic (for example, `ABS(revenue) = 0` or `revenue - 50 = 0`), the comparison follows the comparison controls.
+
+Comparisons against any other literal value, including other numbers such as `1`, follow the comparison controls and, for identity columns, the minimum aggregation threshold restriction. If you configure minimum aggregation thresholds, they still apply to every row in the query result.
+
+For example, each of the following conditions is allowed even when the column isn't listed in `allowedLiteralComparisonColumns`:
+    
+    
+    -- Allowed: comparisons against always-allowed values
+    WHERE user_id IS NOT NULL
+    WHERE revenue > 0
+    WHERE is_active = true
+
+Each of the following conditions is blocked when the column isn't listed in `allowedLiteralComparisonColumns`:
+    
+    
+    -- Blocked: other literal values, or a column wrapped in a function
+    WHERE revenue > 1
+    WHERE status_code = '0'
+    WHERE ABS(revenue) = 0
+
@@ -54 +91 @@ A publisher configures a custom analysis rule with a minimum aggregation thresho
-Because `user_id` is the identity column, it can't be compared to a literal, preventing the advertiser from filtering results down to a single user. But `campaign_id` and `event_date` are high-cardinality, non-identifying dimensions, so the publisher adds them to `allowedLiteralComparisonColumns`, which lets the advertiser filter by campaign and scope the analysis to a date range:
+Because `user_id` is the identity column, it can't be compared to a literal such as a specific user ID. This helps prevent the advertiser from filtering results down to a single user. But `campaign_id` and `event_date` are high-cardinality, non-identifying dimensions, so the publisher adds them to `allowedLiteralComparisonColumns`, which lets the advertiser filter by campaign and scope the analysis to a date range:
@@ -82 +119 @@ Given the same configuration, this query is blocked:
-    -- Blocked: user_id is the identity column and can never be compared to a literal
+    -- Blocked: user_id is the identity column and can't be compared to a specific user ID
@@ -116 +153 @@ A publisher and an advertiser want to measure their audience overlap — how man
-Because `user_id` is the identity column, the publisher has already blocked literal comparisons on it (so no one can filter to a specific person). To enable the join across tables, the publisher adds `user_id` to `allowedColumnComparisonColumns`. To enable campaign filtering, the publisher adds `campaign_id` to `allowedLiteralComparisonColumns`.
+Because `user_id` is the identity column, AWS Clean Rooms already blocks comparing it to a specific value, such as a user ID. This helps prevent filtering directly to one person. To enable the join across tables, the publisher adds `user_id` to `allowedColumnComparisonColumns`. To enable campaign filtering, the publisher adds `campaign_id` to `allowedLiteralComparisonColumns`.
@@ -154 +191 @@ The join succeeds because a column-to-column comparison evaluates dynamically pe
-Comparison controls follow indirect literal comparisons, not only a direct WHERE `column = 'literal'` predicate. If you allow `ANY_EXPRESSION` inside aggregate functions through `allowedAggregateExpressionType`, comparison controls still block a literal comparison on a column that is not in `allowedLiteralComparisonColumns`. This applies even when the literal is nested inside an expression.
+Comparison controls follow indirect literal comparisons, not only a direct WHERE `column = 'literal'` predicate. If you allow `ANY_EXPRESSION` inside aggregate functions through `allowedAggregateExpressionType`, comparison controls still block a literal comparison on a column that is not in `allowedLiteralComparisonColumns`. This applies even when the literal is nested inside an expression. AWS Clean Rooms still allows comparisons against always-allowed values inside expressions such as CASE, IF, COALESCE, and UPPER. For example, `SUM(CASE WHEN bonus = 0 THEN salary ELSE 0 END)` is allowed. For more information, see Literal values that are always allowed.