Policy file
The rabbitlock.agent.yaml schema.
project: 3f9a1c2b7d4e # written by `rabbitlock init`
# Team mode only (written by `rabbitlock team enable`):
# secrets_file: secrets.sops.json
# recipients:
# - { name: you, key: 3f9a… }
# - { name: ana, key: 8c21… }
secrets:
GITHUB_TOKEN:
hosts: [api.github.com, github.com]
STRIPE_API_KEY:
hosts: [api.stripe.com]
approval: once
INTERNAL_API_KEY:
hosts: ["*.internal.example.com"]
approval: everyFields
| Field | Type | Default | Notes |
|---|---|---|---|
project | id ([a-z0-9-], 4 to 64 chars) | written by init | Without secrets_file, secrets and receipts live in ~/.rabbitlock/projects/<project>/ (individual mode) |
secrets_file | path | none | Set by team enable. The encrypted file lives here, relative to the policy file, and is committed (team mode) |
receipts | path | ~/.rabbitlock/projects/<project>/receipts.jsonl | Relative to the policy file if set |
recipients | list of hex keys, or { name, key } | [] | Who can decrypt in team mode. Your own key is always added on write. Manage with rabbitlock team |
secrets | map | {} | Only secrets listed here reach the agent |
secrets.<NAME>.hosts | list | required, non-empty | Exact host names, or one leading wildcard |
secrets.<NAME>.approval | never | once | every | never | See Approvals |
Host matching
- Exact, case-insensitive:
api.github.commatches onlyapi.github.com. - Wildcard:
*.example.commatchesa.example.comanda.b.example.com, but notexample.comitself, and notevilexample.com. - No schemes, paths or ports.
https://api.github.com/useris rejected.
Validation
Malformed entries are errors, never guesses. A typo must not silently widen or drop protection. RabbitLock refuses to run with:
- a secret name that doesn't match
^[A-Z][A-Z0-9_]*$ - a missing or empty
hostslist, or an invalid host entry - an
approvalvalue other thannever,onceorevery - a
projectid with characters other thana-z,0-9and- recipientsentries that aren't a hex key or{ name, key }
Policies written before 0.4 (no project, no secrets_file) keep their secrets in secrets.sops.json and receipts in .rabbitlock/ next to the policy, as before.