Skip to content
Merged
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 @@ -6,7 +6,7 @@ Accepted

## Implementation Status

Kubernetes Secret mounts, cert-manager examples, expected-binding preflight, and secret-compliance evidence exist, but the repository does not satisfy the complete target. Base manifests mount JWT signing material beyond Account, gRPC workloads commonly share one TLS Secret, and production Secret encryption-at-rest/audit proof plus automated rotation/convergence remain incomplete. Hosted preview/dev-demo Helm currently uses the shared `firemud-grpc-tls` Secret across gRPC workloads; that proves encrypted transport only, not target per-workload identity or player-facing equivalence. The target remains distinct leaf Secrets per workload with a shared CA, with generic per-workload identity preflight proof still unimplemented.
Kubernetes Secret mounts, cert-manager examples, expected-binding preflight, and secret-compliance evidence exist, but the repository does not satisfy the complete target. Base manifests still mount JWT signing material beyond Account, three of the eleven hosted gRPC workloads still use shared leaf material, and production Secret encryption-at-rest/audit proof plus automated rotation/convergence remain incomplete. Hosted preview/dev-demo Helm now defines eight distinct gRPC workload leaf Secrets: five publication workloads plus Account, Game Session, and Social Groups. The shared `firemud-grpc-tls` Secret remains for the common CA trust bundle and the three remaining shared-leaf workloads. Static render and controller-contract proof covers the eight distinct workload bindings and their readiness evidence; live certificate issuance, served-identity convergence, and production-promotion proof remain incomplete. The target remains distinct leaf Secrets for every workload with a shared CA.

## Decision Record

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ The controller establishes identity scope only through its one-time bootstrap/ad

### Runtime-first activation and explicit retirement

Runtime namespaces remain clean and disposable. A trusted lifecycle may reclaim, redeploy, release, or let a lease expire on the runtime namespace while retaining the active identity namespace. Runtime preparation creates or reuses the exact `pr-<PR_NUMBER>` or `dev` namespace, records the requested reviewed head and image, and allocates the bounded Telnet port. The trusted requester then applies `Active`, and the runtime lane waits for all five labeled, key-complete Secret projections defined by the [deployment-environment contract](../infrastructure/deployment-environments.md) before application preflight, server dry-run, and deploy. Only successful deployment may record the separate deployed-head evidence consumed by readiness. A failed or incomplete identity projection blocks runtime deployment, while a failed deployment cannot make the request appear deployed.
Runtime namespaces remain clean and disposable. A trusted lifecycle may reclaim, redeploy, release, or let a lease expire on the runtime namespace while retaining the active identity namespace. Runtime preparation creates or reuses the exact `pr-<PR_NUMBER>` or `dev` namespace, records the requested reviewed head and image, and allocates the bounded Telnet port. The trusted requester then applies `Active`, and the runtime lane waits for all thirteen labeled, key-complete Secret projections defined by the [deployment-environment contract](../infrastructure/deployment-environments.md)—five shared-role projections and eight distinct gRPC workload projections—before application preflight, server dry-run, and deploy. Only successful deployment may record the separate deployed-head evidence consumed by readiness. A failed or incomplete identity projection blocks runtime deployment, while a failed deployment cannot make the request appear deployed.

A PR close or merge follows a runtime-first path: it requests `Retired` only after runtime cleanup has observed the exact runtime Namespace `NotFound` result, so that path gives the controller no live runtime to shut down. A trusted explicit identity-removal request for a live runtime follows a retirement-first path: it may set `Retired` while the runtime still exists, after which the controller must terminate Gateway and TCP Proxy and observe both bridge workloads at zero before the trusted runtime lifecycle deletes the namespace and proves exact `NotFound`. Retained identity deletion remains blocked until that runtime absence proof. Before deleting retained material, the controller accounts for all five declared projection roles: (1) [public ingress TLS](../system-architecture-security.md#tls-termination-for-gateway), (2) [public Telnet TLS](../system-architecture-protocol-bridging.md#public-telnet-tls-modes), (3) the [Gateway internal WebSocket server](../system-architecture-security.md#tls-config-matrix-tcp-proxy-spring-cloud-gateway-websocket), (4) the [TCP Proxy bridge client](../system-architecture-security.md#tls-config-matrix-tcp-proxy-spring-cloud-gateway-websocket), and (5) the [shared gRPC transport bundle](./adr-0038-explicit-jwt-profiles-and-mtls-workload-identity.md#mtls-identity-and-certificate-lifecycle). Runtime cleanup and identity retirement remain separate operations. If the provider or lifecycle API cannot reliably establish the requested lifecycle state, the safe result is to retain identity, report the lifecycle as incomplete or uncertain, and fail closed; an uncertain response never triggers broader deletion.
A PR close or merge follows a runtime-first path: it requests `Retired` only after runtime cleanup has observed the exact runtime Namespace `NotFound` result, so that path gives the controller no live runtime to shut down. A trusted explicit identity-removal request for a live runtime follows a retirement-first path: it may set `Retired` while the runtime still exists, after which the controller must terminate Gateway and TCP Proxy and observe both bridge workloads at zero before the trusted runtime lifecycle deletes the namespace and proves exact `NotFound`. Retained identity deletion remains blocked until that runtime absence proof. Before deleting retained material, the controller accounts for all thirteen declared projections: the five shared-role projections for (1) [public ingress TLS](../system-architecture-security.md#tls-termination-for-gateway), (2) [public Telnet TLS](../system-architecture-protocol-bridging.md#public-telnet-tls-modes), (3) the [Gateway internal WebSocket server](../system-architecture-security.md#tls-config-matrix-tcp-proxy-spring-cloud-gateway-websocket), (4) the [TCP Proxy bridge client](../system-architecture-security.md#tls-config-matrix-tcp-proxy-spring-cloud-gateway-websocket), and (5) the [shared gRPC transport bundle](./adr-0038-explicit-jwt-profiles-and-mtls-workload-identity.md#mtls-identity-and-certificate-lifecycle), plus eight distinct gRPC workload projections for the five publication services, Account, Game Session, and Social Groups. Runtime cleanup and identity retirement remain separate operations. If the provider or lifecycle API cannot reliably establish the requested lifecycle state, the safe result is to retain identity, report the lifecycle as incomplete or uncertain, and fail closed; an uncertain response never triggers broader deletion.

If retirement observes a live runtime profile that differs from the profile already recorded in controller status, it reports `RuntimeIdentityChanged`, preserves the previously observed profile, and never refreshes retirement authority from the mismatched live values. Recovery belongs to the trusted lifecycle: it removes the whole disposable runtime namespace and obtains the runtime-first exact `NotFound` proof. A later retirement reconcile can then continue deleting the retained identity through the normal ownership-checked path. This recovery does not permit manual deletion of retained identity material and does not weaken the live-runtime bridge-shutdown or runtime-absence gates.

Expand All @@ -53,7 +53,7 @@ All controller-owned certificate leaves use RSA-2048 keys. The cert-manager reso

### Generation-bound readiness and certificate convergence

The controller publishes non-secret status only. A `Ready=True` result is valid only when `status.observedGeneration` equals `metadata.generation`, the live runtime namespace UID and requested head SHA match the status profile, a separately recorded post-deployment head equals that request after canonical 40-hex normalization, rollout and served proofs have converged, and non-empty ingress, Telnet, Gateway-internal WebSocket, TCP Proxy bridge, and gRPC revisions are present. PR preview and dev-demo preparation write only their distinct requested-head annotations; only a successful runtime deployment writes the corresponding deployed-head annotation. The workflow treats `Pending`, `Provisioning`, `WaitingForCertificate`, `RuntimeAbsent`, `Syncing`, `Verifying`, `Degraded`, `Blocked`, `Retiring`, and `Retired` as non-ready and uses the Ready condition's reason/message for failure detail.
The controller publishes non-secret status only. A `Ready=True` result is valid only when `status.observedGeneration` equals `metadata.generation`, the live runtime namespace UID and requested head SHA match the status profile, a separately recorded post-deployment head equals that request after canonical 40-hex normalization, rollout and served proofs have converged, and non-empty revisions are present for the five shared roles and eight distinct gRPC workload roles. Account, Game Session, and Social Groups must additionally serve their current projected leaves at the fixed gRPC endpoints; rollout counters alone are insufficient. PR preview and dev-demo preparation write only their distinct requested-head annotations; only a successful runtime deployment writes the corresponding deployed-head annotation. The workflow treats `Pending`, `Provisioning`, `WaitingForCertificate`, `RuntimeAbsent`, `Syncing`, `Verifying`, `Degraded`, `Blocked`, `Retiring`, and `Retired` as non-ready and uses the Ready condition's reason/message for failure detail.

Certificate issuance and replacement for one identity proceed through a serialized lifecycle. The controller and issuer path validate actual served certificates and keys, including validity, required SANs, key correspondence without exposing private material, expected issuer and trust chain, monotonic identity generation, and distinct SPKI for intentional replacement. After issuance, affected ingress, Telnet, and, where applicable, gRPC consumers must reload or restart and serve or accept the new identity. A consumer that has not converged leaves the lifecycle failed or pending and does not authorize removal of the prior usable identity solely because a new resource exists.

Expand Down
Loading
Loading