@@ -226,11 +226,13 @@ conservative operator-managed behavior.
226226Drivers that can verify a platform-native sandbox credential advertise
227227` GetCapabilities.supports_sandbox_authentication ` . On the path-scoped
228228` IssueSandboxToken ` exchange, the gateway forwards the opaque bearer credential
229- to that selected driver through ` AuthenticateSandbox ` . The driver returns only
230- the authenticated sandbox ID. The gateway then verifies that its durable
231- sandbox record exists and mints the gateway JWT. The driver socket is therefore
232- a sandbox-identity trust boundary, but it does not grant user or administrator
233- authority.
229+ to that selected driver through ` AuthenticateSandbox ` . The driver returns the
230+ authenticated sandbox ID and opaque runtime identity. The gateway verifies
231+ that both match its durable sandbox record and returns a generation-bound
232+ session JWT whose lineage is checked on every subsequent sandbox RPC. Legacy
233+ unbound sandbox JWTs are not admitted when session authentication is enabled.
234+ The driver socket is therefore a sandbox-identity trust boundary, but it does
235+ not grant user or administrator authority.
234236
235237## Deletion Lifecycle
236238
@@ -506,19 +508,29 @@ The Kubernetes driver's `AuthenticateSandbox` implementation applies its named
506508 until the first watcher update.
507509
508510It validates the projected token with Kubernetes ` TokenReview ` , checks the live
509- pod UID, and verifies the pod's controlling Sandbox CR UID and sandbox ID before
510- returning the identity to the gateway. These checks rely on an ownership
511- invariant. In shared and managed modes, the Kubernetes driver and its trusted
512- Agent Sandbox controller exclusively administer the sandbox namespace, Sandbox
513- CRs, sandbox pods, and configured sandbox ServiceAccount. Other principals must
514- not create or mutate those resources or use that ServiceAccount. In operator
515- mode, the platform operator retains
516- namespace lifecycle ownership, but must preserve the same exclusive control of
517- Sandbox CRs and the pods and ServiceAccount used for sandbox token bootstrap.
518- An allowlisted namespace is therefore a trust grant, not a tenant isolation
519- boundary. Kubernetes owner references alone do not prove which controller
520- created a pod, so admitting principals that can fabricate that resource chain
521- would allow them to claim an existing sandbox identity.
511+ pod UID, and verifies the pod's controlling Sandbox CR UID and sandbox ID. The
512+ driver returns both the sandbox ID and an opaque runtime identity derived from
513+ the namespace, immutable Sandbox CR UID, and authenticated supervisor Pod UID.
514+ Advertising sandbox authentication includes the runtime-binding contract. The
515+ gateway requires non-empty runtime identities from successful create, start,
516+ and authentication responses. It records the runtime identity when provisioning
517+ succeeds and requires an exact match before issuing a sandbox JWT. If binding
518+ validation or storage fails after a lifecycle call succeeds, the gateway
519+ compensates that call before returning the error. This correlates credential
520+ authentication with the durable runtime record rather than authorizing from the
521+ sandbox ID alone.
522+
523+ ` StartSandbox ` carries the previously recorded opaque identity. Kubernetes
524+ requires exactly one label-selected Sandbox CR and verifies that its namespace
525+ and immutable UID match that identity before replacing the supervisor Pod. The
526+ new Pod UID becomes the updated binding only after the continuity check passes.
527+
528+ Shared and managed modes still reserve the sandbox namespace, Sandbox CRs,
529+ sandbox pods, and configured sandbox ServiceAccount for the Kubernetes driver
530+ and trusted Agent Sandbox controller. In operator mode, the platform operator
531+ retains namespace lifecycle ownership and must preserve the same control of
532+ those resources. An allowlisted namespace is a trust grant, not a tenant
533+ isolation boundary.
522534
523535### Credential Driver Integration
524536
0 commit comments