Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
187 changes: 183 additions & 4 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ For each committed role or creator-bootstrap change, Account revalidates the exa

An exact retry may return only the immutable result of the original operation after its identity, digest, expected source, and committed owner readback match. It does not reauthorize a new mutation or create reusable authority. Changed actor, target, tenant, operation kind, or expected source conflicts; stale or contradictory source state and unavailable or incomplete authorization/readback fail closed. Concrete route, request, and event details proceed under this approved authority boundary and must be specified and proved before mutation is enabled; this contract adds no public Account route or wire encoding.

### Versionless Tenant-Creation Authorization

The closed `CREATE_TENANT` operation family binds the verified initiating Account, Game Design-reserved canonical tenant UUID, exact creation operation/request and digest, and every applicable current Account source. Its two exact participants are Game Design's tenant creation and Account's first-administrator bootstrap, declared from inception. This family has no Version, Draft or World participant; a dummy Version or an existing authored-Draft fence cannot substitute for it. The distinct [Game Design reservation](../game-design-service/api-contracts.md#fresh-tenant-creation-initiator-qualification) is non-authoritative preparation and supplies neither creator content nor any role, membership or admission permission.

Game Design commits the completed creation and creator qualification atomically, binding the same original authorization UUID and digest. At its own bootstrap commit, Account authenticates exact committed Game Design creation/qualification readback and revalidates the current actor, target and applicable sources. Each participant's definitive commit or abort readback binds the complete original operation and outcome. Account's authorization/source ordering remains unresolved until both exact outcomes settle; source-change races and uncertain outcomes retain the fence. No usable administrator, content or admission capability is exposed before its required positive outcomes are proved. No database transaction is held across owner RPCs, and neither expiry nor an absent result proves an abort.

Recovery reads the original immutable results and never remints permission or reopens a settled authorization. If an earlier creation authorization finalized without covering bootstrap, it is historical provenance only: bootstrap requires a separately fresh, currently authorized operation. The original creation and qualification remain unchanged. Concrete producer, authenticated transport, automatic recovery and source-change concurrency proof remain required before this family can be used; [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md) tracks those implementation gates.

### Account-Owned Hosted Terms and Creator Party

Account is the sole target authority for the identified hosted Creator Party, operator/legal-party and terms-version catalog, and acceptance/currentness evidence under [ADR 0180](../../decisions/adr-0180-account-owned-hosted-terms-acceptance-gate.md). Acceptance is an explicit party-level decision for an identified operator and hosted-terms scope; tenant roles, billing ownership, payment, caller-supplied fields, or a copied Game Design flag do not establish party, signer, or acceptance authority. Organization and other unsupported party/signer paths remain disabled until their target contract is implemented and reviewed.
Expand Down Expand Up @@ -220,14 +228,16 @@ The stored receipt and event must be read back exactly before success, including

### Account-Owned Account Source Readback

Account's owner-local source readback selects one exact canonical Account UUID, locks its persisted identity/credential row and Account source generation/issuance-fence rows in producer order, and holds those locks through the complete current and selected historical read. It does not enroll missing authority. The current snapshot binds the exact Account source scope, positive generation/source version, actual local issuance fence, derived stream and latest checkpoint/event. Sequence zero requires the original positive 1/1 source baseline and proved absence of committed stream history; event identity, digest and payload are absent at zero. A positive checkpoint must match the exact latest closed [password-reset](../../system-architecture-authentication.md#account-password-reset-source-event), [logout-all](../../system-architecture-authentication.md#account-logout-all-source-event), or [security-state](../../system-architecture-authentication.md#account-security-state-source-event) event and its immutable operation receipt. Security-state producer, receipt storage and current/historical reader integration remain unimplemented prerequisites; declaring its schema does not enable that path. Unsupported event types or contradictory source, receipt or checkpoint content fail closed.
Account's owner-local source readback selects one exact canonical Account UUID, locks its persisted identity/credential row and Account source generation/issuance-fence rows in producer order, and holds those locks through the complete current and selected historical read. It does not enroll missing authority. The current snapshot binds the exact Account source scope, positive generation/source version, actual local issuance fence, derived stream and latest checkpoint/event. Sequence zero requires the original positive 1/1 source baseline and proved absence of committed stream history; event identity, digest and payload are absent at zero. A positive checkpoint must match the exact latest closed [password-reset](../../system-architecture-authentication.md#account-password-reset-source-event), [logout-all](../../system-architecture-authentication.md#account-logout-all-source-event), or [security-state](../../system-architecture-authentication.md#account-security-state-source-event) event and its immutable operation receipt. Security-state receipt/readback does not itself implement the authenticated mutation producer or activate a runtime path; implementation and executed proof are recorded in [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md). Unsupported event types or contradictory source, receipt or checkpoint content fail closed.

A historical selector is a positive outbox sequence in that exact Account stream. Readback returns the unchanged requested event together with the current source snapshot, validates its complete canonical payload/digest and immutable receipt binding, and rejects missing, cross-scope or ahead-of-current evidence. A later password reset does not erase the prior reset source event or make its old verifier current authority: historical source validation proves the original receipt, while password-reset operation recovery still requires its original current-password postcondition and deadline. Source readback cannot recover a superseded password-reset result, return credentials, supply recipient authorization, or substitute for the complete Account evidence bundle. The source snapshot carries no password verifier or private operation receipt. Authentication, transport, event delivery, projection consumption and live activation are separate proof obligations; an owner-local reader alone enables none of them.

### Account-Owned Security-State Operation and Readback

The closed source payload and digest are owned by [Authentication's Account security-state source event](../../system-architecture-authentication.md#account-security-state-source-event). This is an Account-owned operation contract, not a new public mutation route or a permission grant. Its producer remains unimplemented at this boundary. Account claims a stable original operation UUID before changing state and retains the exact authenticated caller/workload binding, canonical Account UUID and independently verified numeric association, request-digest version and digest, expected source state, and complete credential-free before/after images in immutable operation evidence. A retry must reuse that original identity; a newly generated repository-save identity cannot recover an ambiguous earlier commit. Global roles must be read from the actual Account-owned grant/source under [ADR 0185](../../decisions/adr-0185-account-owned-global-role-administration-and-bootstrap.md), not inferred from `accounts.role`. The existing fresh-empty source reader proves only qualifying fresh empty authority; unsupported retained or mutated global-role sources remain denied until their owning source readback exists.

The private `firemud/account/security-state/request/v1` digest uses SHA-256 over unsigned 32-bit big-endian byte-length-framed fields in this exact order: domain, original request UUID, canonical Account UUID, canonical caller-correlation bytes, original expected Account generation, original expected source version, changed-family count, each sorted changed-family name, and canonical complete desired-state bytes. Counters and cardinality use canonical decimal strings. Caller correlation is a closed `account-security-state-caller-correlation/v1` object containing only that schema version, canonical non-nil `actorAccountUuid`, canonical non-nil `ownerOperationId`, and `ownerEvidenceDigest` (`sha256:` plus 64 lowercase hexadecimal digits). It identifies separately retained genuine owner authorization evidence; neither its shape nor its digest authenticates a caller. The mutation owner must verify the original evidence, exact caller/workload and current authorization independently. Do not include passwords, password verifiers, raw tokens or OTPs in this correlation or request preimage.

Under the existing Account owner transaction and lock order, the producer compares the exact before/after images and requires the event's changed-family set to equal every supported changed family, with no omissions, additions or duplicates. One operation changing several supported families still advances the Account generation/source version and applicable local issuance fence once and appends one source event/checkpoint. It commits the row/source changes, immutable request/result receipt and outbox evidence together; a failed claim, source comparison, counter overflow, append or readback rolls them all back. A password change must use the unchanged password-reset owner operation, event and receipt; generic password-hash comparison does not authorize or synthesize it. Unsupported mixed-password mutations are denied until that real owner operation is composed. Logout-all retains its separate operation and exact lifecycle retry semantics.

The immutable committed receipt binds the original operation/caller/request digest, exact Account association, credential-free before/after images and detected family set to the committed event ID, complete canonical event bytes/digest, exact stream/sequence, generation/source version and actual private local fence result. SQL uniqueness and immutability protect the original operation identity and stream checkpoint. Before success, owner readback independently compares the complete claimed request/result and receipt, request-indexed and sequence-indexed outbox event, committed source/checkpoint and current owner state. Exact retry first reads and verifies the original receipt/event without another state update, generation/fence advance or append; changed caller, target, digest, state or family bindings conflict. A later owner advance preserves the original committed result and bytes. Historical validation proves the unchanged receipt/event and rejects history ahead of the current source; it does not demand that historical post-state remain current, return credentials, authorize the current caller or replace the separate complete Account evidence bundle. Current source readback must bind the latest supported event and receipt to the current same-snapshot owner state. Missing, contradictory or unsupported evidence fails closed. Codec vectors alone establish neither operation persistence nor producer, projection, authenticated handoff or runtime activation proof.
Expand Down
Loading
Loading