pub struct Session<'a> {
pub keys: &'a [KeypairEntry],
pub scope: &'a AgentScope,
pub confirmer: &'a dyn Confirmer,
pub audit: &'a dyn AuditSink,
pub clock: &'a dyn Clock,
pub confirm_timeout: Duration,
pub requesting_process: Option<String>,
}Expand description
Everything the session needs from the face: the custodied keys, the agent’s scope, the confirmation broker, the audit sink, the clock, and the confirmation timeout. All behind traits so tests inject mocks.
Fields§
§keys: &'a [KeypairEntry]The keys this agent may offer/sign with (already filtered to those with a private half).
scope: &'a AgentScopeThe agent’s capability scope (I13).
confirmer: &'a dyn ConfirmerThe per-signature confirmation broker (biometric / file fallback).
audit: &'a dyn AuditSinkThe append-only audit sink (I12).
clock: &'a dyn ClockThe clock for audit timestamps.
confirm_timeout: DurationHow long a high/prod confirmation may block before failing safe.
requesting_process: Option<String>The observed requesting process, for the I16 prompt line (set by the
face from kovra_wrapper::observe_parent()); None when unobserved.
Implementations§
Source§impl Session<'_>
impl Session<'_>
Sourcepub fn handle(&self, request: &Request) -> Result<Vec<u8>, AgentError>
pub fn handle(&self, request: &Request) -> Result<Vec<u8>, AgentError>
Handle one parsed request, returning the response body (ready to be
framed by the daemon). All policy faults map to SSH_AGENT_FAILURE; this
function never returns an Err for a protocol-level refusal (the wire
answer carries it). It returns Err only on an audit/IO fault the daemon
should log.