Repository navigation
w745: the ops worker may run every read-only fffctl form; a test fails on an unclassified fffctl command - #244
Merged
Merged
Conversation
… machine-credential list, migrate --help); a test fails on an unclassified fffctl command Request: w745 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…y) case in fff-ops-priv Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… it now checks the read-only forms work and the changing ones are refused Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ci-env is gone by then) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Request: w745
lothsahn, 2026-10-09: "I would like the orchestrator to be able to run any vault commands that read data. In fact, please audit all fffctl commands that are read only and ensure the orchestrator can run any of them. And update the documentation that anytime a new fffctl command is provided, all read only parts of it should be allowed by the orchestrator worker"
What
fff-ops-priv(root wrapper) gainsvault list [--names],vault help,machine-credential list,migrate --help, each with its arguments pinned (anything else exits 2 beforefffctlruns).server/opsWorker.ts:FFFCTL_FORMS, one table of every fffctl command with itsallowed(read-only) andchangesforms;OPS_FFFCTLis derived from it. The shell guard also checks the form word ofvault,machine-credentialandmigrate.server/opsFffctlForms.test.ts: readsfffctl,server/vaultCli.tsandscripts/fff-migrate.tsand fails when a command or form is not classified, when the table lists one that is gone, or when the guard andfff-ops-privdisagree.docs/ops-worker.md("A new fffctl command" and the "It may" table),CONTRIBUTING.md, thefffctlheader comment.Audit (fffctl and what it runs)
status,statehelpunits,units --checklogs [N]logs Nisjournalctl -n N, redacted. fffctl'slogs -ffollows and never endslogs Nlogs N(-fis not in the wrapper)vault list,vault list --namesdata/usage.jsonandstate.json; never a valuevault helpvaultCli.tsvault(no word)list)vault init,init --new-keyvault export-keyvault new-key,add,put,rotate,grant,removeadd,put,rotatetake a valuevault getor any form that prints a valuemachine-credential listcredential listmachine-credential issuecredential issue ID --to TARGET(w676, with a machine record)machine-credential revokemigrate --helpparseArgsprints the usage and exits 2migrate --keyStrictHostKeyChecking=accept-new: it trusts and writes a new host key toknown_hostsmigrate --dry-run-copy,--rollback-dry-run,--cut-overwatchdog runwatchdog pause,resume,resetrestart,rollback,prepare-shutdown,startupdateclaude-token,claude-login,tailscale-join,gh-login,base-clonebackup,backup-config,configureconfig.jsonand restartfff-vm(status,snapshots,events,watch statusare read-only)machines.ssh(m3, m5, Loth2800, beast, biscuit): no path from the VMReaders of the vault list see last four characters and a 12-character sha256 prefix per entry: what
vault addalready prints and whatcredential issueprints for a credential. One caveat:Vault.reloadreads throughreadJsonDurable, which repairs a corruptvault.jsonfrom its backup when it finds one. That is the portal's own read behaviour, not a new write path.Evidence
node --test server/opsFffctlForms.test.ts server/opsWorker.test.ts18/18,tsc -p .clean. The new classification test failed on a plantednewthingcommand, a plantedvault peekcase and a plantedrestartcase infff-ops-priv, and passed again after I removed them.fff-ops.test.shblock (5 allowed forms, 28 refused) ran green on macOS against a copy of the guard without its root check; CI runs it as root.fffctl vault liston the VM (unchanged code). No token value appears in the code, the tests or this description.Deploy
Scripts and server only; sudoers unchanged. A portal deploy (
fffctl update) carries it. The hostinstall.sh --guest-onlyadds nothing. Another worker is changing the vault scripts (w744); this PR touches none ofvault.sh,vaultCli.tsorfffctl's code, onlyfffctl's header comment.