You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/references/kernel/execution-context.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ const result = ExecutionContextSchema.parse(data);
66
66
|**skipAutomations**|`boolean`| optional ||
67
67
|**seedReplay**|`boolean`| optional ||
68
68
|**skipStateMachine**|`boolean`| optional ||
69
-
|**preserveAudit**|`boolean`| optional ||
69
+
|**preserveAudit**|`boolean`| optional |Historical import: preserve the ORIGINAL audit timeline for this write instead of stamping it "now" (#3493). Opt-in and server-constructed only, never client-supplied. On the UPDATE path it admits a whitelist — the audit/timestamp family (created_at / created_by / updated_at / updated_by) plus author-declared business `readonly` fields — while platform-managed `system` columns (tenancy, generated) stay stripped. On INSERT the exemption does NOT apply (#6640): a create is stripped earlier, at the DataProtocol ingress, whose only exemption is `context.isSystem`, so a non-system create carrying `preserveAudit` still has those fields stripped and is warned (WARN) that the exemption is UPDATE-only — replaying archival readonly facts on create requires a system context. Permissions / RLS / field-level security are unaffected.|
Copy file name to clipboardExpand all lines: content/docs/references/security/rls.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Salesforce:
76
76
- Manual Sharing: Individual record sharing
77
77
78
78
ObjectStack RLS:
79
-
- A small, fixed expression grammar (equality, set-membership, always-true)
79
+
- A constrained CEL predicate grammar: comparisons and set-membership against literals or `current_user.*` values, composable with `&&` / `||`; anything that does not lower to a filter fails closed
80
80
- Subquery-shaped needs are pre-resolved by the runtime (§7.3.1)
81
81
- Multiple policies OR-combine for union (any-match-allows) semantics
82
82
@@ -171,7 +171,7 @@ const result = RLSEvaluationResultSchema.parse(data);
171
171
|**description**|`string`| optional | Policy description and business justification |
172
172
|**object**|`string`| ✅ | Target object name |
173
173
|**operation**|`Enum<'select' \| 'insert' \| 'update' \| 'delete' \| 'all'>`| ✅ | Database operation this policy applies to |
174
-
|**using**|`string`| optional | Filter condition for SELECT/UPDATE/DELETE. One of the four compiler-supported forms: `field = current_user.<prop>`, `field = 'literal'`, `field IN (current_user.<array>)`, or `1 = 1`. Optional for INSERT-only policies. |
174
+
|**using**|`string`| optional | Filter condition for SELECT/UPDATE/DELETE, authored in canonical CEL (ADR-0058 D1). It enforces when the predicate lowers to an ObjectQL filter: a field compared against a literal or a `current_user.*` context value using `==`, `!=`, `<`, `<=`, `>` or `>=`; `in` against a `current_user.*`array or an inline literal list (e.g. status in ['draft', 'pending']); these combined with `&&` / `\|\|`; or the bare allow-all `true`. Anything that does not lower fails closed — the policy matches zero rows. The legacy SQL-ish spellings are still accepted through a transitional bridge that rewrites `=` to `==` and `IN` to `in` (deprecated under ADR-0058 D1); SQL `AND` / `OR` / `NOT IN` / `IS NULL` / `LIKE` are NOT bridged and fail closed. Optional for INSERT-only policies. |
175
175
|**check**|`string`| optional | Validation condition for INSERT/UPDATE (defaults to USING clause if not specified - enforced at application level) |
176
176
|**positions**|`string[]`| optional | Positions this policy applies to (omit for all) |
177
177
|**enabled**|`boolean`| ✅ | Whether this policy is active |
* field-level security are unaffected: this changes only which audit/readonly
354
354
* values the runtime overwrites, never who may write the record.
355
355
*/
356
-
preserveAudit: z.boolean().optional(),
356
+
preserveAudit: z.boolean().optional().describe('Historical import: preserve the ORIGINAL audit timeline for this write instead of stamping it "now" (#3493). Opt-in and server-constructed only, never client-supplied. On the UPDATE path it admits a whitelist — the audit/timestamp family (created_at / created_by / updated_at / updated_by) plus author-declared business `readonly` fields — while platform-managed `system` columns (tenancy, generated) stay stripped. On INSERT the exemption does NOT apply (#6640): a create is stripped earlier, at the DataProtocol ingress, whose only exemption is `context.isSystem`, so a non-system create carrying `preserveAudit` still has those fields stripped and is warned (WARN) that the exemption is UPDATE-only — replaying archival readonly facts on create requires a system context. Permissions / RLS / field-level security are unaffected.'),
357
357
358
358
/**
359
359
* OAuth 2.1 scopes granted to the access token that authenticated this
Copy file name to clipboardExpand all lines: packages/spec/src/security/rls.zod.ts
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ import { strictObject } from '../shared/strict-object';
76
76
* - Manual Sharing: Individual record sharing
77
77
*
78
78
* ObjectStack RLS:
79
-
* - A small, fixed expression grammar (equality, set-membership, always-true)
79
+
* - A constrained CEL predicate grammar: comparisons and set-membership against literals or `current_user.*` values, composable with `&&` / `||`; anything that does not lower to a filter fails closed
80
80
* - Subquery-shaped needs are pre-resolved by the runtime (§7.3.1)
81
81
* - Multiple policies OR-combine for union (any-match-allows) semantics
.describe('Filter condition for SELECT/UPDATE/DELETE. One of the four compiler-supported forms: `field = current_user.<prop>`, `field = \'literal\'`, `field IN (current_user.<array>)`, or `1 = 1`. Optional for INSERT-only policies.'),
364
+
.describe('Filter condition for SELECT/UPDATE/DELETE, authored in canonical CEL (ADR-0058 D1). It enforces when the predicate lowers to an ObjectQL filter: a field compared against a literal or a `current_user.*` context value using `==`, `!=`, `<`, `<=`, `>` or `>=`; `in` against a `current_user.*` array or an inline literal list (e.g. status in [\'draft\', \'pending\']); these combined with `&&` / `||`; or the bare allow-all `true`. Anything that does not lower fails closed — the policy matches zero rows. The legacy SQL-ish spellings are still accepted through a transitional bridge that rewrites `=` to `==` and `IN` to `in` (deprecated under ADR-0058 D1); SQL `AND` / `OR` / `NOT IN` / `IS NULL` / `LIKE` are NOT bridged and fail closed. Optional for INSERT-only policies.'),
359
365
360
366
/**
361
367
* CHECK clause - Validation for INSERT/UPDATE operations.
0 commit comments