Machines
Summary: give a server or another program read access to one environment, and end it.
A machine device has its own key and grants on specific environments. A person approves it once in the browser; it never receives anyone’s identity key.
secrets-chad machine create web1 -e shop/prod --out web1.key # read access to shop/prod
secrets-chad machine create worker -e shop/prod --access read-write --out worker.key
secrets-chad machine create box1 --out box1.key # the approver chooses the environments
Copy the key file to the machine (mode 0600), and point SECRETS_DEVICE at its content, or keep it as the device file.
Then, on the machine:
secrets-chad -e shop/prod run -- ./server
secrets-chad -e shop/prod export --format env --out /opt/apps/shop/.env --merge
End it:
secrets-chad -p shop machine ls
secrets-chad -e shop/prod machine revoke web1 # removes the grant and rotates shop/prod
- With IDs (from
.secrets.toml),machine createneeds no login on the computer that runs it. - A machine keeps its grants when the person who approved it leaves; see sharing.
Wiki: Machine device. Spec: §7.4.