Commit ca2b2f6
extractTargetField only matched legacy `field =` / `IN`, returning null for
canonical CEL `field ==` (how real seeds/business policies author equality).
A null target means "keep the policy", so the Layer 1 field-existence net and
the tenancy-disabled skip net in computeLayeredRlsFilter were inert for every
`==` policy. Extend the regex to recognize `==` (ordered before `=` so the
alternation does not mis-match the first `=` of `==`), alongside `=`/`IN`.
Recognition is only extended; net semantics are unchanged and unmatched shapes
(!=, >, <, >=, <=) still return null (conservative keep).
Delta (fail-closed strengthening, same effective visibility): the wildcard
owner_only_writes/deletes seeds (`created_by == current_user.id`) now fail
closed on objects lacking a created_by column (platform-global/system tables)
instead of compiling to a phantom {created_by:…} filter — same denied outcome,
explicit deny sentinel now. Ordinary tenant/business objects carry created_by
and are unaffected. Tenancy-disabled skip net affects no current seed (no `==`
seed targets organization_id on a tenancy-disabled object). Tenant wall is
Layer 0 (tenant-layer.ts), which never used this parser — unaffected.
Tests: authz-matrix-gate two platform_global write cells updated to the deny
sentinel with [#2936] annotations; added a `==` twin of the L692 field-existence
fail-closed guard. plugin-security 392 green; dogfood authz-conformance + RLS
matrices green.
Claude-Session: https://claude.ai/code/session_019QRUvVfpvSycAHMMF2xTxs
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2ae78c6 commit ca2b2f6
4 files changed
Lines changed: 93 additions & 11 deletions
File tree
- .changeset
- packages/plugins/plugin-security/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
211 | 222 | | |
212 | 223 | | |
213 | 224 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
705 | 733 | | |
706 | 734 | | |
707 | 735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2487 | 2487 | | |
2488 | 2488 | | |
2489 | 2489 | | |
2490 | | - | |
2491 | | - | |
2492 | | - | |
2493 | | - | |
2494 | | - | |
2495 | | - | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
2496 | 2505 | | |
2497 | 2506 | | |
2498 | 2507 | | |
0 commit comments