Host connector: what a target host needs
- An unprivileged account (
archie) whoseauthorized_keysholds the public half of the machine credential the connector is accepted with. df,du,find,sortandhead(GNU coreutils and findutils).- For lookups to see files the account can't read, run
install.shas root. It installs two helpers under/usr/local/libexec/archieand a sudo rule allowing exactly those, and then set"helpers": trueon the host in the connector'shostssetting. The helpers only read, check every argument, and run fixed commands: sudo can't safely allowduorfindthemselves, sincefindcan delete and execute. - The host's public key, as
ssh-keyscanprints it, in thehostssetting. - The roots lookups may look under, as
pathsin thehostssetting (for example["/tmp", "/var/tmp"]). Lookups run no guards and may read as root, so any path outside them is refused. - For actions, the helpers read two root-owned allow-lists, created empty by
install.sh:/etc/archie/delete-roots(one directory per line;delete_filesas root only reaches directories that resolve into one) and/etc/archie/timers(one unit name per line; the only timersenable_timeranddisable_timercan touch). They repeat the connector's own settings, so a compromised connector can't widen them. Timers need"helpers": true. - Without helpers,
delete_filesruns as the account, which can delete only what it owns or has group access to.set_config_keyalways runs as the account: the file must be a plain file it owns, and the directory writable. - Per-host settings in
hosts:environment(declared on every action's target),disposable(temp and cache directories insidepaths; deleting there is recoverable),timers(unit names) andconfig_files(absolute paths).