Skip to content
Registry StackDocsv0.48.0

Registry Casework security model

View as Markdown

This page states what Registry Casework’s security boundaries hold, what they do not, and what you must do as the operator. The operator obligations are numbered 1 to 10, and each accepted residual risk carries a stable identifier from CASEWORK-RES-01 to CASEWORK-RES-10. The row-per-invariant contract is the machine-checked Casework security invariant matrix in the registry-stack repository, and each row names its executable negative test. This page names those rows by identifier (CASEWORK-SEC-NN). Deployment is in Deploy Registry Casework, with settings in the Registry Casework runtime configuration reference and grants in Registry Casework task grants.

  • Token verification and the issuer: every authenticated request carries an RFC 9068 access token verified for the configured issuer, audience, at+jwt type, allowed clients and signature from the configured key source. The deployment trusts one issuer. Declared issuer and key addresses are trusted on the operator’s word (CASEWORK-RES-08). A key listed in revokedKeyIds is refused locally and revoked nowhere else (CASEWORK-RES-09).
  • Producer versus reviewer: a producer submits review requests and reads results; it cannot record human decisions. A reviewer decides under a human assertion and a single selected profile; profile scopes are never unioned (CASEWORK-SEC-01, CASEWORK-SEC-02).
  • Applicant progress projection: the ordinary producer request read omits progress. An explicit include=progress read may return only the current stage’s optional publicProgressCode from the accepted, digest-pinned policy closure, and only while the request is reviewing. It never returns a raw stage, queue, task, reviewer or decision detail as the applicant progress code. The client accepts the code only when the complete accepted request, subject, policy and submission digest still match (CASEWORK-SEC-35).
  • Private reason versus public reason: every decision names an outcome declared by the pinned policy and offered at the current stage. The reviewer’s private reason stays in the accountability record. Only the outcome and an optional publicReason (at most 2000 UTF-8 bytes) reach the producer result, and the audit journal records only that a public reason was given (CASEWORK-SEC-31).
  • Source concealment: lists, counts, ordering and exact request selection evaluate the caller’s live source visibility before releasing anything. An unknown, out-of-team, concealed or expired request returns the neutral empty result. Retained decision receipts go only to their recorded author (CASEWORK-SEC-03, CASEWORK-SEC-12, CASEWORK-SEC-32).
  • Supervisory reads: supervisory discovery omits holder identities and due dates and grants no reviewer content access. The audited accountability read is released only after its audit entry is accepted (CASEWORK-SEC-21).
  • Policy inspection: any caller allowed to read a review policy, including the trusted producers that submit to it, receives its full closure from GET /v1/review-policies: every access profile in the project (id, label, description, principal claim name, required scopes and role), the queues, teams and inbox, and the policy’s clocks, calendars, context provider, task templates (each with its client, scopes, resource and agent identity) and trusted producers (each with its issuer, subject and profile). The policy digest a producer pins covers the behavioural part of that closure; labels, descriptions and because texts are served but not hashed. The closure holds no secrets or credentials. It does name service identities and the scopes their profiles and templates require, and it carries token issuer URLs and the resource and audience identifiers that templates declare, which are free text. Keep anything confidential out of labels, descriptions and those identifiers.
  • Task grants: a grant is bounded: 900 seconds for an immediate grant, at most 604800 seconds (seven days) for a deferred one. Responsibility changes, release, a decision on the review task, a changed subject, template deactivation and revocation end a grant, and it cannot be revived by reassigning back. Deferred grants cannot carry Evidence bounds (CASEWORK-SEC-18, CASEWORK-SEC-27).
  • Completion signals: the completion wake-up carries no result and no destination authority. The authenticated result fetch and result feed are the source of truth (CASEWORK-SEC-08).
  • Activation: all database writes of a package activation run in caseworkctl apply and are recorded in an activation ledger. The runtime refuses to start on a weakened role boundary until apply records it (CASEWORK-SEC-23, CASEWORK-SEC-24, CASEWORK-SEC-25).
  • Local tooling: caseworkctl api PATH --url URL --header @FILE sends the bearer and profile headers that rstack dev token RUN --as PERSON wrote to the header file and adds no authority; Casework still authenticates and authorises every route. Remote connections follow the same boundary: selecting a connection creates no product authority, and the receiving product still authenticates and authorises every protected request (Call an API with rstack). rstack dev uses a loopback listener and a private static key pin for each development run. The shared issuer gives a named synthetic person only the scopes and additional claims declared in their Casework grant. A reviewer token forwarded to Base Registry Engine (BReg) uses authority explicitly declared in both grants. Casework applies its usual client, profile, and human-identity checks (run isolation).
  • Separate credentials for the same human: when a provider declares a humanSourceAuthentication audience, collection authentication resolves one immutable provider before filtering or output, including empty pages; missing or ambiguous providers and invalid pairs fail the invocation. A single submitted-context task or request reads no source, so Casework ignores a well-formed pair from a staff caller there: it neither verifies nor forwards the source bearer, and the call is decided as without the pair, by the primary bearer, profile and ordinary authorisation. Admission still refuses before the policy lookup, on a submitted-context target as on any other: a source bearer that is not a well-formed compact token, a duplicated source authorisation, primary authorisation, Casework profile or source profile header, a source bearer without a valid Registry-Source-Profile, and a Requester caller. Source-free routes still reject the source header. Source authentication refusal on a single current-source task or request, and an unknown task or request id, use the same not-found response body as an absent or concealed row; normal header and primary admission and collection-wide failures retain their own classes. Response timing is not equalised, and an authenticated caller who knows a task or request id can still tell an existing target from a missing one through refusals that run before row access, such as request-shape checks on a target that admission let through. For a submitted-context target this needs no valid source credential: a staff caller who sends a well-formed but worthless source token can tell an existing submitted-context target (the handler’s own answer) from a missing or current-source one (not found), so the target’s context mode is observable to an authenticated staff caller. This is accepted: the caller is authenticated staff, ids are random UUIDs, and the response reveals the context mode only. Only the source bearer is forwarded, never the Casework or unattended status credential. Credentials are redacted, zeroised and dropped with the request, with no cross-call cache or durable recovery capture. This is two independently authorised credentials for one existing human, not delegation, authority transfer or a grant union (separate source credential).

A deployment must do the following. The residuals refer to these obligations by number.

  1. Use a fresh Casework database on PostgreSQL 17 or newer. Casework does not upgrade a retired schema in place, and its activation boundary refuses an older server.
  2. Run split roles: a distinct migration role for caseworkctl apply and a runtime role for the service. In single-role mode the runtime logs that the ledger check catches a wrong package but not someone holding the credential.
  3. Hold the migration credential as the authority to activate packages. Pin package.expectedDigest and keep operator references for each apply.
  4. Protect the runtime credential as write access to Casework state (see CASEWORK-RES-02 and CASEWORK-RES-03).
  5. When an officer’s source access is withdrawn, revoke their live task grants or remove their Casework eligibility. Keep deferred lifetimes no longer than the work needs.
  6. Make completion receivers idempotent on the Idempotency-Key header (the eventId), and fall back to GET /v1/review-results when a wake-up is missed. See Receive Casework completion wakes.
  7. Treat reviewer-written public reasons as released text (CASEWORK-RES-06).
  8. Use an HTTPS issuer and leave authentication.oidc.allowInsecureHttp unset. Declare only issuer and JWKS addresses you intend Casework to reach (CASEWORK-RES-08).
  9. When a signing key is compromised or retiring, list its kid in authentication.oidc.revokedKeyIds, and list the kid of any republished copy of that key too. Restart every instance, because the list is read at startup. Revoke the key at the issuer and at every other relying party (CASEWORK-RES-09).
  10. Issue every person’s tokens with the same principal claim. Casework trusts one issuer and refuses a casework.yaml whose reviewer, initiator and requester access profiles name different principalClaim values, because one person would then appear as two principals and separation-of-duties and one-seat checks would compare the wrong identities (CASEWORK-SEC-16). Producer profiles, which are services, share one claim among themselves.

Each residual lists the condition, the consequence, the mitigation, and the related matrix identifiers.

  • Condition: a package activation carries no signature.
  • Consequence: anyone holding the migration credential can activate any package that verifies; the ledger and audit trail record it afterward.
  • Mitigation: restrict and rotate the migration credential; pin the expected package digest; review the ledger with caseworkctl status.
  • Related: CASEWORK-SEC-23, CASEWORK-SEC-24.

CASEWORK-RES-02: single-role mode does not protect the ledger

Section titled “CASEWORK-RES-02: single-role mode does not protect the ledger”
  • Condition: one database role serves both apply and runtime.
  • Consequence: the runtime credential can rewrite the activation ledger.
  • Mitigation: use split roles (obligation 2).
  • Related: CASEWORK-SEC-23.

CASEWORK-RES-03: task-template state is writable by the runtime role

Section titled “CASEWORK-RES-03: task-template state is writable by the runtime role”
  • Condition: in split mode the runtime role keeps SELECT, INSERT, UPDATE, DELETE on casework_task_templates; only the two ledgers are read-only to it.
  • Consequence: a runtime credential holder can activate or retire a task template without caseworkctl apply, a ledger row or an activation audit entry. Split mode protects the ledgers and the schema, not that state.
  • Mitigation: treat the runtime credential as privileged; compare stored templates with the package at each plan.
  • Related: CASEWORK-SEC-23, CASEWORK-SEC-18, CASEWORK-SEC-27.

CASEWORK-RES-04: deferred grants rely on approval-time source access

Section titled “CASEWORK-RES-04: deferred grants rely on approval-time source access”
  • Condition: the approver’s own source access is observed only at approval, with that officer’s ephemeral credential. Later observations read the source through the service reader and recheck Casework eligibility, Proposal identity and subject facts.
  • Consequence: a source-side withdrawal of the officer’s access alone does not end a grant before its deadline, which is at most seven days for a deferred grant (900 seconds for an immediate one). Repeating the read would need Casework to retain a credential it must not keep.
  • Mitigation: revoke the grant or remove Casework eligibility (obligation 5); keep deferred lifetimes short. Source access after approval describes the observation.
  • Related: CASEWORK-SEC-18, CASEWORK-SEC-27, CASEWORK-SEC-33.

CASEWORK-RES-05: no transaction spans grant status and resource commit

Section titled “CASEWORK-RES-05: no transaction spans grant status and resource commit”
  • Condition: scheduling observes grant status, then the resource server commits its own mutation; there is no distributed transaction between them.
  • Consequence: a temporary status or source failure refuses the current attempt, and review membership is checked only when observed. A withdrawal that is reversed before the next observation is not seen.
  • Mitigation: revoke explicitly when a withdrawal must stay effective after eligibility is restored. Resource servers keep their own duplicate and business limits.
  • Related: CASEWORK-SEC-18.

CASEWORK-RES-06: public reasons are free text

Section titled “CASEWORK-RES-06: public reasons are free text”
  • Condition: publicReason is reviewer-written text released to the producer. Casework bounds its size and rejects blank or control-character text but cannot judge content.
  • Consequence: approvers who agree on an outcome may write different public reasons; only the one from the approval meeting the stage threshold is released. The producer decides how long it retains the text.
  • Mitigation: train reviewers on what a public reason may contain; choose none for outcomes that need no explanation.
  • Related: CASEWORK-SEC-31.

CASEWORK-RES-07: completion delivery is at-least-once

Section titled “CASEWORK-RES-07: completion delivery is at-least-once”
  • Condition: a send whose response is lost is retried under the same Idempotency-Key; an attempt interrupted by a crash or restart counts as a failed attempt, so an interrupted final attempt ends dead-lettered and is not retried. One worker serves each runtime process with a one-second idle poll.
  • Consequence: a producer that ignores the key may see a wake-up twice, and a dead-lettered wake-up is never delivered. A settled review’s wake-up can wait up to the poll interval after its retry time.
  • Mitigation: deduplicate on the key and recover through the result feed (obligation 6), as at-least-once delivery describes.
  • Related: CASEWORK-SEC-08.

CASEWORK-RES-08: declared issuer and key endpoints are trusted

Section titled “CASEWORK-RES-08: declared issuer and key endpoints are trusted”
  • Condition: the runtime file names an issuer or a JWKS URI, or sets authentication.oidc.allowInsecureHttp: true.
  • Consequence: Casework trusts a declared issuer or JWKS URI on the operator’s word. Under allowInsecureHttp: true, an attacker on the network path to the issuer can substitute keys and mint tokens Casework accepts. Startup logs a fixed warning when the setting is on. The residual is shared across products and set out in Token issuer and key endpoints.
  • Mitigation: use an HTTPS issuer; leave allowInsecureHttp unset; or pin keys with a static jwksSource (issuer network rules).
  • Related: CASEWORK-SEC-01.

CASEWORK-RES-09: key refusal is by kid, locally, at startup

Section titled “CASEWORK-RES-09: key refusal is by kid, locally, at startup”
  • Condition: authentication.oidc.revokedKeyIds lists a compromised or retiring key, or maximumTokenLifetimeSeconds is set.
  • Consequence: refusal matches the kid the issuer assigns, so a compromised key republished under another kid is accepted until that kid is listed too. The list refuses keys in Casework only and revokes nothing at the issuer, so every other relying party must be changed separately. The list is runtime configuration read at startup, so a running process keeps authorising a listed key until it restarts. The lifetime bound compares the token’s own exp and iat, so it limits the lifetime the issuer declared, not how long ago the token was minted.
  • Mitigation: obligation 9: list every kid, restart, and revoke at the issuer (revoked keys and token lifetime).
  • Related: CASEWORK-SEC-01.

CASEWORK-RES-10: an empty inbox without a source profile discloses one bit

Section titled “CASEWORK-RES-10: an empty inbox without a source profile discloses one bit”
  • Condition: a caller lists review tasks without the Registry-Source-Profile header, and the page would be empty with no continuation because at least one candidate was skipped only for the missing header.
  • Consequence: the caller receives source-profile.required instead of an empty page, which tells it that its queues hold at least one source-backed candidate. The problem body names no task, request, subject, count, queue or source. A page that lists anything, or an empty page cut short by its source-read budget, candidate scan or deadline, is unchanged.
  • Mitigation: none needed; the candidates are already limited to the caller’s current membership and served queues.
  • Related: CASEWORK-SEC-03.

Report a suspected vulnerability through the process in Report a vulnerability.