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
{{ message }}
Repository navigation
Commit d318b24
Browse filesBrowse the repository at this point in the historyBrowse files
feat(security,rest): getReadableFields query surface for export column projection (#3547) (#3561)
The REST export route projected columns by inferring readability from the first
chunk of already-masked data rows (#3498), which drops an all-null readable
column and leaves an empty result set un-narrowed. Add the long-term-correct
path: a security-service query surface that returns the readable field set for
a context, derived from schema + FLS rather than from data rows.
- plugin-security: the `security` service gains getReadableFields(object,
context). Same evaluator + requiredPermissions fold + on-behalf-of delegator
intersection the read middleware's FieldMasker uses (fail-closed on a dangling
delegator), returning every schema field NOT masked non-readable — the exact
complement of maskResults' delete set, so it can never drift from data-plane
FLS. Computed from schema+context, never rows → immune to null/empty results.
isSystem bypasses FLS; unresolvable schema → undefined (caller falls back).
- rest: GET /data/:object/export asks the environment's security service for
getReadableFields and projects the schema-derived header to that set before
streaming. No service reachable → degrades to the existing masked-row
inference (zero regression). Explicit ?fields= is honored verbatim.
Tests: plugin-security getReadableFields (readable=complement of mask, isSystem
bypass, no-restriction passthrough, unresolvable→undefined, schema-not-rows);
rest export route projects from the service (drops a masked field present in
rows; keeps a readable column absent from every row; honors explicit ?fields=).
Claude-Session: https://claude.ai/code/session_012L8EfEa157Pe6C73qRnaJH
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments