Skip to content

feat: add provisioning, per-check refusal counts and a declared deployment posture - #2798

Draft
jeremi wants to merge 136 commits into
mainfrom
feat/dev-prod-posture
Draft

jeremi wants to merge 136 commits into
mainfrom
feat/dev-prod-posture

Conversation

@jeremi

@jeremi jeremi commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Pull Request

Summary

Draft. Shared platform work across every product runtime and its operator tool:

  • provision in adapterctl, bregctl, caseworkctl, coordinatorctl, documentsctl, messagingctl and schedulingctl: one plan, one report format, a print mode that runs nothing, and refusals for unsafe targets.
  • Every runtime counts each refused request under a closed set of failed checks and writes one bounded, rate-limited log line for it. Answers are unchanged.
  • One loopback definition and one static key set rule, shared by every product.
  • A declared deployment posture (--posture, REGISTRY_STACK_POSTURE) that the shared runtime-file loader reads, with development-only values gated behind it. No runtime adopts the posture yet.
  • Shared /health and /ready bodies, client probe tolerance, and allowedClients: from-package for Messaging and Documents.
  • Acceptance journey tables and a shared token corpus that characterise token admission in every runtime.
  • A docs page, Where authority lives, that states which of the token, the configuration and the records decides who a caller is, what a profile may do and which rows a caller reaches.
  • Release tooling for a held Adapter image and an opt-in arm64 image build.
  • BReg authoring: named row boundary sets, month offsets in date guards, guard labels, immediate Actions that guard the current revision, and bregctl migration draft.

Owning areas: crates/registry-platform-* with each product's runtime, tool, changelog and docs pages.

What changes for an operator

Every item below is checked against the ## Unreleased entry of the product changelog that owns it.

  1. Breaking: an Adapter job whose runtime document names a plain http:// endpoint by host name must list the address range that host resolves to in allowedPrivateCidrs. An omitted or empty list now admits no private address. Before this change it admitted every private address for such a host. Migration: add the smallest range that contains the endpoint, serve the endpoint over https, or bind it on loopback. An affected job now fails check with adapter.runtime.insecure-origin. The served Adapter is not affected.
  2. Breaking, shared crates: a PrivateServiceHttp fixed destination needs at least one private range. It is refused when the destination is frozen, with DestinationPolicyError::PrivateServiceRequiresPrivateCidr. Migration: name the range that holds the service's addresses. ProductionHttps and loopback destinations still take an empty list.
  3. Breaking, Rust callers of the BReg hook verifier: BRegHookDelivery gains a freshness member. Migration: a caller that builds the struct as a literal adds freshness: BRegHookFreshness::default(). The Rust, Node and Python verifiers also refuse a delivery time more than 300 seconds from the receiver clock, with the new code stale-delivery. Set maxSkewSeconds (Python max_skew_seconds, 1 to 3600) for another window, or callerEnforcedFreshness: true (Python caller_enforced_freshness=True) to keep the earlier check that the time is well formed.
  4. Breaking, Rust callers of registry-platform-oidc: StaticJwksError is no longer Copy. Migration: clone it or borrow it where a copy was taken. The stage-labelled log helpers are removed (AuthenticationStage, AuthenticationDiagnostics, OidcError::authentication_stage, TokenVerifier::authentication_diagnostic, log_authentication_refusal!). Migration: use OidcError::failed_check.
  5. Scheduling: a task grant with more than 900 seconds left, when taskGrantStatus is unchecked-final-fifteen-minutes, answers 403 grant.lifetime-too-long in place of operation.not-authorized when it creates a hold or an appointment. A request that names an existing hold or appointment still answers operation.not-authorized, the same answer as for an unknown one, and the refusal counts under task-grant-lifetime. The status is unchanged. An expired grant, a missing grant and a grant that does not cover the offering still answer operation.not-authorized. A client that branches on the problem code gains the new member in SchedulingProblemCode.
  6. Every product runtime counts each refused request in <product>_request_refusals_total{check}. The check label is a closed set of 45 names, every one published at zero from the first scrape. Each refusal writes one request refused log line with failed_check, optional suppressed, optional remedy and optional trace_id, at most five lines per check per minute. The line holds no token, no client identifier and no value from the caller's token. When the failed check is scope, it also names the configured scope claim, the scope the operation requires and, where one applies, the access profile or payment connection (scope_claim, required_scope, access_profile), all taken from the deployment's configuration or package and each cut to 128 bytes. The line replaces the authentication refusal line that carried a stage field. Anyone who alerts on stage= moves to failed_check=, and should alert on the counter because the line is rate limited. Evidence OID4VCI and Evidence OID4VP count in evidence_oid4vci_request_refusals_total and evidence_oid4vp_request_refusals_total. The older coordinator_authentication_refusals_total and messaging_authentication_refusals_total counters stay.
  7. The per-check counter is an operator surface. If you expose a metrics listener to tenants, the difference between ownership and visibility shows whether a target exists. Keep the metrics listener on a private address. The security overview page says so.
  8. Static key sets: one shared rule now applies in every product that loads one. BReg and the BReg MCP gateway load key sets they refused before, because members the rule does not name (x5c, ext and others) and members beside keys are ignored. The other products refuse a key set that holds a repeated member name or a private member on an RSA or EC key. Startup error texts change and now name the rule they broke, and the key's position for a rule about one key, never a key value.
  9. Loopback has one definition. A host is loopback when it is an address in 127.0.0.0/8, ::1 or an IPv4-mapped form of a 127.0.0.0/8 address, or the name localhost in any letter case with the connection pinned to loopback addresses. a.localhost, localhost. and [127.0.0.1] are never loopback. Sites that already accepted a loopback literal now accept the other literal spellings of the same host, for example 127.0.0.2 and [::ffff:127.0.0.1]. No runtime site starts to accept the name localhost, and every development switch stays where it was. In the developer tooling, the development identity files' issuer and the local app origin (registry-thunderid-tooling) accepted only 127.0.0.1 and now accept any loopback address literal. They still refuse the name localhost. An exchange issuer keeps accepting localhost and host.docker.internal, and one that names the development issuer's own listener in any loopback spelling is refused. evidencectl suggest accepts the IPv4-mapped form and still refuses the name localhost.
  10. Every outbound client built by the shared builder resolves the name localhost to 127.0.0.1 and ::1 itself and asks no resolver. A host whose resolver or hosts file maps localhost elsewhere is no longer followed. This reaches every product client crate.
  11. Log lines that were unbounded are now bounded: the Documents scope refusal line, the OID4VCI and OID4VP key-source warnings, and the Messaging callback refusal lines. A Documents scope refusal now carries a fixed remedy that names authentication.oidc.scopeClaim.
  12. Breaking, Adapter authors: adapterctl check refuses a binding whose concrete path is /health, /ready or the effective-contract path, with adapter.project.reserved-facade-path, and adapterctl compile refuses it with adapterctl.compile.reserved-path. The facade already left such a binding unserved. Migration: rename the record type or change the operation path.
  13. The Python BReg hook verifier takes caller_enforced_freshness as a bool only. Another value raises the binding's invalid-request error in place of a TypeError.
  14. Breaking, Rust callers of registry-platform-config: RuntimeConfigLoader::new takes the deployment's DeclaredPosture. Migration: call RuntimeConfigLoader::new_without_posture(envelope) to keep the present behaviour, add transport: None where a shared database block is built as a literal, and call OidcIssuerConfig::check_without_posture(field, allow_loopback_http) in place of the earlier check.
  15. The shared database block accepts database.transport (verified-tls, loopback-plaintext, or private-network-plaintext, the last for a development deployment only), and the audit block accepts audit.hashKeyCustody. The generated runtime schemas mark development-only members with x-registry-development-only. No runtime reads the new members yet, and a runtime that has not adopted the posture behaves as before.
  16. Casework's /health and /ready answered an empty body and now answer application/json with a status member, as the other services do, still with no token. A probe that compares the body to an empty string must change. The Coordinator's probe bodies keep live and ready and gain the same status member. A service that is not ready still answers 503.
  17. Scheduling: recording attendance on an appointment that takes none in its current state keeps its 403 and now counts under visibility, not ownership.
  18. Evidence counts an Authorization header that names another scheme under credential-missing, and one that is only the start of Bearer under credential-malformed. Evidence OID4VCI counts an unreadable header, or Bearer with no token, under credential-malformed. No answer changes.
  19. coordinatorctl --runtime-config FILE provision is accepted, as for every other coordinatorctl command.
  20. Release tooling: a Registry Adapter image is defined and held out of every release until the roster names its first one. build-release-image.sh takes RELEASE_IMAGE_PLATFORM (linux/amd64 by default, or linux/arm64), and the nightly workflow can build native arm64 image layouts on request without publishing them. Published images stay linux/amd64.
  21. adapterctl provision --runtime-config FILE creates the Adapter's migration and runtime roles and its database, as the other tools do. The runtime role gets only CONNECT, and adapter serve grants its table privileges at startup as before.
  22. The shared private listener accepts tlsTermination: loopback-plaintext, valid in every posture and limited to a loopback bind. The shared OIDC issuer block accepts jwksSource: {type: test-issuer, documentRef: ...}, read from a secret like static. A posture-aware load refuses it in production. Runtimes that have not adopted the posture read it like static, and Evidence refuses it as it refuses every source other than uri. Breaking, Rust callers of registry-platform-config: JwksSource and TlsTermination gain a variant each. Migration: add the new arm beside Static or DevelopmentLoopback in an exhaustive match.
  23. Breaking, Rust callers of registry-platform-httpsec: security_headers(csp, posture) takes the declared posture and, in development, marks every response with Registry-Posture: development. Migration: call security_headers_without_posture(csp), which behaves as production. No runtime sends the mark yet.
  24. Docs: the Messaging, Render, Discovery and BReg citizen service pages name the Linux amd64, Linux arm64 and macOS arm64 builds and installers each release publishes. discovery and discoveryctl join the CLI reference as unreviewed drafts. The client API page states that the hook verifier refuses a stale delivery itself.
  25. BReg: a rowBoundarySets member declares a named list of row boundaries once per project or module file. A grant, an Action or Proposal target, or a Record type's accessRequirements writes rowBoundaries: {rowBoundarySet: <id>} and gets that list. Each grant still writes its own rowBoundaries, and omitting it is still refused. A set holds at least one boundary and is never unrestricted. A reference to an undeclared set is refused with breg.row-boundary-set.reference-invalid. The compiled package is the same as one that writes each list inline.
  26. BReg: a date guard can shift the registry-local date by whole calendar months with currentDateOffsetMonths (-12000 to 12000), beside currentDateOffsetDays. It requires currentDate and cannot be combined with the day offset. The day of the month is kept and clamps to the last day of a shorter month. A shift outside years 1 to 9999 fails the guard closed.
  27. BReg: a commit guard with a reason can carry a label, constant display text of at most 256 bytes. It is returned where guardReason is: as detail of 412 action.guard_failed for an Action or a Proposal Submit or Apply, and as guardLabel in the availability response. A guard the caller cannot read still answers the fixed precondition.failed.
  28. BReg: an immediate Action can declare execution: {mode: immediate, concurrency: current-revision}. The caller then sends no condition and no preconditions. BReg evaluates the commit guards against the Record it locks and patches that row. bregctl check refuses the Action unless every Record it patches has an equals or isNull guard its own write makes false, and refuses a revision: unchanged guard, a function plan that writes an existing Record, and caller-supplied values written into an existing Record. A Proposal cannot declare concurrency.
  29. BReg: bregctl migration draft writes descriptor.json and rehearsal.json under <output>/modules/<module>/migrations/<id> for a successor whose changes are all access or disclosure changes that alter no table, column or index. It measures the schema fingerprint and PostgreSQL major version on the disposable database and binds them to the verified baseline package. It refuses, before reading the runtime configuration, when nothing needs review (migration.draft.nothing-to-review), a change needs SQL (migration.draft.sql-required), the module is unknown (migration.draft.module-unknown), or the directory exists (migration.draft.output-exists). It never overwrites.
  30. BReg migration note: registry revisions change on upgrade because the availability response schema gained guardLabel. A package built before this change is a new revision, so rebuild, test and package successors.

Evidence

  • Unchanged answers: each product's refusal answers are held byte for byte by a golden file, listed under the security notes below. Those tests pass unchanged on this branch.
  • Refusal counting: runtime tests check the counter label and the log line for the refusals each runtime answers, and that the scrape publishes every check at zero.
  • Provisioning: each tool's provision has CLI tests for its refusals and print mode, and PostgreSQL tests against a TLS PostgreSQL server. The provision CI job runs each product's journey against the TLS PostgreSQL lane.
  • Loopback and key sets: registry-platform-loopback and the shared key set rule carry table tests, and each product's former site keeps its own test rows.
  • Posture: cargo test -p registry-platform-posture and the loader tests in registry-platform-config.
  • Acceptance journeys: products/platform/journeys/test_journey_tables.py checks the journey tables (24 tests).
  • Generated outputs (OpenAPI, CLI catalog, identifier catalog, runtime schemas) were regenerated with their documented generators and pass their drift checks.
  • Local runs were per touched crate with --locked, cargo fmt --check and cargo clippy --all-targets -- -D warnings. The full workspace matrix is this pull request's CI, which is the evidence for the whole change.

Notes

Security review notes

The change touches two trust boundaries, and a third only at its edge.

The refusal recorder. The recorder sits after each decision to refuse and before the answer is written. It reads the failed check the decision already holds, adds one to a counter keyed by that check, and writes one rate-limited log line. It makes no decision, changes no status, header or body, and takes no new input from the caller. The counter label comes from a closed enum, so no caller value can become a label or a log field. The line carries a fixed check name, an optional fixed remedy, the request's trace id when it has one, and on a scope refusal the scope values the configuration declares, never one the token carried. Each runtime has a test whose token carries a canary scope that must not appear on the line. The log rate limit is per check, so a flood of one kind of refusal cannot hide another.

Each answer is unchanged, and a golden file holds the bytes to prove it:

  • BReg: crates/registry-breg/tests/golden/authentication_refusals.json and crates/registry-breg/tests/golden/concealment_refusals.json.
  • Casework: crates/registry-casework/tests/golden/refusal_responses.json, run by crates/registry-casework/tests/refusal_golden.rs.
  • Documents: crates/registry-documents/tests/golden/refusals.json, run by crates/registry-documents/tests/refusal_golden.rs.
  • Evidence: crates/registry-evidence/tests/golden/refusal_answers.json, with the scrape format held in crates/registry-evidence/src/observability/golden-scrape.txt.
  • Evidence OID4VCI: crates/registry-evidence-oid4vci/tests/golden/refusals.json.
  • Evidence OID4VP: crates/registry-evidence-oid4vp/tests/golden/refusals.json, run by crates/registry-evidence-oid4vp/tests/refusal_golden.rs.
  • Messaging: crates/registry-messaging/tests/golden/refusals.json.
  • Render: crates/registry-render/tests/golden/authentication_refusals.json.
  • Scheduling: crates/registry-scheduling/tests/golden/refusal-answers.json.
  • MCP edge: crates/registry-mcp-edge/tests/golden/refusals.json.
  • Adapter: crates/registry-adapter/tests/golden/facade_refusals.json and crates/registry-adapter/tests/golden/payment_refusals.json.
  • Coordinator: crates/registry-coordinator/src/access/token_characterisation.rs checks that the check a refusal carries matches the check the verifier names, against the shared token fixtures. No golden file holds its answer bytes.

The loopback definition. The pure classification lives in the standard-library-only crate registry-platform-loopback. The name localhost is loopback only when the connection is pinned to loopback addresses. The fetch policy and the fixed-destination policy check every resolver answer and connect to the checked address. The shared client resolves the name itself. The changes only tighten at the name. At the literal arm, a site now accepts other spellings of an address the kernel delivers on the local host, so no off-host destination is admitted. A site that refused the name localhost still refuses it, and each development switch (Casework completion destination, Evidence assuranceProfile: local, MCP development-loopback, Messaging development transport) still gates the same cases. Sites that decide on canonical identifier form, bind address class or a denial rule keep their own test and do not use the shared function.

The empty private range list. The only site where an empty list meant "every private address" was the PrivateServiceHttp profile, used by the Adapter job. It now admits none. This only refuses more, and it fails at check time with an error that names the setting. Metadata and link-local addresses stay refused whatever range is listed.

BReg authorization and disclosure (items 25 to 29).

  • Guard labels: a label is constant authored text, at most 256 bytes, and refused without a reason. It is emitted only on the paths that already emit guardReason and never on the generic precondition.failed body, so it cannot disclose a guard the caller cannot read. Rewording a label does not change the Action revision a frozen Proposal binds.
  • current-revision: the guard is the only stale-write protection, so the compile rules require a falsifiable equals or isNull guard per patched Record and refuse caller-chosen values written into existing Records, revision: unchanged guards, function plans that write existing Records, and Proposals. The guards run against the locked current row and the patch hits that same row. A missing Record and a Record outside the caller's row boundaries answer identically. A PostgreSQL test runs two concurrent invocations and checks that exactly one commits.
  • migration draft manufactures no authority. The package validator still checks coverage, class, evidence and fingerprint when the directory is passed as --reviewed-migrations. It drafts only access or disclosure covers with metadata and no steps, assertions or backup binding. Output is created only through descriptor-relative paths that refuse symbolic links, so it cannot overwrite or be redirected. It reads the disposable database's runtime configuration only after every argument and baseline refusal, and measures inside a rolled-back transaction.
  • Row boundary sets are resolved at compile time into the same lists a project could write inline, only at the positions that take row boundaries, and a set can never be unrestricted.

Sites that keep their own test. A few sites test loopback for a denial class, a bind address or a canonical identifier form. They do not admit an outbound destination and keep their own test on purpose.

How a refusal is tied to its check. The MCP edge builds every refusal from a type that requires its failed check, so a refusal without one does not compile. In the other products a refusal status arriving without a check is caught by a runtime guard (a debug assertion and one error line) and by a test, and no current site builds one. A refusal type per product that makes the check a compile-time requirement everywhere is a larger change left for later.

Provisioning: what this pull request covers

provision is in adapterctl, bregctl, caseworkctl, coordinatorctl, documentsctl, messagingctl and schedulingctl, with the same flags and report, and rstack dev builds the same plan. These stores keep their documented setup and are not provisioned by the command yet: the Adapter job store, the Evidence OID4VCI store, the Evidence status ledger, registry-mcp and registry-breg-mcp. The Adapter job's hook listener and a payments-only Adapter do not answer /health and /ready. Every other HTTP runtime does.

Not exercised from a branch

  1. The nightly arm64-images job has never run.
  2. arm64 coverage of the BuildKit and base image digests is not verified.
  3. The Coordinator image is held until its GHCR package is bootstrapped.
  4. The Document Store image is not built.
  5. The Adapter image is not yet listed by the other release consumers (nightly_release.py, release-candidate.yml, the rehearsal and cleanup lists). It is held by ADAPTER_IMAGE_FIRST_RELEASE = None, so wiring them is part of its first release.
  6. The discovery and discoveryctl CLI reference pages are drafts under unreviewed_binaries.

Compatibility

Pre-1.0. The breaking items above list their migration. The draft grows as further commits land, and this description is updated with them.

DCO

  • Every commit includes a Signed-off-by trailer.
  • I reviewed the submitted changes and am responsible for the contribution.

…17 floor

Products and rstack dev each spell the roles, grants and schema a runtime
needs. registry-platform-provision builds that plan once, as reviewed SQL,
and converges a server towards it without altering existing objects. The
maintained floor, PostgreSQL 17, is exported from registry-platform-activation
so the provisioner and the activation checks refuse the same servers.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…en corpus

test(platform): add a token fixture corpus and a driver to run it

Each product decides what a provider's token reaches from its own reading
of the claims. The corpus holds positive and negative token shapes from
ThunderID, Keycloak, Supabase Auth and eSignet as fixtures signed at test
time, with the expected result per product beside them, so a change to any
verifier shows up as a cell that moved.

test: characterise token admission in every runtime that verifies a token

Each runtime's own verifier now runs the token fixture corpus and must give
the result its column in expected.yaml records. The caller-contract work
changes these results row by row, so every change is a test that moved
rather than a reading of the code.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Eleven products load an operator-pinned key set, and BReg kept its own
member list. public_jwks_document is the one rule: private and symmetric
members are refused on every key type, repeated member names are refused,
and members it does not name are ignored as RFC 7517 requires, so a stock
provider key set with x5c or ext loads.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
… once

feat(platform): give loopback one definition and an empty range list one meaning

Loopback was spelled several ways across the shared HTTP crates, and an
empty private range list admitted every private address under one profile.
registry-platform-httpsec::loopback is now the one definition: numeric
loopback literals, and the exact name localhost only when every address it
resolves to is loopback. An empty list admits no private address, and the
shared outbound builder pins localhost to loopback itself.

feat(platform): name the probe paths and bodies once

Services answer liveness and readiness probes with different paths and
bodies. registry-platform-httputil::probe holds the one shape most of them
already use, /health and /ready with a small JSON status body, so products
and their clients take it from one place.

feat(platform): use the one loopback definition in the shared crates and default the delivery window

The issuer policy, the JWKS address check, hook destinations and the object
store each kept their own loopback test. They now call
registry-platform-httpsec::loopback. Signed hook receivers gain
DEFAULT_DELIVERY_SKEW, 300 seconds either way, for callers that name no
window of their own.

fix(platform): treat a mapped loopback literal as loopback for a development fetch

The issuer policy and the JWKS check accept http://[::ffff:127.0.0.1]/
through the one loopback definition, while the development fetch policy
refused it, so a check passed and the fetch failed. The fetch now uses the
same definition. Mapped forms of any other address stay refused.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…report

Each product tool will offer the same provision command. The cli feature of
registry-platform-provision parses its flags, prints the plan as SQL with
password placeholders and no connection, or runs it against an
administrator connection read from a file or a variable, and answers with a
typed JSON report whose schema is generated and registered.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Products refuse requests for many reasons and log them in different ways,
some without a bound. registry-platform-authcommon now holds the closed set
of failed checks and, behind the refusal-recorder feature, a recorder that
counts each refusal by check and writes at most five lines per check per
minute, naming the check and nothing a caller sent. The OIDC error type
maps itself onto that set.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…the package

Messaging and Documents ask operators to repeat, in the runtime file, the
client list the reviewed package already names. The PackageClients block
takes from-package to admit exactly the package's requester clients, an
explicit list that must include every one of them, or unrestricted, which
each runtime decides on. A resolved list is never empty.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…red plan

rstack dev kept its own role, grant and schema statement builders. It now
renders them from registry-platform-provision, the code every product tool
will use, so a development database and an operator-provisioned one are
made by the same statements. A byte-identity test held the output equal
before the local builders were removed.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
BReg kept its own ten-member allow list for a pinned key set and refused
any member it did not name, unlike every other product and unlike RFC
7517. It now calls the shared rule: unknown public members such as x5c
load, private and symmetric members are refused by name and position,
and BReg's own algorithm, use and denied-kid checks still apply. A
listener origin uses the shared loopback definition, so an IPv4-mapped
loopback literal counts as loopback.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…brary

Three journeys (own provider, rstack dev, promote) say where a reader
stops today for each of the sixteen runtimes that load a runtime file,
and which milestone removes the stop. The tables hold the product list,
the first-hour pass rule, the counted concepts and the ratchet of
expected failures, with a static check. The shell library gives every
journey script the same options, generated secrets, redaction,
container cleanup and ratchet comparison, and its self-test runs against
fake docker, curl and cargo commands.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
… own code

On the offline path a task grant may have at most fifteen minutes left.
A grant with more than that was refused as operation.not-authorized,
the same answer as a grant that does not cover the offering, so the
caller could not tell that it only needed a shorter grant. It now
answers 403 grant.lifetime-too-long, and only after the grant's bounds
have matched the offering, so the code says nothing about what the
grant reaches. Every other refusal keeps its code.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Every tool that offers provision already has a global --format with the
values human and json. The shared command declared a second --format of
its own, which clap refuses, so the verb could not run in any tool. The
command now takes the format the tool parsed, so provision reads the
same flag, with the same values, as every other verb.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The Rust, Node and Python verifiers in the BReg clients checked only
that a delivery time was well formed and left the window to each
receiver, so a receiver that forgot it accepted a replay of any age.
They now refuse a delivery more than 300 seconds from the receiver
clock with stale-delivery, the window the shared hook receiver uses.
A receiver can set another window up to an hour, or keep checking the
time itself. The changelog also records the static key set rule.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…d stops

The journey starts each of the sixteen runtimes with rstack dev and
records where a reader stops today. Breg, Casework and Evidence stop at
plan, because their init writes no dev.yaml; Scheduling, Documents,
Coordinator and Render stop there too, because the plan cannot name
them; Messaging reaches a call and loses its state on restart; Adapter
and Discovery have no init. The ratchet table now holds these observed
rows in place of the predicted ones.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…ver TLS

feat(casework): add caseworkctl provision for roles and the database

An operator created Casework's two roles and its database by copying
SQL from the operations page. caseworkctl provision now creates them
from the runtime file's two URLs through the shared provisioning plan,
as a non-superuser administrator, idempotently, or prints the SQL with
--print-sql and connects to nothing. apply and its grants are unchanged.

feat(coordinator): add coordinatorctl provision for roles and the database

An operator created Coordinator's migration and runtime roles and its
database by hand from the operations page. coordinatorctl provision now
creates them from the runtime file's two URLs through the shared
provisioning plan, as a non-superuser administrator, idempotently, or
prints the SQL with --print-sql. apply still creates the namespace
schema and its grants.

The dependency-direction gate accepts registry-cli-report beside
registry-cli-api: the shared provisioning command reports through it,
and it reaches no product.

feat(documents): add documentsctl provision for roles and the database

An operator created the Document Store roles and database by hand from
the operations page. documentsctl provision now creates them from the
runtime file's two URLs through the shared provisioning plan, as a
non-superuser administrator, idempotently, or prints the SQL with
--print-sql. documentsctl keeps its own global --format and passes it
to the shared command.

test(platform): run every product provision test over one verified-TLS session

provision connects only over verified TLS, so its product tests need a
TLS server, and their own setup sessions must use TLS too to run
against a TLS-only one. A test-support feature in
registry-platform-provision gives them the two PROVISION_TEST_DATABASE_*
variables and a superuser session built from the crate's own
administrator URL rules. Casework, Coordinator and Documents use it in
place of their own connections.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…he token corpus

The corpus held documented shapes for Supabase and only ThunderID
1.0.1 captures. It now carries shapes observed from a ThunderID 1.1.0
issuer (a token-exchange result, a person who proves identity only,
attribute-carried claims, a JWT refresh token, a second ThunderID
standing in for eSignet) and corrected Supabase shapes, under a new
`issuer` source basis.

A token's required scope is read with one helper that skips OpenID
Connect scopes, so no characterisation profile requires `openid`, and
every product test reads authority from `scope` only. Each cell's main
result is observed on main's admission code.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
An operator created the Scheduling roles and database by hand from the
operations page. schedulingctl provision now creates them from the
runtime file's two URLs through the shared provisioning plan, as a
non-superuser administrator, idempotently, or prints the SQL with
--print-sql. It reads the runtime file the way apply does, so it runs
after the policy is packaged.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…ved stops

The own-provider journey starts each product from its starter against a
stock Keycloak and a stock PostgreSQL the reader already runs, and stops
at the first step a reader cannot pass without hand-written SQL, a claim
mapper or another forbidden assist. Its sixteen rows in the ratchet
table are now observed on main: the database products stop at
provisioning, Evidence at its issuer check, Render at the call.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The runtime file's two database URLs name the roles, the database and both passwords, so the operate page's hand-written role and database SQL becomes one command, with --print-sql for an administrator who must run the script.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…them in CI

test(platform): add journey assists so a run can pass stops main cannot clear yet

A later milestone is measured against the same counters as an assisted run on main. Each assist use counts as a pass-rule violation. The journey reads a stage from a log line with colour escapes, and handles the token type and claim mapper refusals in order.

test(platform): add the promote acceptance journey and its observed stops

Promote takes the files a development journey ended with and starts them as production, lists the refusals, applies each fix and checks the contract is the same. On main every product stops at input because no development journey finishes unassisted, and an assisted Scheduling run lists nothing to refuse because no shared posture exists yet.

chore(ci): run the token corpus, the provisioning suite and the acceptance journeys

The acceptance journeys run in ratchet mode with --strict, so a change that fixes a cell must delete its row in the same commit. The shared provisioning suite needs PostgreSQL 17 with PostGIS and a server below the floor, both over verified TLS, and fails rather than skips without them. The token corpus test needs a feature no platform crate enables, so it runs as its own step.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…race id

A header alg that does not fit the named key, or a kid that names an encryption key, is a token fault, not a key-source fault. Missing aud, iss and time claims each map to their own variant, and a UserInfo subject mismatch has its own. record_refusal! takes only a typed trace id, so authcommon no longer depends on httpsec. An empty private range list for a private service fails at construction. The failed-check names, the private JWK member list and the documentation each have one source.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The runtime file's two database URLs name the roles, the database and both passwords; with --package the command also plans the PostGIS steps a spatial package needs. It reads the managed schemas, the PostGIS schema and the PostGIS floor from registry-breg, so the command cannot drift from what apply and the runtime check.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
config and httputil reached httpsec only for the loopback rule, and httpsec's default server feature carries axum, so the Adapter engine reached axum through them. The rule now lives in registry-platform-loopback, which depends on nothing; httpsec re-exports it under the same path.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…RY_STACK_POSTURE

A process declares development or production once, through the flag or the variable; unset means production. A value that is not a posture, or a flag and variable that disagree, is refused with a value-free message before any file is read. No product reads it yet.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…me each refused key

httpsec's refusal trace id impl moves behind an opt-in refusal-trace-id feature, so a service that only serves HTTP, such as Discovery, no longer links authcommon and the crypto stack; CI runs that feature's test on the platform shard. A static key set refusal for a key of the wrong shape names its position, and an OKP refusal also names the key's kid and crv. The token corpus lists every private JWK member, a drift test holds the ThunderID tooling copy to the shared list, and adapterctl verify keeps the platform's remedy for an empty private range list.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…e it decodes

registry-platform-yaml answers a DEVELOPMENT_ONLY newtype with the value's pointer and position through gated_site(), exactly for a node and as the holding mapping when serde decodes it from buffered content. The guards restore the previous site, so nested decodes and errors leave nothing behind. The changelog also records the posture crate.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
When the runtime and migration sessions run as different roles, adapter serve migrates, connects as the runtime role, and grants that session's role the table privileges its deployment needs, in one transaction under an advisory lock, then checks them before it listens. The grantee is the role the runtime session proves, never a URL's text. It grants only what is missing, never revokes, and makes no grant to a role whose privileges other members would inherit, apart from a leaf administrator holding ADMIN OPTION. Configuration refusals run before any grant. Payment and G2P tables stay hand-granted, and the operate page lists them.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
feat(cli-report): report the declared posture and where it came from

Report: :with_posture writes posture.value and posture.source into a CLI report body after the command members, as the report already writes its own version and outcome. A report built without it is unchanged byte for byte.

feat(platform): gate development-only configuration values behind a declared posture

A configuration value that only a development process may use is a Gated value, readable with the witness the loader issues to a process that declared development. Decoding records each such value with its pointer, and one report decides: production refuses every recorded setting and development accepts and lists it under the same code. The production refusal names both ways to run a laptop or test process. A check acceptance cannot hide a posture diagnostic. No runtime uses the gate yet.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
feat(casework): answer /health and /ready with the shared JSON bodies

Both probes now answer application/json bodies with a status member, as the other services do, still with no token. A service that is not ready still answers 503.

feat(coordinator): add the shared status member to /health and /ready

The probe bodies keep their live and ready members and gain the status member the other services answer. The 503 body is unchanged.

feat(scheduling): add /health and /ready beside /healthz and /readyz

Scheduling answers the same probe paths and JSON bodies as the other services, with no token. The older paths keep answering an empty 200 for deployments that already probe them.

feat(adapter): answer /health and /ready on the facade listener

Load balancers and orchestrators can probe an Adapter without a token. /ready reports whether the journal migrations match the binary and the runtime role holds its journal privileges, with bodies that never vary with the project, and a project operation on either path is unserved under the reserved-path reason.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…in Messaging

feat(messaging): let the client accept a JSON body from /health and /ready

The Messaging client accepts an empty body or a bounded JSON object from either probe and refuses a larger one, so it keeps working when a runtime answers a JSON probe body. The runtime still answers an empty 200.

feat(messaging): admit the package's requester clients with allowedClients: from-package

An operator writes the admitted clients once, in the package: from-package admits exactly the clients the access profiles name. A written list still has to cover every profile's clients, and an omitted member, an empty list and unrestricted are still refused. rstack dev writes from-package.

feat(documents): let the client accept a JSON body from /health

The Documents client accepts an empty body or a bounded JSON object from the health probe and refuses a larger one, so it keeps working when the runtime answers a JSON probe body.

feat(breg): let the client ignore members it does not know in a probe answer

BRegProbeStatus still requires status and now ignores other members, so the client keeps working when /ready gains members.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…nostics

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…elog

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The rebase onto the declared-posture base kept the signed-delivery side of each conflicting generated file. Regenerating restores the base guardLabel availability schema in the example OpenAPI documents, the base authoring and rowBoundarySets inputs in the identifier catalog and explain examples, and the combined fixture revisions in the format examples and the compiled DDL pins.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…le true

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…eaders

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
The Go delivery receiver example step put actions/setup-go in the CI changes job, so the release workflow structure inventory must list it.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…ection

proposal_workflow.rs revise moves a submitted Proposal back to draft under the next version; only a later Submit creates the new Review.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the heavy integration tier on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants