Skip to main content

verified_agent

Function verified_agent 

Source
pub(crate) fn verified_agent(
    state: &AppState,
    agent_block_id: &str,
    auth: Option<&UiAutomationAuth>,
) -> Result<String, String>
Expand description

The agent an SSH request comes from, proven: its signed identity (UiAutomationAuth, made with its own jekt key, which no other agent holds) verified, and the pane derived from it, never taken from the request. Err unless that pane is agent_block_id: every agent holds srv’s auth key, so a request body alone could name another agent’s pane and borrow its “Always allow”.