Skip to main content

install_access

Function install_access 

Source
pub async fn install_access(
    session: &Session,
    specs: &[AgentSpec],
    access: &BedrockAccess,
) -> Result<(), Error>
Expand description

Places the provisioning files and hands /workspace to the agent uid (AGENT-5).

The daemon writes every upload as root, so the chown is not optional and it runs as root, after the uploads, in one exec. Root is asked for as uid 0 rather than by naming no user, because an image that sets AGENTD_DEFAULT_USER runs a start that names no user as that user, and the chown would fail as anyone else. Re-runnable: a second call with a fresh token overwrites the same files, which is how a 12-hour token is refreshed on a long-lived VM (AGENT-8).