Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
1510996
Validate complete fresh World topology with typed canonical UUID input
benhook1013 Oct 5, 2026
9b28c43
Store complete fresh World topology with guarded UUID associations an…
benhook1013 Oct 5, 2026
2bc560f
Merge commit '73bfc04c9353a25cf1ab4d41e8f7cf759e35e752' into codex/un…
benhook1013 Oct 5, 2026
55fa0fc
Delimit nested CASE expression in World topology migration IF
benhook1013 Oct 5, 2026
db80095
Merge commit 'a67b503558ec96f8659660abc3cf8333069eb80a' into codex/un…
benhook1013 Oct 5, 2026
47af7d7
Retain strict canonical frozen World topology and exact historical re…
benhook1013 Oct 5, 2026
0cadc8f
Converge World semantic digests and immutable capture to schema 3
benhook1013 Oct 5, 2026
f907a11
fix(world): reject incomplete preparation and exercise actual frozen …
benhook1013 Oct 5, 2026
6d7c452
fix(world): deny unproved publication digest and add real preparation…
benhook1013 Oct 5, 2026
a6f1092
Fence logout authority against Draft commits and prove World workload…
benhook1013 Oct 5, 2026
25848a5
Bind pending reset envelopes and preserve complete World topology plans
benhook1013 Oct 5, 2026
678ca7c
feat(world): retain guarded canonical preparation and pending source …
benhook1013 Oct 5, 2026
9c9f01b
Repair exact-source Account and World PostgreSQL proof fixtures
benhook1013 Oct 6, 2026
3b48b74
Compare complete frozen preparation values and pin V59 preservation p…
benhook1013 Oct 6, 2026
3d80128
Preserve typed World conflicts and exact V59 fixture readback
benhook1013 Oct 6, 2026
23ade10
Separate V59 preservation proof from current V61 issuer interactions
benhook1013 Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 163 additions & 1 deletion .github/workflows/ci.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Each credential record must point to content-addressed output generated by the a

The pre-release authority is a dedicated authenticated handoff store/API owned by the environment/secrets provisioning, rotation, or rebinding controller. Its publisher uses an identity scoped to one environment’s compliance path and content-addressed evidence. Before a recovery or release transition, the owner supplies one complete immutable handoff containing the target environment, applicable event kind and identity, exact credential-class keys, evidence references and digests, selected freshness field/value and previous field/value, retained material-lineage identity when applicable, exact target binding when applicable, and canonical parent-record digest. Recovery handoffs use the recovery controller's existing canonical operation identity: `operationId` for the general recovery workflow, or the branch-specific `restoreOperationId` for the ADR 0155 handoff below. That identity binds only the matching recovery event and is absent from ordinary release, promotion, and other transition handoffs. Ordinary release and transition identity uses the existing event-scoped tuple `{deploymentRef, deploymentEventId, trafficOpenEvent}` from the preflight contract. A production promotion additionally retains the existing promotion lineage `{stagingOverlayCommitSha, stagingDeploymentEventId, productionOverlayRef}`; these canonical identifiers are not replaced by a fabricated generic release or promotion operation ID. A rebinding handoff also carries the exact new target binding. The handoff publisher validates and atomically publishes that exact tuple; a retry is allowed only when every field and digest matches, while a partial, conflicting, or ambiguous owner, publisher, or dereferenced-evidence result fails closed. The owner handoff and dereferenced evidence are the sole pre-release authority. A separate authenticated Git exporter projects the finalized record for retention and reporting; Git authorship, branch protection, commit timestamps, file paths, and process exit codes are not publisher authority, and the Git projection is never read back to authorize the same recovery or release.

The Account response-envelope ring uses this same authenticated, content-addressed environment/secrets channel with a distinct `account-response-envelope-ring-materialization-v1` receipt, not a `jwt-signing-keys-jwks` credential record or JWT evidence shape. The typed receipt binds the exact protected source generation and predecessor, source manifest digest, environment and namespace, server-authenticated sole materializer identity, canonical Secret name, and the Secret UID and resourceVersion obtained by post-write readback. It carries only non-secret source and resource metadata; its `immutableArtifactId` is the canonical SHA-256 digest with that field omitted from the preimage. The environment/secrets owner must publish and authenticate the exact typed receipt and reject a missing, conflicting, wrong-writer, wrong-generation, or wrong-Secret result. A local materializer return value, checked-in projection, or digest-shaped string is not that handoff. The separate deployment readback must match the published generation, Secret identity and mounted content binding; live freshness and Account readiness are independently proved before the ring mount or either envelope purpose is activated. Neither a receipt nor the shared channel grants Account permission to replace its own Secret.
The Account response-envelope ring uses this same authenticated, content-addressed environment/secrets channel with a distinct `account-response-envelope-ring-materialization-v1` receipt, not a `jwt-signing-keys-jwks` credential record or JWT evidence shape. The typed receipt binds the exact protected source generation and predecessor, source manifest digest, environment and namespace, server-authenticated sole materializer identity, canonical Secret name, and the Secret UID and resourceVersion obtained by post-write readback. It carries only non-secret source and resource metadata; its `immutableArtifactId` is the canonical SHA-256 digest with that field omitted from the preimage. The environment/secrets owner must publish and authenticate the exact typed receipt and reject a missing, conflicting, wrong-writer, wrong-generation, or wrong-Secret result. A local materializer return value, checked-in projection, or digest-shaped string is not that handoff. The separate deployment readback must match the published generation, Secret identity and mounted content binding; live freshness and Account readiness are independently proved before the ring mount or any applicable Account envelope purpose is activated, including the separate [pending-reset purpose](../microservices/account-service/api-contracts.md#account-owned-password-reset-authority-commit). Neither a receipt nor the shared channel grants Account permission to replace its own Secret.

### Account ring materializer target-cluster binding

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Each local transition uses a short owner transaction; no database lock spans a r

A disclosed terms effective date is never delayed by unresolved owner work and never grandfathers a later Game Design commit. Recovery may recognize an exact valid pre-deadline commit; otherwise Game Design must provide the durable final no-commit proof before the definitive mixed failure can settle. Staged or partially applied content remains non-authoritative and cannot satisfy publication or admission.

**Implementation boundary:** the internal durable fence and participant readback storage are preparation, not an authenticated authorization producer or enabled writer. Complete source-writer participation, current role/party/terms proof, authenticated participant verification and both commit-versus-revocation interleavings remain required before canonical writes may be enabled. No public route or wire schema is selected by this section. Current proof and remaining gates belong to [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md#current-status).
**Implementation boundary:** the internal durable fence and participant readback storage are preparation, not an authenticated authorization producer or enabled writer. The unwired logout-all source producer now retains an immutable pending caller binding and original Account capture, waits for both definitive participant outcomes, and commits its source advance, event, receipt and linked journals in one Account transaction. Pending readback grants no authorization. Complete participation by the remaining source writers, current role/party/terms proof, authenticated participant verification and executed commit-versus-revocation proof remain required before canonical writes may be enabled. No public route or wire schema is selected by this section. Current proof and remaining gates belong to [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md#current-status).

### Account-Owned Playtest Grant Contract

Expand Down Expand Up @@ -210,6 +210,10 @@ Password reset is an account-wide security cutoff, not only a password-row updat

The Account-issued, unpredictable one-use reset token identifies one logical reset attempt. Account uses its SHA-256 token hash as the stable internal request identity; raw token bytes never appear in the source event or retained receipt. The receipt binds the exact verified Account UUID, token hash, original token deadline, and SHA-256 of the salted Argon2 password verifier committed to the Account row. It retains neither an additional password verifier nor a fast plaintext-password digest. A versioned private request digest binds those immutable values in the fixed order `[operationKind, accountId, tokenHash, tokenExpiresAt, passwordVerifierDigest]`, using UTF-8 byte-length framing with domain `account-password-reset-request/v1` and `operationKind=PASSWORD_RESET`. Exact retry first proves that the current Account password verifier matches its recorded digest, then verifies the submitted password against that slow verifier and compares immutable request/event/receipt evidence before returning the same lifecycle-only completion; it does not hash a replacement password, consume another token, advance authority again, or issue a credential. A changed Account password postcondition fails closed as superseded rather than being mislabeled a changed caller request. With the original postcondition proved, reusing the same token identity with a different password is a conflict, not another reset. The original token deadline still limits this retry; this operation does not inherit bare-LOGIN's separately authorized expired-context recovery.

An unresolved source-participating reset retains its original slow Argon2 target verifier only in a separate Account-private encrypted pending envelope, not in the completed receipt or an authority event. Its distinct `pending-reset` AEAD purpose uses independent material from connect-token and bare-`LOGIN` envelopes and binds the exact Account UUID, token hash and original expiry, request identity/digest, target verifier digest and original authority-source capture. An exact pending retry verifies the submitted password against that original slow verifier rather than generating a new salted verifier; a different password conflicts. `WAITING` never installs the verifier, consumes the reset token, advances authority, or issues credentials. Missing encryption material, failed authentication, changed bindings or stale source/participant evidence fail closed.

Once the [authored-Draft source ordering](#account-owned-authored-draft-authorization-fence) permits completion, Account rechecks the original token deadline and current authority/participant evidence and atomically installs that same target verifier, consumes the one-use token, and commits the existing source, event, checkpoint and digest-only receipt obligations. Pending secret cleanup is automatic and idempotent: erase the envelope on committed completion, definitive abort or original expiry, retaining only necessary non-secret outcome evidence. Secret erasure does not bypass unresolved participant recovery or release an authority fence by expiry. A retained pending record or backup never permits an expired operation to install a password. Neither raw passwords nor fast plaintext-password digests are persisted or logged, and no deadline is extended.

The private digest frame starts with its domain and then each field in the declared order. Each component is its UTF-8 byte sequence preceded by a four-byte big-endian byte count. `accountId` is the canonical non-nil UUID string; both hash fields are exactly 64 lowercase hexadecimal characters. `tokenExpiresAt` is the persisted timezone-less deadline's exact `LocalDateTime.toString()` representation, without inventing an offset or converting retained deadlines to UTC. The immutable internal IDs are `account-password-reset-request-v1:<tokenHash>` and `account-password-reset-event-v1:<tokenHash>`.

The stored receipt and event must be read back exactly before success, including after a lost response. Concurrent retries serialize on the exact Account/source scope and one-use token claim; token consumption, password mutation, authority advance, event append and receipt insertion roll back together on any failure. Receipt cleanup remains Account-owned and must prove its retained recovery/replay horizon, holds and references before deletion; expiry alone is not deletion proof and no fixed retention interval is invented here. The current candidate composes this Account-local producer and immutable receipt; it does not implement downstream event delivery, authenticated recipient readback, projection consumption, or active-binding termination. The capability and execution gates remain in [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The configurable cleanup margin controls issued-token registry retention only. G

### Response-Envelope Key Delivery

The Account-owned response-envelope ring is separate from JWT signing, JWKS, and request-digest material. Account alone reads its versioned key manifest from a read-only mounted Secret at the configured path; no inline key or JWT-key fallback is permitted. The manifest has one active write key ID and distinct AEAD material for connect-token issuance and bare first-party `LOGIN` under each retained ID. Rotation replaces the mounted projection atomically, moves prior IDs to decrypt-only use, and retains them until Account proves that no retained response envelope needing recovery references them. [Account Runtime and Data](./runtime-and-data.md#connect-token-issuance-persistence-and-retention) owns the exact-operation and fail-closed recovery contract. Deployment and producer/consumer proof remain required before either envelope path is enabled.
The Account-owned envelope ring is separate from JWT signing, JWKS, and request-digest material. Account alone reads its versioned key manifest from a read-only mounted Secret at the configured path; no inline key or JWT-key fallback is permitted. The manifest has one active write key ID with independent AEAD material for connect-token issuance, bare first-party `LOGIN` and the separate pending-reset purpose. Retained IDs keep their original response-purpose pair; a pending-reset key is required only where pending-reset envelopes use that ID, and an active ID missing it denies pending-reset writes without falling back to another purpose. Rotation replaces the mounted projection atomically, moves prior IDs to decrypt-only use, and retains required material until Account proves that no retained envelope needing recovery references it. [Account Runtime and Data](./runtime-and-data.md#connect-token-issuance-persistence-and-retention) owns response recovery; the [password-reset owner contract](./api-contracts.md#account-owned-password-reset-authority-commit) owns pending secret and expiry consequences. Protected custody, materializer/readback, deployment and producer/consumer proof remain required before any envelope path is enabled.

## Implementation Status

Expand All @@ -50,7 +50,7 @@ Additional variables configure outbound email delivery, payment behavior, and Ac
| `FIREMUD_AUTH_JWT_SECRET` | Inline JWT signing key material for local/dev or explicitly ephemeral stacks only (legacy compatibility; not for player-facing environments) | *(none)* |
| `FIREMUD_AUTH_JWT_SECRET_PATH` | Account-only path to the interim versioned asymmetric signing bundle (fallback while delegated non-exportable signer custody is unavailable; mounted read-only from `jwt-signing-keys`) | *(none)* |
| `FIREMUD_AUTH_JWKS_PATH` | Path to the Account-published public `jwks.json` file used by Account and JWT validators (required for player-facing environments; mounted read-only from `jwt-jwks`, normally `/var/run/secrets/firemud/jwks/jwks.json`) | *(none)* |
| `FIREMUD_AUTH_RESPONSE_ENVELOPE_KEY_RING_PATH` | Account-only read-only mounted versioned AEAD ring manifest for connect-token and bare-`LOGIN` response envelopes; no inline or JWT-key fallback | *(none; required before either response-envelope path is enabled)* |
| `FIREMUD_AUTH_RESPONSE_ENVELOPE_KEY_RING_PATH` | Account-only read-only mounted versioned AEAD ring manifest with independent connect-token, bare-`LOGIN` response and pending-reset purposes; no inline or JWT-key fallback | *(none; required before the applicable envelope path is enabled)* |
| `FIREMUD_AUTH_JWT_EXPIRATION_MS` | Lifetime of newly issued JWTs for profiles using the global setting (target `control-ui` and receiver-specific private player-delegation profiles); Account-specific player-bootstrap and gameplay-connect lifetimes are configured separately below | `3600000` |
| `FIREMUD_ACCOUNT_TOKENS_SESSION_EXPIRATION_MS` | Current default legacy Account authentication-session record TTL when `SessionService.storeSession(tenantId, accountId, token)` is called without an explicit lifetime (currently gameplay text/delegation paths); control-ui and player-bootstrap account rows currently pass their corresponding JWT lifetimes directly, while connect-token rows pass the connect-token lifetime directly. It is not JWT `exp`, gameplay-continuity, or issued-token-registry retention | `3600000` |
| `FIREMUD_ACCOUNT_TOKENS_PLAYER_BOOTSTRAP_EXPIRATION_MS` | `player-bootstrap` JWT lifetime; target ceiling is `300000` ms (five minutes). Current runtime consumes this override, but target startup/preflight bound validation remains incomplete | `300000` |
Expand Down
Loading
Loading