Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,18 @@ 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) or [logout-all](../../system-architecture-authentication.md#account-logout-all-source-event) event and its immutable operation receipt. 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 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.

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.

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.

### Account-Owned Issuer Authority Advance and Readback

An issuer authority operation binds the exact configured Account `issuerId`, a caller-retained canonical non-nil UUID `requestId`, and the expected positive persisted generation and source version. Its operation identity is the exact `{issuerId, requestId}` pair; requests for another issuer are rejected, not redirected or normalized. One successful operation compare-and-advances both counters by one and commits the [issuer generation source event](../../system-architecture-authentication.md#issuer-generation-source-event) and outbox checkpoint atomically. Its stable event ID is `account-issuer-authority-event-v1:<requestId>`; its complete immutable event binds the resulting counters, exact issuer scope and sequence. There is no individual Account selector or issuance fence. Missing, contradictory, stale or overflowed source evidence fails closed before reporting success; this operation does not enroll missing authority or rotate JWT keys.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,18 @@ Token refresh, replacement, generation, revocation, fencing, and logout are cano

Game Session orchestrates binding-refresh installation and reconciliation through Account-owned operations; it never writes Account-owned registry or authority state. Current runtime still uses the legacy Account session keys rather than the target issued-token registry, so the target refresh, replacement, fencing, and logout proof remains unavailable.

### Exact Control-UI Issuance Recovery

Ordinary `POST /auth/login` uses the crash-safe registry-backed issuance protocol in [ADR 0014](../../decisions/adr-0014-phased-jwt-signing-key-rotation-and-readiness.md#crash-safe-issuance-and-registry-projection). Its ingress and callers retain a stable high-entropy `requestId` for that issuance operation. This identifier belongs to durable operation identity, not an additional JWT claim, and the existing login response shape is unchanged. The semantic request digest identifies issuance semantics, not the supplied credential: Account must not retain a plaintext password, OTP, or fast credential digest to identify an exact retry.

The existing Account response-envelope ring uses a distinct `control-ui-response` AEAD key and versioned targetless operation binding. It binds the exact Account subject, operation and request identities, token profile and audience, semantic request digest, original committed token and response hashes, complete applicable authority/fence/generation evidence, and original expiry. It contains no invented tenant, connect scope, Gateway context, or private-delegation binding. A key for another envelope purpose cannot decrypt this response. Provisioning, rotation, authenticated materialization/readback, and evidence-based decrypt-only key retirement remain owned by [Environment and Secrets](../../infrastructure/environment-and-secrets-overview.md#account-ring-materializer-target-cluster-binding); local encryption does not satisfy those delivery gates.

Every recovery authenticates a currently valid credential for the same Account at the required authentication strength, then proves the exact durable operation is `COMMITTED`, its original issued-token registry record is active and exact, current authority and issuance fences still match, and the original result remains unexpired. A valid password or newly valid eligible OTP may establish fresh authentication; a consumed or expired original OTP cannot. Historical authentication evidence alone is insufficient. Changed issuance semantics conflict under the retained request identity rather than causing a new issuance.

Only after those checks may Account return the original encrypted response bytes. It never remints a token, extends expiry, resets issuance time, relabels a delegation token, or treats recovery as tenant/gameplay admission. Missing custody or currentness, wrong key/purpose/binding, conflicting operation evidence, and revoked or expired registry state fail closed. Confidential response retention is bounded by its documented recovery horizon, no later than original token expiry; immutable non-secret operation evidence and the existing safe key-retirement proof remain separate.

The unmerged creator-route components do not yet implement this producer or recovery path. Lost-response/restart, fresh-credential exact recovery, consumed-OTP denial, cross-Account and conflicting-request denial, expiry/revocation/currentness, and wrong-key/purpose/binding proof remain required before activation; detailed implementation status belongs to [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md#current-status).

## Membership and Entitlement Authority

Billing-safe mutation authority contract:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ The candidate read-only method is `TenantIdentityService.ResolveFreshTenantCreat

The focused proof boundary is an owner database producer/readback test that verifies atomic row+operation commit, exact retry, changed-input/source conflict with no second row or mutation, persisted digest recomputation, immutable operation/source/receipt readback, plus RPC positive exact-Account-peer and negative wrong/missing-peer tests. [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md) owns exact-head execution evidence and incident history. Account must separately persist its UUID-keyed identity association before membership work, as required by [Multi-Tenancy](../../system-architecture-multi-tenancy.md#canonical-identity-and-retained-key-bridge); this owner proof creates no numeric alias. Neither unit tests nor database component execution substitutes for live workload authentication, a protected product creator, or a complete runtime admission handoff.

### Fresh tenant creation initiator qualification

The original `FreshTenantCreationEvidence/v1` and both creation digests above establish tenant identity, not creator authority. Preserve their exact bytes and digests. A fresh creator-qualified operation additionally records a distinct `FreshTenantCreatorEvidence/v1`: the complete original creation evidence, canonical initiating Account UUID, exact Account-owned creation-authorization operation UUID and digest, and its own qualification digest. Game Design stores both evidence classes atomically with the newly issued tenant; an unqualified existing operation cannot acquire a creator qualification afterward. Changed creator, authorization identity/digest or original creation input conflicts before mutation. Exact retries independently read back the original source and qualification. Private source keys remain provenance, never Account identity or permission.

The qualification digest uses the same strict UTF-8 decimal-byte-length framing as the original creation digests. Its fixed-order segments are `game-design-tenant-creator-qualification/v1`, qualification schema version `1`, original creation schema version, namespace, creation-request UUID, original operation UUID, original request digest, canonical tenant UUID, positive decimal source game row ID, exact source tenant key, provenance kind, original evidence digest, initiating Account UUID, Account authorization operation UUID and Account authorization digest. All fields are mandatory; a valid digest binds evidence but does not authenticate its producer or authorize a creator.

`TenantIdentityService.ResolveFreshTenantCreatorQualification` is a separate Account-only, same-namespace verified-mTLS read. Its closed request binds a distinct canonical `read_request_id`, the original creation request and expected request/evidence digests, the initiating Account, authorization operation/digest and expected qualification digest. Its closed response echoes the read identity and returns the complete unchanged creation evidence and distinct qualification. The receiver rejects unknown fields and authenticated forwarded caller context before owner access, compares every requested binding and both recomputed digests, and denies missing or contradictory qualification. The Account consumer authenticates Game Design and repeats those complete checks. Only this exact method is exempted from JWT interception; the workload guard remains mandatory. Existing source-only creation and authored-world source reads retain their contracts.

The [Account tenant-role owner contract](../account-service/api-contracts.md#account-owned-tenant-role-administration) governs the resulting control-only first-administrator transition. Qualification storage or successful readback is not the protected Account creation-authorization producer, role bootstrap, hosted-terms acceptance or gameplay admission. These implementation and proof gaps remain in [Player Access and Session](../../../project-management/implementation-tracking/player-access-and-session.md); public creation and creator authorization remain unavailable until their owner prerequisites are proved.

## Official Hosted Creator Mutation Gate

For official hosted deployments, every creator-intent content-bearing mutation enters the Game Design boundary only after the Account-owned currentness/evidence authority in [Account Service API Contracts](../account-service/api-contracts.md#account-owned-hosted-terms-and-creator-party) has been evaluated for the tenant's Creator Party, identified operator, and hosted-terms scope under [ADR 0180](../../decisions/adr-0180-account-owned-hosted-terms-acceptance-gate.md). This applies before the first persisted Draft and before later authoring/revision, asset, template, plugin, and publication writes. The acting account's current tenant authorization is a separate conjunct; Gateway/UI checks are advisory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This document defines the Game Logic Service REST and gRPC surfaces, exposure cl

- The current Game Logic adapters still return `shared.v1.ErrorDetail` for many failures and record `grpc.app_error`; that is implementation drift and a migration/proof gap, not a second contract.
- Causal-read status is target-only: the complete `CausalReadFence` and participant-proof enforcement described below are not current behavior. The live `ResolveLook` request/proto and World/Entity adapters remain floor-free, so protobuf propagation, adapter evidence, and focused causal-floor proof are implementation gaps.
- The publish-gate digest handler enforces the distinct workload/method authorization and exact Game Design publication binding implemented by `PublicationReadGuard` and `PublicationDigestRequestBinding` (tenant, version scope, stable publish request, derived workflow identity, and request digest), with focused denial and response-scope checks. For a full-version request, the owner digest fails closed because Game Logic has no owner-local manifest and provenance sufficient to attest the version's rule inputs; it does not attest those inputs as an empty manifest. End-to-end full-version publication therefore remains blocked. The target workload, tenant/scope/request/workflow/digest context, exact response identity comparison, and denial proof are canonical in [Game Design Version Control](../game-design-service/version-control.md#owner-to-owner-digest-authorization-and-tenant-identity).
- The publish-gate digest handler enforces the distinct workload/method authorization and exact Game Design publication binding implemented by `PublicationReadGuard` and `PublicationDigestRequestBinding` (tenant, version scope, stable publish request, derived workflow identity, and request digest), with focused denial and response-scope checks. Game Logic now stores one explicit fresh-Version empty rule manifest, but the apply service is unregistered and default-denied without an authenticated current-source and Account commit-authority verifier. The protected `GetDraftDesignDigest` method remains fail-closed and does not read test-created or owner-internal rows as publication authority. Full-version publication therefore remains blocked. The target workload, tenant/scope/request/workflow/digest context, exact response identity comparison, and denial proof are canonical in [Game Design Version Control](../game-design-service/version-control.md#owner-to-owner-digest-authorization-and-tenant-identity); the owner manifest and digest semantics are defined in [Runtime and Data](runtime-and-data.md#fresh-version-explicit-empty-rule-input-manifest).

### Player execution context

Expand Down
Loading
Loading