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
fix(rest,runtime): make api-exposure metadata fail-open observable (#3545) (#3567)
#3545 evaluated the residual risk of the API-exposure gate failing OPEN when
object metadata can't be resolved. Conclusion: acceptable — the gate is a
surface-area control, not the authz boundary (auth + CRUD/FLS/RLS enforce on the
data call regardless), and failing closed would 405 every request during the
cold-start window for no security gain. The one gap was that the fail-open was
SILENT.
- rest: loadObjectItems logs a THROWN metadata read (a real fault) while leaving
a legitimately-empty registry silent — so a persistent outage, during which
the gate allows every op unchecked, is diagnosable without cold-start false
alarms. Behavior unchanged (still returns [] → gate abstains).
- runtime: api-exposure.ts records the #3545 tiered decision in its contract doc
(keep fail-open when the whole metadata service is unavailable; defer the
narrow present-but-unreadable-policy widen — unreachable via Zod-validated
registration — to the exposure-semantics window #3543).
Tests: rest gate suite gains three #3545 cases (thrown read → fail-open + logged;
empty registry → fail-open + silent; enforceApiAccess does not block on throw).
Full rest.test.ts 171 pass; rest + runtime build (CJS/ESM/DTS) clean.
Claude-Session: https://claude.ai/code/session_012L8EfEa157Pe6C73qRnaJH
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments