Released docs. You are viewing the documentation published with v0.48.0. Development docs are available at Latest.
This page states what the Base Registry Engine (BReg) security invariants assume, what you must do
for them to hold, and which limits a deployment accepts.
The operator obligations are numbered 1 to 22, and each accepted residual risk carries a stable
identifier from BREG-RES-01 to BREG-RES-27.
The invariants themselves, each with its threat, enforcement point, refusal, and negative test, are
the rows of the machine-checked BReg security invariant matrix in the registry-stack repository.
This page does not repeat those rows; it names them by identifier (BREG-SEC-NN).
Deployment steps are in Deploy and serve.
Scope and trust boundaries
Section titled “Scope and trust boundaries”BReg is trusted to keep a registry’s Records inside the row boundary of the caller’s access profile, to refuse rather than guess, and to leave an audit trace of what it released. It is not trusted to defend against the parties in this table, who hold more authority than the product can take back.
| Party | Trusted for | Not defended against |
|---|---|---|
| Holder of the migration credential | Applying a reviewed package and running operator commands (bregctl apply, adopt, hook discard, erasure). | Applying any valid successor of the active package. Packages are unsigned (BREG-SEC-02). |
| Holder of the runtime credential | Serving reads and writes through the generated row-level security policies. | In split-role mode, nothing beyond what the grants allow (BREG-SEC-04, BREG-SEC-118, BREG-SEC-119); the grants include reading any row by setting the transaction context the policies read (see Read boundary). In single-role mode, rewriting the activation ledger. |
| Database superuser | Nothing is withheld from a superuser. | Editing the ledger, the instance claim, or any row. The activation audit stream is the independent trace. |
| Operator who writes the runtime file | Naming the issuer, JWKS source, listeners, secret references, and destinations. | Naming a private-network issuer or an HTTP issuer when allowInsecureHttp is set. |
| Token issuer | Authenticating callers and signing the claims the access profiles map to authority. | An issuer that signs wrong claims. BReg verifies signature, issuer, audience, and lifetime; it does not second-guess the claims. |
| Review, evidence, and function providers | Their own decisions, within the exact bindings BReg freezes. | A provider that decides wrongly. BReg binds the result to the frozen request but does not judge it (BREG-SEC-34). |
| Host users who can write audit files | Nothing. | Rewriting or removing lines of a local audit file. Ship the stream to append-only storage (obligation 2). |
| Package authors | Authoring the project under review. | A reviewed package that is wrong. Deployment-only values (environment, instance, database) are refused in a package, so the same bytes are promoted unchanged (BREG-SEC-01). |
| BReg’s in-process refresh worker | Running each configured refresh plan as that plan’s service principal, inside the worker profile’s root List boundary, its pinned row claims, and its refreshExternalProjections grant (BREG-SEC-204). | A plan that names a wider identity than intended. The worker presents no token from the issuer, so revoking that identity at the identity provider does not stop it. Removing the plan from the runtime file and restarting does. |
No runtime API edits access profiles, Record types, or webhook destinations. A running process reloads no package and no runtime file. Of its own settings, it refetches only the token issuer’s signing keys. An access profile or a Record type changes through a new package applied under the migration credential. A webhook destination’s endpoint and secret change in the runtime file and apply at restart.
In-process refresh worker
Section titled “In-process refresh worker”Indexed external views are refreshed by a worker inside BReg, not by an outside client.
This moves a trust boundary: the operator who writes the runtime file now chooses the identity
each refresh plan acts as (externalRefresh.plans.<id>.worker), and BReg builds that caller’s
claims itself, as it does for record timers.
The worker acts with the profile’s required scopes and purposes, the configured principal, and
the pinned row claims.
bregctl check refuses a profile that lacks root List or refreshExternalProjections, declares
requireConsent, does not admit the requester client, or leaves a row-boundary claim unpinned.
It also refuses a plan whose configured identity the profile would refuse on a request, such as
two values pinned for an equals boundary or a principal over 512 bytes, as
breg.external-refresh.worker-not-admitted.
At startup such a plan is logged and skipped while other plans run.
A configuration change, not an identity-provider revoke, stops the worker.
Each attempt and terminal settlement is audited as external-refresh-plan-step, and the terminal
entry carries the same pseudonymous principal and record references as its attempt.
Supply chain
Section titled “Supply chain”Packages are verified by the SHA-256 of SHA256SUMS, with every listed file re-hashed before the
digest is trusted.
No signature or trust anchor is consulted.
The Wasmtime build that runs WASM hook handlers is pinned and built without its default features.
No automated check pins that feature set, so a change that unifies a default feature back on is
not caught by CI.
Applicant review progress
Section titled “Applicant review progress”A current caller-owned status grant can opt in to a provider-authored code (BREG-SEC-208).
BReg authorises and audits the read before using the configured Review producer credential for a
single bounded lookup.
It compares the whole accepted review binding, then rechecks Proposal visibility and the live
round before the response audit and release.
Failure to observe the exact round yields the authorised local status with progress omitted.
A code is display data.
It grants no approval or application authority.
Read boundary
Section titled “Read boundary”Row-level security on the Record tables is the single read boundary, and
FORCE ROW LEVEL SECURITY is on for every one.
Record source views are created security_invoker=true and deliberately without
security_barrier, so a list page can be served from an index.
That does not let a row the caller cannot read reach a predicate: PostgreSQL applies a table’s
policies as security conditions before any predicate that is not leakproof, whether or not a view
over the table is a barrier, and every read policy carries record_lifecycle = 'active' itself.
The runtime also sends only SQL the engine generates (BREG-SEC-143).
An executed proof reads the view through a non-leakproof predicate that raises on a hidden Record
and shows it is never shown one.
The view options are part of the managed schema fingerprint, so a database that regains
security_barrier or loses security_invoker is drift and startup refuses it.
Derived views and the spatial candidate view keep their barrier.
The generated policies defend against application mistakes and pooled-context leakage.
They do not constrain a party holding the runtime database credential, which can set the same
transaction context the policies read; that credential’s custody and rotation are operator controls.
See BREG-RES-16 for what remains.
A --require-value rule in a generated Evidence source runs in the Evidence adapter, after BReg
has returned the Record.
It is not a BReg authorisation boundary.
The access profile’s row boundary is the only place BReg withholds a Record from the Evidence
workload.
An Evidence caller receives the same answer for a Record the rule refuses and a Record that does
not exist.
Only the Evidence audit record of a single request and the evidence_source_lookups_total metric
record the difference (no-match versus unresolved).
An operator, or anyone who reads that audit, can tell from it that a refused Record exists.
A request batch audits both items as not available, and the metric still counts them apart.
Disclosure conditions
Section titled “Disclosure conditions”A disclosure condition withholds a Record, its history, or named fields from every access profile it
does not exempt, while the Record’s current values match the condition.
A record condition is a restrictive row-level security policy on the Record table.
It binds every query under a bound profile, read paths, lookups and counts included, so a hidden row
never reaches a filter, a sort, or a count.
A history condition is applied in Rust to revisions and snapshots, which answer as not found.
A fields condition is applied in Rust after the SQL query.
Reads, revisions, and Proposal review show each named member as null, and a write response never
carries it.
Filtering and sorting run in SQL before that step.
bregctl check therefore refuses each surface that would let a bound profile filter, sort, look up,
export, count, project, or derive from a withheld field (breg.disclosure.*), read path grants
included.
It also refuses a record condition on a consent Record type that a requireConsent names.
The consent check reads that type under the gated profile, so a hidden revocation would let an
earlier consent stand.
Writes are checked in Rust against the writing profile.
A bound profile cannot lift a mark, write a withheld field, or tombstone a marked Record, and a write
whose result a record condition would hide from the writer is refused.
exemptProfiles is the only authority over a condition.
An exempt profile reads and writes as if the condition did not exist, and only an exempt profile can
lift it.
The record timer runs under the reserved system-record-timer profile, which every condition
exempts.
The compiler therefore refuses a timer that reads a withheld field.
On a Record type with a record condition, it also refuses a timer that creates a Record a bound
profile can read.
An automatic Proposal is checked against the profile that submitted its version, but it reads and
writes under system-proposal-apply, which no condition can exempt.
A profile with requireAccessReason must send a Registry-Access-Reason header on each Record read
and direct write.
BReg refuses a missing or invalid header with 400 request.access_reason_required before any Record
is read, and stores the reason on the subject access log entry of a Record type with accessLog.
The compiler refuses the key on a profile that grants an operation that does not check the header.
BReg writes no subject-log entry for a Proposal attachment download or a Proposal review read, even
when the review shows fields of a Record type with accessLog.
Those reads are recorded only in BReg’s audit records.
See obligation 22 and BREG-RES-27 for what remains.
Operator obligations
Section titled “Operator obligations”For the invariants to hold, a deployment must do the following. The residuals refer to these obligations by number.
-
Run split database roles in production.
bregctl initwrites a split runtime file. Startup refuses a runtime role that is a superuser, hasBYPASSRLS,CREATEDB,CREATEROLE, or databaseCREATE, owns any registry object, or is a member of the migration role. It also refuses one that holdsCREATEon a registry schema,TRIGGERon a registry table, or write access to the activation ledger or registry state. One of those privileges, ownership, superuser, or migration-role membership is answered with a pointer tobregctl apply --package DIR, which names the object and the fix. The other refusals (BYPASSRLS,CREATEDB,CREATEROLE, databaseCREATE) answer only that the database is not ready for this package, so check those role attributes first when startup refuses. Single-role mode (used byrstack devand the quickstarts) catches mistakes, not a holder of the credential (BREG-RES-02). -
Ship audit to append-only storage. The audit stream is not tamper-evident on the host. Ship the
fileorstdoutstream, including the activation audit stream, to storage the host users cannot rewrite. A mutation appends its response entry after the commit, so a crash in between leaves a request entry without its response. Revision history still records the change. BReg’s retention is the platform audit writer’s rotation andretentionDays; BReg adds no prune or export of its own. -
Treat a restore as a security event. A restore rewinds every row, including erasures, deliveries, and closed import authorities. After a physical restore, run
bregctl instance-claim adoptbefore the copy serves, and fence the original first. After any restore, re-run the erasures and discards done since the backup, reopen only the import authorities you still need, and resume held timers with an audited timer-operator resume. A logical restore is refused at startup until adopted. Where the role cannot read the cluster identity, BReg compares the database oid alone, and a copy restored into a fresh cluster can pass that weaker check.adopt --acknowledge-original-retiredraises the claim epoch, supersedes every open import authority, and moves native Record timers into adoption hold in one transaction. Back up, restore, and drill recovery gives the steps. -
Pin the digest you reviewed. Pass
--expected-digesttobregctl applyandplan, and setpackage.expectedDigestin the runtime file. Without the flag, apply activates whichever verified package--packagenames. The digest binds bytes, not authorship; check provenance of cross-organization packages (for example a cosign signature) in the deploy step. -
Rehearse on a restored copy. The migration rehearsal runs over empty tables and does not compare the PostgreSQL major version. A timeout that only real rows reach is found by your own rehearsal and by
apply. A destructive reviewed migration needs backup evidence at most 31 days old. -
Choose the production identity. Set
canonicalBaseIrito a hostname you control before packaging. Only the reserved.invalidnamespace is refused. -
Use TLS to PostgreSQL and an HTTPS issuer.
database.testOnlyPlaintextis refused unless BReg was built with its test-only PostgreSQL feature. Loopback HTTP is accepted for an issuer; anything else needsauthentication.oidc.allowInsecureHttp: true, which is logged at startup and reported bybregctl doctor(BREG-RES-17). -
Keep the metrics listener private.
metricsListener.bindmust be a loopback or private address; it carries no authentication. A wildcard bind needs an explicitmetricsListener.networkExposure: container-private, and the metrics port must not be published. -
Run the idempotency sweep.
bregctl idempotency-retention erase-expiredis the only thing that clears raw caller and key values from spent rows; the engine schedules nothing. Resolve uncertain writes and finish or cancel open ingestion runs before changingauthentication.oidc.issueror the principal claim (BREG-RES-05). -
Provision the identities your profiles name. The activation guard checks the compiled permission shape. It does not prove that a real identity satisfies a profile’s claims and row bounds. A Proposal grant without
writableInputsleaves every declared Action input writable; name the inputs on every grant that is not meant to set all of them. A Proposal grant’sownership: callerrestricts which Proposal documents the caller may touch, not the target Records, which stay bounded by the grant’srowBoundaries. EnablereadableReviewProgressonly on the applicant grants intended to receive it. Choose public stage codes at the review provider with the applicant audience in mind. A change in code presence can reveal a transition, so assign the same coarse code across stages whose distinction you mean to keep private. Configure Proposals shows the grant settings. -
Keep delegated agent review context disabled until the institution has approved the reviewer population and source ceiling for the standing-agent profile that holds
get-review-context. -
Review statistical releases as a disclosure decision. Review the population, dimensions, cadence, and release policy of every dataset (
BREG-RES-07). For an exact release, classifying a Record type or fieldpublicis itself a disclosure decision (BREG-RES-24). Grantread-exactonly to a named service under a data-sharing agreement. Review a change to the dataset’sexactReadsprofile the same way (BREG-RES-25). Review the sum rules and their residuals before a dataset releases a sum (BREG-RES-26). Publish a statistical series lists what a release discloses. -
Plan backups for retention. Expiry sweeps for Evidence and terminal webhook metadata are bounded work, not immediate erasure. Backup retention is yours.
-
Handle destructive recovery deliberately.
bregctl hook discardpermanently closes one delivery and is not audited when refused before the request is recorded.bregctl hook drainruns reviewed handlers in thebregctlprocess and needs the destination and audit secrets, handler assets, and any field-encryption keys. Retained local hook work (pending, leased, or operator-replayable dead-lettered Rhai and Wasm deliveries with unexpired payloads) blocks bothbregctl planandbregctl applyuntil a drain settles it. If catalog verification refuses a policy whose expression was altered but whose comment matches, a database administrator clears that policy’s comment and applies the exact target package again. -
Upgrade one release at a time, finishing each release’s upgrade steps before the next.
-
Resume a blocked application deliberately.
bregctl review-recovery retry-applicationrequeues only an application job that is blocked with attempts left and a last error ofdependency-outage,source-unavailable, orlease-expired, for the current submitted Proposal. Run it after the cause is fixed; it refuses a withdrawn, unsubmitted, or detail-erased Proposal and one blocked aspackage-changedorapplication-refused. -
Grant write access to a link’s
fromFieldonly to identities trusted to assert that link. Whoever can set that field on a root chooses the outside subject BReg asks the source for, under the deployment’s source grant, and which subject’s values readers of that root then see. Review a change to it as you would review a disclosure. See Operate indexed external projections. -
Keep the external projection cache out of logical backups, and own its physical copies. Dump with
--exclude-table-data='registry_internal.registry_external_*', which covers the four projection store tables and the two refresh queue tables, so a restore starts with no source values, old bindings, or queued selectors. The cache tables are logged, so physical backups, storage snapshots, WAL archives, and streaming replicas carry cached source values and cannot exclude them. Keep those copies no longer than the source grant permits storage, or erase them under a separately approved procedure. Before a physical restore or a replica promotion serves under changed source authority, runbregctl external-projection purgefor each affected projection (back up logically, physical copies). -
Withdraw a source grant in deployment configuration. Remove the binding and its refresh plans and restart; that is the only cutoff for acquisition.
bregctl external-projection purgeerases retained values and refresh receipts but does not stop acquisition, and a binding that stays configured acquires again at the next start. Record the withdrawal in deployment configuration or at the source authority so it also holds after a restore (stop acquisition). -
Give each refresh plan a scoped service identity. The plan’s worker acts as its configured principal under its access profile, with no token, so grant that profile root List and
refreshExternalProjectionsonly for the projections and rows the plan must keep current. The worker refreshes a root only inside its own row boundary, so pin row claims that cover every root a profile granted one-root refresh can reach. A root outside the worker’s boundary is not refreshed. Approve each outside field inallowedFieldsof the deployment binding; a package that adds a projection field leaves the projection unavailable until you do. Give a change notifier a separate service client and scope. It may submit an approved selector for a configured projection. A queued source change grants no right to read a root or disclose a source value. Verify signed webhook deliveries before forwarding their selectors. One-root refresh is for a staff application’s service client: the compiler refusesrefreshExternalProjectionson any profile that is not a service profile with explicit clients, scopes and purposes (refresh-service-profile). Grant it only to the service profile of an application whose users may ask for a root to be refreshed. Each admitted request is audited asexternal-projection-refresh, with a refused terminal entry when no plan refreshes the link or its projection has no source binding. See refresh plans. The refresh path extendsBREG-SEC-204toBREG-SEC-207. Its proofs cover worker and notifier separation, identical admission for an eligible and a protected selector, current-scope reconciliation, and row policy before a targeted lookup can settle no match. The plan lease is the only worker serialiser; work rows carry no lease of their own. The queue proofs check that settlement fences on the plan lease and the work row’s enqueue generation, so a newer capture wins over the one a worker holds, and that an authority change fences queued work, beside the per-key publication proofs. Admission counts pending work against a soft per-plan limit: concurrent captures can overshoot it by at most each writer’s own batch. A restore from a backup that excluded the projection tables also starts with empty refresh queue tables. -
Issue task-grant tokens for at most 900 seconds. BReg refuses a token that carries a task grant without
iat, withexp - iatover 900 seconds, or withiatlater than its clock plusleewayMilliseconds, whatevermaximumTokenLifetimeSecondsallows other tokens (BREG-SEC-209). Keep the exchange issuer’s task-token lifetime at or under that bound and its clock within the leeway; Casework’s exchange step documents 300 seconds (Casework task grants). -
Treat each disclosure condition’s
exemptProfilesas a disclosure decision. Exempt only the profiles that may see the protected subjects. Exempt the profile that sets arecordmark too, or BReg refuses its write. When a Proposal must change a Record that arecordcondition matches, apply it by hand under an exempt profile or use an immediate Action, because an automatic application cannot. SetaccessLogandrequireAccessReasonwhere reads of protected subjects must be explained, and review each acceptedbreg.disclosure.*finding as a disclosure decision. If data subjects must see Proposal review reads and attachment downloads, cover them in your own audit, because they write no subject-log entry.
Accepted residuals
Section titled “Accepted residuals”The residuals are ordered by operator impact. Each lists the condition, the consequence, the mitigation, and the related matrix identifiers.
BREG-RES-01: physical copies are not detected (instance claim)
Section titled “BREG-RES-01: physical copies are not detected (instance claim)”- Condition: the database is restored by point-in-time recovery, a storage snapshot, a base backup, or a promoted replica.
- Consequence: these keep the system identifier and database oid, so the copy matches the claim and serves without adoption. A physical restore serves without the adopt that supersedes reopened authorities, so an import authority closed after the backup point is open again. Nothing enforces the adopt. Where the system identifier is unreadable (a managed service), the claim compares the database oid alone, which is weaker.
- Mitigation: fence the original, run
bregctl instance-claim adopton the copy before it serves (obligation 3). - Related:
BREG-SEC-114,BREG-SEC-115,BREG-SEC-116,BREG-SEC-117.
BREG-RES-02: single-role mode does not separate the credentials
Section titled “BREG-RES-02: single-role mode does not separate the credentials”- Condition:
database.roles.migrationequalsdatabase.roles.runtime. - Consequence: a holder of the runtime credential can write the ledger and change which package the
runtime serves.
bregctl doctorand the startup log (startup.role_mode.single) say so. - Mitigation: run split roles in production.
- Related:
BREG-SEC-04,BREG-SEC-118,BREG-SEC-119.
BREG-RES-03: the migration credential authorises any valid successor
Section titled “BREG-RES-03: the migration credential authorises any valid successor”- Condition: a holder of the migration credential applies a package whose
migrationPlan.fromPackageDigestnames the active digest. - Consequence: review is a process step before apply, not a cryptographic gate. A database restored to an earlier activation names that activation’s package as active, so the successor applied after it applies again; it is the same transition.
- Mitigation: guard the migration credential, pin
--expected-digest, and check release provenance in the deploy step. - Related:
BREG-SEC-02,BREG-SEC-120,BREG-SEC-121.
BREG-RES-04: a database superuser can edit the ledger
Section titled “BREG-RES-04: a database superuser can edit the ledger”- Condition: anyone with superuser on the database.
- Consequence: the ledger, the instance claim, and any row can be changed. This is not prevented.
- Mitigation: the activation audit stream, shipped to append-only storage, is the independent trace.
- Related:
BREG-SEC-04,BREG-SEC-120.
BREG-RES-05: idempotency keys and run ownership are scoped to issuer and principal
Section titled “BREG-RES-05: idempotency keys and run ownership are scoped to issuer and principal”- Condition:
authentication.oidc.issueror the principal claim changes; an operator never runs the sweep; a first response is lost and the retry arrives past the receipt horizon (seven days by default). - Consequence: after a mapping change, a retry is another caller’s fresh request and an open ingestion run belongs to no current caller. Spent rows are never deleted: the digest row is kept for provenance, and its raw issuer, principal, and key stay until the sweep clears them. A late retry cannot recover a lost body and must read the Record or its history. Ingestion run creator values stay as long as the run row; there is no run retention.
- Mitigation: resolve uncertain writes and finish or cancel runs before a mapping change; run
erase-expiredon a schedule. - Related:
BREG-SEC-12,BREG-SEC-162toBREG-SEC-167.
BREG-RES-06: import authorities bound volume, not content
Section titled “BREG-RES-06: import authorities bound volume, not content”- Condition: a holder of an import grant runs an import.
- Consequence: the input digest is computed and announced by the client; the server never receives
the file and does not recompute it, so a pinned digest names what the operator expects, not what
was sent.
Admission reserves no volume and import is create only, so re-running committed lines creates
their Records again.
The runtime role can lower
committed_items(its column grant checks volume bounds, not monotonic growth), which is treated as equivalent to its existingINSERTpower over Records.--operator-referenceand--reasonare argv values visible on the local host while the command runs. - Mitigation: grant import narrowly; follow Move data in bulk for duplicates; treat the runtime credential as able to write Records.
- Related:
BREG-SEC-116.
BREG-RES-07: statistical datasets give no confidentiality guarantee
Section titled “BREG-RES-07: statistical datasets give no confidentiality guarantee”- Condition: a dataset is released under
minimum-count-and-rounding. - Consequence: independent suppression and rounding do not prevent reconstruction.
With
minimumCount5 androundingBase5, two suppressed positive cells and a rounded total of 10 force both cells to 4; seven suppressed cells and a rounded total of 5 force all seven to 1. Zero cells disclose group attributes. Deterministic rounding supports differencing across releases, overlapping datasets and external knowledge amplify disclosure, and no privacy budget limits repeated observation. Withdrawal erases the engine’s stored content, not copies a reader already obtained; release headers and withdrawal reasons remain. - Mitigation: institutions review population, dimensions, cadence, and release policy. Cell key perturbation is not implemented.
- Related:
BREG-SEC-150toBREG-SEC-160.
BREG-RES-08: the instance id is not durably bound
Section titled “BREG-RES-08: the instance id is not durably bound”- Condition:
identity.instanceIdis changed. - Consequence: the id derives the webhook event source. Startup refuses the change while any pending or leased delivery with an unexpired payload names another source, but the registry state holds no binding of the id once deliveries drain.
- Mitigation: keep the previous id until deliveries drain, then change it.
- Related: none; startup refuses the change while deliveries are pending.
BREG-RES-09: review close and resubmission rely on the authority
Section titled “BREG-RES-09: review close and resubmission rely on the authority”- Condition: an operator closes or resubmits a review.
- Consequence:
closesends nothing to the authority, so a reviewer there may still decide, and that late result is refused;operator-closedis resubmittable. Resubmission relies on the authority’s idempotency: if it no longer honours the original key, resubmitting opens a second review. - Mitigation: confirm the authority lost the review before resubmitting.
- Related:
BREG-SEC-34,BREG-SEC-67.
BREG-RES-10: ID-only review policy selection trusts the provider until first acceptance
Section titled “BREG-RES-10: ID-only review policy selection trusts the provider until first acceptance”- Condition: a Proposal selects a review policy by id alone.
- Consequence: the trusted provider may change its policy, including between human review and automatic assessment, while first acceptance is pending. After acceptance the exact binding is preserved and a replacement is refused. Each submission starts with no accepted binding, so a new submission after changes are requested selects the provider’s current policy again unless it is pinned.
- Mitigation: pin both
versionanddigestwhen the version chosen at submission must be the one that decides. A partial pin is invalid. The window for resolving a pending first acceptance is the review authority’srecoveryDays, which has no default (1 to 3650 days). - Related:
BREG-SEC-34.
BREG-RES-11: a source can revoke between status observation and commit
Section titled “BREG-RES-11: a source can revoke between status observation and commit”- Condition: a Proposal is applied under retained task authority.
- Consequence: BReg observes the source’s status outside the mutation transaction and shares no distributed transaction with it, so a revocation after the observation and before local commit is not seen. Local expiry and submission-binding checks stay enforced.
- Mitigation: none beyond the source’s own revocation latency.
- Related:
BREG-SEC-169.
BREG-RES-12: disclosed Proposal text and actor pseudonyms
Section titled “BREG-RES-12: disclosed Proposal text and actor pseudonyms”- Condition: a reviewer writes a public reason; a holder reads
appliedBy. - Consequence: BReg bounds the public reason’s length but cannot judge its content, so personal
data written there reaches every Get holder.
appliedByis a keyed pseudonym, not anonymous: a holder can link Proposals applied by the same actor within that database and issuer, and a holder of the audit hash key can recompute it for a known issuer and subject. - Mitigation: instruct reviewers; grant
get-application-actornarrowly; protect the audit hash key. - Related:
BREG-SEC-58,BREG-SEC-174,BREG-SEC-179.
BREG-RES-13: advisory answers are not authority
Section titled “BREG-RES-13: advisory answers are not authority”- Condition: an application, reviewer, or operator relies on a preview.
- Consequence: an Action availability result can be stale as soon as it is returned and covers
only the target’s declared field guards.
Access explanations are review aids; runtime admission is authoritative.
The same-engine fingerprint comparison when rehearsing over a predecessor does not stop
test; the strict final check still catches any effect on the candidate. The deployment identity check guards against accident, not against an operator who means to bypass it: a database initialised forlocalaccepts the reserved identity. - Mitigation: treat availability as a form hint and handle Invoke refusal.
- Related:
BREG-SEC-186.
BREG-RES-14: a global unique constraint reveals that a value is taken
Section titled “BREG-RES-14: a global unique constraint reveals that a value is taken”- Condition: an in-boundary create collides with a hidden row’s unique value.
- Consequence: the value-free
409 mutation.conflicttells the caller the value is taken somewhere. Nothing is written outside the boundary. - Mitigation: avoid unique constraints on values whose existence is itself sensitive, or scope them in the model.
- Related:
BREG-SEC-09,BREG-SEC-180.
BREG-RES-15: generated identifier reservations are never erased
Section titled “BREG-RES-15: generated identifier reservations are never erased”- Condition: a Record with a generated business identifier is tombstoned or erased.
- Consequence: the append-only ledger
registry_generated_identifier_reservationskeeps each issued value and its scope values, so a code is never reissued. The compiler limits generated and scope fields to public or internal values, so the ledger holds a category code beside an institution-issued number, not restricted data. - Mitigation: do not scope generated codes by sensitive data.
- Related:
BREG-SEC-189.
BREG-RES-16: source views rely on PostgreSQL policy ordering
Section titled “BREG-RES-16: source views rely on PostgreSQL policy ordering”- Condition: a read policy admits a row that is not active (tombstoned or detail-erased), which
the source view’s lifecycle condition then drops. Every generated read policy carries
record_lifecycle = 'active', so only a policy written to admit non-active rows meets this condition. - Consequence: that row may reach an outside predicate before the view’s lifecycle condition drops
it, for a caller already allowed to get it, and it is absent from every result.
The ordering of policy conditions before other predicates is PostgreSQL behaviour the engine
relies on and does not enforce itself; the executed proof would fail on a server that broke it.
A read policy written to admit more than
record_lifecycle = 'active'widens what can reach a predicate. - Mitigation: run supported PostgreSQL majors; revisit this residual before adding a read policy that admits non-active rows.
- Related:
BREG-SEC-04,BREG-SEC-143.
BREG-RES-17: declared issuer and key endpoints are trusted
Section titled “BREG-RES-17: declared issuer and key endpoints are trusted”- Condition: the runtime file names an issuer or JWKS URI.
- Consequence: BReg 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. The residual is shared across products and set out in Token issuer and key endpoints.breg-reviewnever takes the HTTP opt-in, because it sends client credentials to the token endpoint. - Mitigation: use an HTTPS issuer; leave
allowInsecureHttpoff. - Related:
BREG-SEC-19.
BREG-RES-18: the metrics listener is unauthenticated
Section titled “BREG-RES-18: the metrics listener is unauthenticated”- Condition: a reader reaches
metricsListener.bind. - Consequence: they can read the active package digest, which identifies the deployed bytes and not their content. A scrape holds one runtime pool connection at a time under one 5-second deadline, each read has a server-side statement timeout of the time left, and it takes no row locks.
- Mitigation: the bind is refused unless loopback or private; firewall it.
- Related:
BREG-SEC-146.
BREG-RES-19: a failing worker stops the process, and readiness does not show it
Section titled “BREG-RES-19: a failing worker stops the process, and readiness does not show it”- Condition: a background worker faults, or faults on every start.
- Consequence: the process stops with a code that names the worker.
A fault that recurs on every start makes the process restart repeatedly and takes reads and
writes down between attempts.
/readydoes not reflect worker state, so a load balancer keeps routing until the process exits. The attachment queue is not sampled bybreg_queue_oldest_pending_age_seconds; alert onbreg_worker_last_success_age_secondsinstead. A failed subject access log retention pass writes a raw error record without a closedcode. - Mitigation: alert on the worker metrics and on restarts.
- Related:
BREG-SEC-146.
BREG-RES-20: the attachment job table has no row-level security
Section titled “BREG-RES-20: the attachment job table has no row-level security”- Condition: a holder of the runtime credential changes a job row.
- Consequence: the table holds job keys, states, attempts, and timestamps.
A changed row can cause an extra verifier request or stall a verification.
It cannot release bytes, because a verdict is written only into the admitted verdict row under a
live lease, and a pending row stays quarantined.
One attempt can be answered
unfinishedtwice (by the worker that wrote it and by the worker recovering its lapsed lease), and a recovering verifier may wait up to an hour, jitter included, before a quarantined file is retried. - Mitigation: none needed for integrity; monitor the worker age metric.
- Related:
BREG-SEC-10.
BREG-RES-21: some requests leave no per-subject trace
Section titled “BREG-RES-21: some requests leave no per-subject trace”- Condition: a caller reads a statistical aggregate, or sends a HEAD request.
- Consequence: an aggregate read emits no per-subject access-log hit.
A HEAD request to any route but the health and readiness probes is refused as a concealed 404,
after sign-in is checked; outside
/v1/statistics/that refusal writes no statistics refusal journal entry, and under it only an authenticated caller’s HEAD is journaled. - Mitigation: treat statistical output as released content (
BREG-RES-07); do not rely on the subject access log to show who saw an aggregate. - Related: none.
BREG-RES-22: the standing-agent ceiling needs a declared actor kind
Section titled “BREG-RES-22: the standing-agent ceiling needs a declared actor kind”- Condition: a profile that holds
publishorread-exacton a statistical dataset declares noactorKind, or the dataset’sexactReadsprofile declares none. - Consequence: the ceiling refuses publish, withdraw, and read-exact only for a profile that
declares
actorKind: agentand notaskGrant. It refuses anexactReadsprofile that declaresactorKind: agentor ataskGrant. A profile without anactorKindaccepts every actor kind by its own declaration, as it does for every other operation. So a standing agent token can publish or read exact values through it. A delegated agent token is admitted only by a profile that declaresactorKind: agent. The publisher’s dry run (versions:dry-run) belongs to the publisher alone and stores nothing. It reserves no version, and writes an audit attempt and one terminal entry. - Mitigation: declare
actorKind: humanoractorKind: serviceon every profile that holdspublishorread-exact, and on theexactReadsprofile. - Related:
BREG-SEC-168.
BREG-RES-23: a revoked task grant keeps reading until its token expires
Section titled “BREG-RES-23: a revoked task grant keeps reading until its token expires”- Condition: Casework revokes a task grant, or the task ends, while the agent still holds a token carrying it.
- Consequence: reads under the grant (Records, read paths, revisions, history and statistics) check
no live Casework status, so they continue until the token or the grant deadline passes, whichever
comes first.
A token carrying a grant is issued for at most 900 seconds (
BREG-SEC-209). Governed mutations check live status on every attempt and stop at once. - Mitigation: keep task-grant tokens short at the exchange issuer; Casework refuses new assertions for a revoked grant, so no new token follows.
- Related:
BREG-SEC-209,BREG-SEC-169.
BREG-RES-24: exact releases trust the declared classification
Section titled “BREG-RES-24: exact releases trust the declared classification”- Condition: a dataset is released under
exact-public-values. - Consequence: BReg checks the classification labels, not whether the data is in fact public.
A Record type or field wrongly classified
publicis released exactly, cells of one included. The release is immutable and readers can copy it. Withdrawal erases only the engine’s stored content. BReg trusts a derived relation’s SQL to read only the source Record types it declares. The check is per Record type, not per column. So a derived field classifiedpublicwhose SQL reads a restricted field of a public Record type is released exactly. - Mitigation: review a classification change as a disclosure decision.
Review a derived field’s SQL before you classify it
public. Keepminimum-count-and-roundingfor any register whose membership is not public. - Related:
BREG-SEC-211,BREG-RES-07.
BREG-RES-25: an exact read discloses exact values to its consumer
Section titled “BREG-RES-25: an exact read discloses exact values to its consumer”- Condition: a profile holds
read-exacton a statistical dataset. - Consequence: the consumer receives exact values, cells of one included, over Records it cannot read.
The output is as sensitive as the Records.
BReg cannot control what happens to it after the response.
The
exactReadsprofile’s grants decide what every exact read covers. - Mitigation: grant
read-exactonly to a named service under a data-sharing agreement. The agreement names the legal basis, the purpose, no onward disclosure, and retention. It also names what the consumer may publish from its results, and breach notice. Review a change to theexactReadsprofile as a disclosure decision. Audit entries carry the caller and the period range for your review. - Related:
BREG-SEC-212,BREG-RES-07.
BREG-RES-26: released sums keep inference paths the rules do not close
Section titled “BREG-RES-26: released sums keep inference paths the rules do not close”- Condition: a dataset releases a sum under
minimum-count-and-rounding, with a declaredcontributoranddominancePercent. - Consequence: the contributor count and the p% rule protect contributors from each other inside one
dataset and one version.
A suppressed sum also suppresses the same measure in every total that contains it.
These paths stay open:
- The compiler refuses two protected releases of a sum of the same field over the same unit
(
breg.statistical-dataset.sum-field-released-twice). It does so whatever their dimensions, populations, and granularities, because any two share a total that the totals rule cannot see across datasets. Anexact-public-valuesrelease of the same field still publishes what the protected release withholds. That release needs the field classifiedpublic(BREG-RES-24). - A count withheld by the contributor minimum does not blank its totals.
A reader can estimate it from the rounded total and its rounded siblings, to within about half the
rounding base per cell used.
The contributor minimum protects a count only as far as rounding does (
BREG-RES-07). - Revised versions of the same period can be differenced against each other.
Changing
dominancePercentbetween versions does not start a new series. - The p% rule does not protect against a reader who already knows several contributors’ values.
- A decimal sum is exact, so it sits beside a rounded count of the same cell. A reader learns the exact amount, though not the exact number of contributors.
- A cell of at least
minimumCountcontributors publishes a sum of zero with statusexactin two cases. One is when no contributor has a value for the field. The other is when the field isdecimaland every value is zero. Either tells every reader that no contributor in the cell has a positive value. Anint64sum of zero with statusroundedsays only that the sum is under half the rounding base. A smaller cell is suppressed, whether or not its Records have a value.
- The compiler refuses two protected releases of a sum of the same field over the same unit
(
- Mitigation: release a sum only after a statistician has reviewed the rules and their
implementation.
Until then, the compiler refuses a
publishorread-releasesgrant on such a dataset. Release every sum of a field in one dataset, and keep the revisions of a period few. Use the publisher’s dry run to see which cells and totals will be blank before you publish. Serve values that must stay exact, or that can be negative, throughread-exact. - Related:
BREG-RES-07.
BREG-RES-27: a disclosure condition does not hide every trace
Section titled “BREG-RES-27: a disclosure condition does not hide every trace”- Condition: a disclosure condition binds a profile that reviews, writes, or references the Records it withholds.
- Consequence: the condition hides values, not every effect of their existence.
A Proposal’s reviewers see its inputs, even for a field their own profile would not read.
Their review reads and attachment downloads write no subject-log entry.
A
409 mutation.conflicton a unique value confirms that a hidden Record or a withheld value exists, and a reference write confirms that its target exists. A403 write.outside-boundarytells a bound writer that a condition matches the Record. Ahistorycondition answers the revisions of a readable Record as not found. An automatic Proposal cannot change a Record arecordcondition matches, or set arecordmark, even for an exempt submitter. It endsblockedwith no retry, and the Record is unchanged. A refresh profile arecordcondition binds skips the marked roots, so their external projections are not kept current. Every route that would read a withheld value directly is refused at compile time instead (see Disclosure conditions). - Mitigation: keep withheld fields out of uniqueness constraints, or accept the
breg.disclosure.withheld-field-probefinding only when the profiles that create or patch these Records are trusted. Grant review of protected Record types narrowly. Apply such Proposals by hand under an exempt profile, or use an immediate Action. Exempt the refresh profile, or acceptbreg.disclosure.external-refresh-withheld-rootto leave the marked roots out. - Related:
BREG-RES-12,BREG-RES-14.
Report a vulnerability
Section titled “Report a vulnerability”Report a suspected vulnerability through the process in Report a vulnerability.
Cookies on Registry Stack
We use optional cookies to understand how you use the main Registry Stack website and this documentation. If you contact us, we may link this activity to your enquiry. You can change your choice at any time. Read the privacy policy.
Your browser asks sites not to track you, so optional tracking stays off.
We could not use or save that choice. Optional tracking remains off.