@@ -26,7 +26,7 @@ pub enum Principal {
2626 User ( UserPrincipal ) ,
2727 /// Sandbox supervisor authenticated by an identity bound to a specific
2828 /// sandbox UUID. The wrapped `sandbox_id` MUST match any sandbox referenced
29- /// in the request body for sandbox-class methods (PR-4 guard) .
29+ /// in the request body for sandbox-class methods.
3030 Sandbox ( #[ allow( dead_code) ] SandboxPrincipal ) ,
3131 /// Truly unauthenticated caller (health probes, reflection). Sandbox-class
3232 /// and user-class methods reject this variant.
@@ -43,17 +43,14 @@ pub struct UserPrincipal {
4343
4444/// Sandbox caller — bound to one specific sandbox UUID.
4545///
46- /// `sandbox_id` and `source` are consumed by the PR-4 handler guard; until
47- /// then they only exist in the type so the trait shape is stable across the
48- /// PR series.
46+ /// `sandbox_id` and `source` are consumed by the router and handler guards.
4947#[ derive( Debug , Clone ) ]
5048#[ allow( dead_code) ]
5149pub struct SandboxPrincipal {
52- /// Canonical sandbox UUID. Empty string only for the PR-1 legacy marker;
53- /// PR 2 onwards always populates this from a verified credential.
50+ /// Canonical sandbox UUID populated from a verified sandbox credential.
5451 pub sandbox_id : String ,
55- /// How this principal was verified — used for audit logs and to gate the
56- /// PR-4 IDOR check against unverified sources .
52+ /// How this principal was verified — used for audit logs and method-specific
53+ /// authorization checks .
5754 pub source : SandboxIdentitySource ,
5855 /// SPIFFE trust domain. Populated when the credential is SPIFFE-shaped;
5956 /// reserved for future per-sandbox cert / SPIRE authenticators.
@@ -63,18 +60,17 @@ pub struct SandboxPrincipal {
6360/// How a [`SandboxPrincipal`] was authenticated.
6461///
6562/// Variant fields are populated by the producing authenticator and consumed
66- /// by audit logging + the PR-4 IDOR guard. Until PR 4 lands those readers
67- /// they look unused to the dead-code lint.
63+ /// by audit logging and method-specific authorization checks.
6864#[ derive( Debug , Clone ) ]
6965#[ allow( dead_code) ]
7066pub enum SandboxIdentitySource {
7167 /// Gateway-minted JWT validated against the gateway's signing key.
7268 /// Produced by [`super::sandbox_jwt::SandboxJwtAuthenticator`].
7369 BootstrapJwt { issuer : String } ,
74- /// Per-sandbox client certificate. Reserved for the v2 channel-bound
75- /// identity follow-up .
70+ /// Per-sandbox client certificate. Reserved for channel-bound sandbox
71+ /// identity.
7672 BootstrapCert { fingerprint : String } ,
77- /// SPIRE-issued SVID. Reserved for the SPIFFE/SPIRE follow-up .
73+ /// SPIRE-issued SVID. Reserved for SPIFFE/SPIRE sandbox identity .
7874 SpiffeSvid { spiffe_id : String } ,
7975 /// K8s `ServiceAccount` token used to bootstrap a gateway-minted JWT
8076 /// via `IssueSandboxToken`. Populated only on that one RPC path.
0 commit comments