CLI reference / service / token-file / sync

stado service token-file sync

Invocation

stado service token-file sync [OPTIONS] --host <HOST> --item <ITEM> --token-file <TOKEN_FILE> <NAME>

Purpose

Write one Skarbiec item field into an owner-only raw bearer file. `WC_STADO_STORAGE_TOKEN_FILE` has to name a file whose entire content is the bearer, because `queue/stado_object.rs` resolves a token file and nothing else. `secret sync` can put a Skarbiec field into a unit's env file, and `grant sync` can reconcile a grant against a token file that is already on the host, but nothing could create that file. So the only remaining way to bind a host to the fleet object store was to hand-copy a secret onto it, which is the one thing the fleet-wide "everything through Stado" rule exists to prevent. Lacking the file, a queue agent binds its `JobStorage` to a device-local store instead and publishes no capacity while fleet jobs wait on a host every surface reports as in-sync -- a fleet claim written to a device store does not fail, it succeeds where nobody else can see it. The value is read through the isolated service-verifier grant and carried in the SSH request body. It is never printed or placed in argv.

Required inputs and options

Input or optionContract
<NAME>Service name, or the host's own name for the unit
--host <HOST>The single registry host to update
--item <ITEM>Skarbiec item containing the bearer
--field <FIELD>Exact string field in the Skarbiec item [default: token]
--token-file <TOKEN_FILE>Destination bearer file on the target, absolute or rooted at $HOME
--jsonCommand option; required or optional as shown in the invocation.

Output and state effect

It performs the operation described above and emits its operator result on standard output or standard error. Any state change is limited to the resources and records named by the purpose and options on this page.

Refusals

  • Before dispatch, Stado refuses a missing required token shown in the invocation, an unknown option, or a value outside a listed value set; argument-usage failures exit with code 2.