pub struct PolicyService { /* private fields */ }Implementations§
Source§impl PolicyService
impl PolicyService
Sourcepub fn new(
policy_manager: Arc<PolicyManager>,
signing_key: Arc<SigningKey>,
token_config: TokenConfig,
git2db: Arc<RwLock<Git2DB>>,
transport: TransportConfig,
) -> Self
pub fn new( policy_manager: Arc<PolicyManager>, signing_key: Arc<SigningKey>, token_config: TokenConfig, git2db: Arc<RwLock<Git2DB>>, transport: TransportConfig, ) -> Self
Create a new policy service with infrastructure
Sourcepub fn with_primary_enrollment_resolver(
self,
resolver: Arc<dyn PrimaryEnrollmentResolver>,
) -> Self
pub fn with_primary_enrollment_resolver( self, resolver: Arc<dyn PrimaryEnrollmentResolver>, ) -> Self
Install the fail-closed authoritative primary-enrollment resolver (WS-C’s
enrollment store) used to confirm a user/classical source credential’s
cnf. Without it, user primaries deny.
Install the fail-closed delegation-edge authorizer (WS-E’s reviewed
DispatchCallManifest). Without it, exchangeDelegated denies every
edge — the end-state default, never a bypass.
Sourcepub fn with_revocation_max_ttl_secs(self, secs: i64) -> Self
pub fn with_revocation_max_ttl_secs(self, secs: i64) -> Self
Set the revocation-publication horizon. The service factory computes this as max(every configured issuance maximum) plus a clock-skew margin, so an operator raising token TTLs automatically raises the authority’s retention horizon — issuance and revocation horizons are bound by construction rather than by a shared default.
Sourcepub fn with_delegated_resource_audiences(self, mcp: String, oai: String) -> Self
pub fn with_delegated_resource_audiences(self, mcp: String, oai: String) -> Self
Install exact MCP and OpenAI resource audiences for verified delegated Policy.check requests. No setting means native issuer audience only.
Sourcepub fn with_default_audience(self, audience: String) -> Self
pub fn with_default_audience(self, audience: String) -> Self
Set the default audience for issued tokens (typically the OAuth issuer URL).
Sourcepub fn with_token_clearance_resolver(
self,
resolver: Arc<dyn Fn(&str) -> Option<SecurityLabel> + Send + Sync>,
) -> Self
pub fn with_token_clearance_resolver( self, resolver: Arc<dyn Fn(&str) -> Option<SecurityLabel> + Send + Sync>, ) -> Self
Override enrollment lookup for an isolated service fixture.
Sourcepub fn with_jwt_key_source(self, src: Arc<dyn JwtKeySource>) -> Self
pub fn with_jwt_key_source(self, src: Arc<dyn JwtKeySource>) -> Self
Set the JWT key source for verifying JWTs (local and federated).
Sourcepub fn with_es256_key_store(self, store: Arc<Es256SigningKeyStore>) -> Self
pub fn with_es256_key_store(self, store: Arc<Es256SigningKeyStore>) -> Self
Attach the ES256 (P-256) key rotation store.
Sourcepub fn with_ml_dsa_key_store(self, store: Arc<MlDsaSigningKeyStore>) -> Self
pub fn with_ml_dsa_key_store(self, store: Arc<MlDsaSigningKeyStore>) -> Self
Attach the ML-DSA-65 key rotation store for composite token issuance.
Trait Implementations§
Source§impl PolicyHandler for PolicyService
impl PolicyHandler for PolicyService
Source§fn handle_register_event_prefix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RegisterEventPrefix,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_register_event_prefix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RegisterEventPrefix,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Publisher registers a topic prefix. No group key stored here — publisher holds it.
Source§fn handle_subscribe_event_prefix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 SubscribeEventPrefix,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_subscribe_event_prefix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 SubscribeEventPrefix,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Subscriber requests access. Checks scope, stores subscriber pubkey, returns publisher pubkey + any pre-wrapped key blob.
Source§fn handle_get_pending_subscribers<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 GetPendingSubscribers,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_pending_subscribers<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 GetPendingSubscribers,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Publisher fetches new subscriber pubkeys that need wrapping.
Source§fn handle_deposit_wrapped_keys<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 DepositWrappedKeys,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_deposit_wrapped_keys<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 DepositWrappedKeys,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Publisher deposits wrapped group key blobs (opaque to PolicyService).
Source§fn handle_exchange_delegated<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ExchangeDelegated,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_exchange_delegated<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ExchangeDelegated,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
RFC 8693 §4 on-behalf-of delegated mint (v16 §8.1 AsOriginator).
The authenticated RPC caller IS the terminal actor: actor subject, cnf,
and tenant are derived from the verified policy envelope (never from a
request field), and originator/scope/capability/session/clearance are
derived from the authority-verified source credential. The authority
mints a NEW delegated credential — fresh jti, originator sub, nested
terminal act, terminal-actor cnf, fail-closed meet(originator, terminal actor) clearance (the source’s own clearance is already the
prior-hop meet), explicitly-attenuated scope AND capability, a
manifest-bound audience, and conditional sid/workload_session_id
retention — never a bearer relay. The source credential is reusable.
Source§fn handle_revoke_credential<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RevokeCredential,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_revoke_credential<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RevokeCredential,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Publish a credential revocation into the canonical store this service owns. Fail-closed: an uninitialized store or a failed durable write is reported as an error, never as a silent success.
Source§fn handle_check_credential_revocation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 CheckCredentialRevocation,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_check_credential_revocation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 CheckCredentialRevocation,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Answer a revocation check from the canonical store. Fail-closed twice over: a malformed credential ID reports revoked, and an uninitialized store reports revoked — a credential whose status cannot be checked is never reported live.
Source§fn handle_register_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RegisterSession,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_register_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RegisterSession,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Register a session with the canonical registry this service owns. Fail-closed: a malformed record, an out-of-horizon expiry, an uninitialized registry, or a failed durable write is an error, never a silent success. Issuance callers own the session lifecycle; the registry never mints session IDs.
Source§fn handle_revoke_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RevokeSession,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_revoke_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RevokeSession,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Revoke a session: every credential carrying it is then rejected. Fail-closed: an uninitialized registry or a failed durable write is an error, never a silent success.
Source§fn handle_check_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 CheckSession,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_check_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 CheckSession,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Answer a session check from the canonical registry. True means ACTIVE and known; revoked, expired, unknown, malformed, or an uninitialized registry all read false — a session whose state cannot be checked is never reported active.
Source§fn handle_prepare_federate_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 PrepareFederateSession,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_prepare_federate_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 PrepareFederateSession,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
prepareFederateSession request.Source§fn handle_commit_federate_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 CommitFederateSession,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_commit_federate_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 CommitFederateSession,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
commitFederateSession request.Source§fn handle_admit_federate_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 AdmitFederateRequest,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_admit_federate_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 AdmitFederateRequest,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
admitFederateRequest request.Source§fn handle_resolve_session_primary<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ResolveSessionPrimary,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_resolve_session_primary<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ResolveSessionPrimary,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
resolveSessionPrimary request.Source§fn handle_check_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 PolicyCheckBatch,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_check_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
request_id: u64,
data: &'life2 PolicyCheckBatch,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
checkBatch request.Source§fn handle_check_mediated<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 MediatedPolicyCheck,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_check_mediated<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 MediatedPolicyCheck,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
checkMediated request.Source§fn handle_check<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 PolicyCheck,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_check<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 PolicyCheck,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
check request.Source§fn handle_issue_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 IssueToken,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_issue_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 IssueToken,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
issueToken request.Source§fn handle_list_scopes<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_list_scopes<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
listScopes request.Source§fn handle_get_policy<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_get_policy<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
getPolicy request.Source§fn handle_apply_template<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ApplyTemplate,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_apply_template<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ApplyTemplate,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
applyTemplate request.Source§fn handle_apply_draft<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ApplyDraft,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_apply_draft<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ApplyDraft,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
applyDraft request.Source§fn handle_rollback<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RollbackPolicy,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_rollback<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RollbackPolicy,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
rollback request.Source§fn handle_get_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 GetHistory,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 GetHistory,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
getHistory request.Source§fn handle_get_diff<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 GetDiff,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_get_diff<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 GetDiff,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
getDiff request.Source§fn handle_get_draft_status<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_get_draft_status<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
getDraftStatus request.Source§fn handle_add_grouping<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 AddGrouping,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_add_grouping<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 AddGrouping,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
addGrouping request.Source§fn handle_remove_grouping<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RemoveGrouping,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_remove_grouping<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RemoveGrouping,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
removeGrouping request.Source§fn handle_set_branch_visibility<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 SetBranchVisibility,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_set_branch_visibility<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 SetBranchVisibility,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
setBranchVisibility request.Source§fn handle_resolve_service_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ResolveServiceKey,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_resolve_service_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ResolveServiceKey,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
resolveServiceKey request.Source§fn handle_register_service_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RegisterServiceKey,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_register_service_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RegisterServiceKey,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
registerServiceKey request.Source§fn handle_refresh_service_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RefreshServiceTokenRequest,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_refresh_service_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 RefreshServiceTokenRequest,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
refreshServiceToken request.Source§fn handle_exchange_wit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ExchangeWit,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_exchange_wit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
_request_id: u64,
data: &'life2 ExchangeWit,
) -> Pin<Box<dyn Future<Output = Result<PolicyResponseVariant>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
exchangeWit request.Source§impl RequestService for PolicyService
impl RequestService for PolicyService
Source§fn decode_request_body(&self, signed_body: &[u8]) -> Result<DecodedRequestBody>
fn decode_request_body(&self, signed_body: &[u8]) -> Result<DecodedRequestBody>
Source§fn handle_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
body: &'life2 DecodedRequestBody,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, Option<Continuation>)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 EnvelopeContext,
body: &'life2 DecodedRequestBody,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, Option<Continuation>)>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn transport(&self) -> &TransportConfig
fn transport(&self) -> &TransportConfig
Source§fn signing_key(&self) -> SigningKey
fn signing_key(&self) -> SigningKey
Source§fn expected_audience(&self) -> Option<&str>
fn expected_audience(&self) -> Option<&str>
Source§fn delegated_user_audience(
&self,
signer_pubkey: &[u8; 32],
untrusted_aud: Option<&str>,
) -> Option<&str>
fn delegated_user_audience( &self, signer_pubkey: &[u8; 32], untrusted_aud: Option<&str>, ) -> Option<&str>
expected_audience instead.Source§fn accept_delegated_resource_leaf(
&self,
ctx: &EnvelopeContext,
body: &DecodedRequestBody,
) -> bool
fn accept_delegated_resource_leaf( &self, ctx: &EnvelopeContext, body: &DecodedRequestBody, ) -> bool
Source§fn jwt_key_source(&self) -> Option<Arc<dyn JwtKeySource>>
fn jwt_key_source(&self) -> Option<Arc<dyn JwtKeySource>>
Source§fn resolve_key_subject(&self, signer_pubkey: &[u8; 32]) -> Option<Subject>
fn resolve_key_subject(&self, signer_pubkey: &[u8; 32]) -> Option<Subject>
Source§fn cache_key_binding(
&self,
verifying_key: VerifyingKey,
subject: &str,
jwt: &str,
expires_at: i64,
)
fn cache_key_binding( &self, verifying_key: VerifyingKey, subject: &str, jwt: &str, expires_at: i64, )
Source§fn accept_delegated_bearer(&self, signer_pubkey: &[u8; 32]) -> bool
fn accept_delegated_bearer(&self, signer_pubkey: &[u8; 32]) -> bool
Source§fn build_error_payload(&self, request_id: u64, error: &str) -> Vec<u8> ⓘ
fn build_error_payload(&self, request_id: u64, error: &str) -> Vec<u8> ⓘ
Source§fn producer_reach_config_handle(
&self,
) -> Option<Arc<RwLock<RawRwLock, ProducerReachConfig>>>
fn producer_reach_config_handle( &self, ) -> Option<Arc<RwLock<RawRwLock, ProducerReachConfig>>>
Source§fn moq_origin_handle(
&self,
) -> Option<Arc<RwLock<RawRwLock, Option<MoqStreamOrigin>>>>
fn moq_origin_handle( &self, ) -> Option<Arc<RwLock<RawRwLock, Option<MoqStreamOrigin>>>>
Source§fn pq_signing_key(&self) -> Option<SigningKey<MlDsa65>>
fn pq_signing_key(&self) -> Option<SigningKey<MlDsa65>>
None makes process_request fail closed
before dispatch; it never selects an EdDSA-only response. The matching ML-DSA-65 public key
must be anchored in the client’s PQ trust store for Hybrid verification
to succeed (peer attestation). Read moreSource§fn verifying_key(&self) -> VerifyingKey
fn verifying_key(&self) -> VerifyingKey
Source§fn require_cnf_binding(&self) -> bool
fn require_cnf_binding(&self) -> bool
cnf key binding (jwk or jkt). Read moreSource§fn credential_revocation_store(&self) -> Option<&dyn CredentialRevocationStore>
fn credential_revocation_store(&self) -> Option<&dyn CredentialRevocationStore>
Source§fn jwt_verify_policy(&self) -> CryptoPolicy
fn jwt_verify_policy(&self) -> CryptoPolicy
Source§fn accept_deferred_federate_credential(&self) -> bool
fn accept_deferred_federate_credential(&self) -> bool
Source§fn admit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_body: &'life2 DecodedRequestBody,
_proof: &'life3 ParsedProof,
) -> Pin<Box<dyn Future<Output = Result<(VerifiedProof, [u8; 32], String, String, ProofReplayKey, u64), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn admit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_body: &'life2 DecodedRequestBody,
_proof: &'life3 ParsedProof,
) -> Pin<Box<dyn Future<Output = Result<(VerifiedProof, [u8; 32], String, String, ProofReplayKey, u64), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
commit_deferred_federate_request only after those gates pass.Source§fn commit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_resource: &'life2 str,
_operation: &'life3 str,
_replay_key: &'life4 ProofReplayKey,
_replay_expiry: u64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn commit_deferred_federate_request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_resource: &'life2 str,
_operation: &'life3 str,
_replay_key: &'life4 ProofReplayKey,
_replay_expiry: u64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Source§fn verify_internal_work_bearer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_token: &'life2 str,
_protected: &'life3 ProtectedHeader,
) -> Pin<Box<dyn Future<Output = Result<InternalWorkClaims, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn verify_internal_work_bearer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_ctx: &'life1 EnvelopeContext,
_token: &'life2 str,
_protected: &'life3 ProtectedHeader,
) -> Pin<Box<dyn Future<Output = Result<InternalWorkClaims, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
iw+jwt internal execution work order presented as the
direct JWT (single-service Model→Inference boundary, user-approved D5). Read moreAuto Trait Implementations§
impl !Freeze for PolicyService
impl !RefUnwindSafe for PolicyService
impl Send for PolicyService
impl Sync for PolicyService
impl Unpin for PolicyService
impl UnsafeUnpin for PolicyService
impl !UnwindSafe for PolicyService
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request