Commit 06cb319
Follow-through on #1591/#3213 for two non-better-auth managed objects that
shipped the same contradiction the better-auth reconciliation fixed: their
enable.apiMethods advertised generic create/update/delete while their managedBy
bucket forbids user-context writes, leaving the generic /data route open.
- sys_presence (append-only) advertised create/update/delete — update/delete on
an append-only object — but is written only over the realtime websocket/
in-memory path, never through ObjectQL. Narrowed to ['get','list'].
- sys_metadata (system) advertised full CRUD but overlays are authored only via
the metadata-protocol RPC (engine writes carry a transaction context, not a
user session); neither the framework nor the Console (objectui) POSTs
/data/sys_metadata. Narrowed to ['get','list'].
Reads stay open. The metadata-protocol / realtime write paths are engine-level
and bypass the HTTP exposure gate, so they are unaffected — verified by the
metadata-authoring dogfood (5 passed), the objectql overlay engine-insert tests
(6 passed), and metadata-core (100 passed).
A blast-radius audit found the broader system/append-only buckets are NOT safe
to guard wholesale: several system objects (sys_user_position,
sys_user_permission_set, sys_position_permission_set, sys_user_preference,
sys_import_job) are user-writable by design (delegated administration, user
preferences, imports). Generalizing the engine write guard to those buckets is
intentionally out of scope — the root cause is the overloaded system bucket,
tracked in #3220.
Claude-Session: https://claude.ai/code/session_01GwY68hKVysP98BX7i5eUoE
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 50dfa4f commit 06cb319
4 files changed
Lines changed: 55 additions & 2 deletions
File tree
- .changeset
- packages
- metadata-core/src/objects
- services/service-realtime/src/objects
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
231 | 237 | | |
232 | 238 | | |
233 | 239 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
73 | 81 | | |
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
117 | 123 | | |
118 | 124 | | |
119 | 125 | | |
| |||
0 commit comments