Skip to content

[0.5.0][RLAC P5-followup] Document-filtering conformance + harness per-step headers #326

@erichare

Description

@erichare

Follow-up to RLAC P5 (#295). P5 added cross-runtime conformance for the header-free RLAC surface — rlac-principals-lifecycle (CRUD) and rlac-policy-compile-preview (which pins the compiled filter shape {$or:[{visible_to:caller},{visible_to:"*"}]}). The visibility-filtering fixtures still need authoring:

  • rlac-document-visibility-filtering — RLAC on + a policy + principals + docs with mixed visibleTo; GET /documents as alice vs bob returns only the docs each may see; POST /search merges the policy filter.
  • rlac-chunk-listing-denialGET …/documents/{id}/chunks 404s a principal who can't see the doc; 401 when no principal resolves.

These require setting the x-view-as-principal request header per step (the only way to bind a principal in the conformance harness's auth.mode: disabled). The harness doesn't support per-step headers today, so this needs a small but cross-runtime extension:

  1. Add headers?: Record<string,string> to the scenario step schema (conformance-regenerate.ts Scenario).
  2. Thread it through the regenerate fetcher (app.request init) and capture it in the fixture request shape.
  3. Update conformance/runner.mjs runScenario + the cross-runtime fetcher signature ((method, path, body?, headers?)) — Python/Java harnesses gain an optional 4th param.
  4. Author the two scenarios + regenerate.

Scoped out of P5 to avoid a cross-runtime harness-contract change at release crunch; the filtering behavior itself is covered by the TS route tests (#291/#292).

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.5.0AI Workbench 0.5.0 — Enterprise Access Control releaseepic:rlacFeature ①: RLAC enforcement (flagship)testingTest coverage and quality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions