ADR-008 / Decision record
Least-privilege, pool-scoped API tokens
The automation token can manage guests in one pool, and nothing else.
- Context
- Automation needs an API token. A token that can change the host can change everything.
- Decision
- Each environment's token is bound to a custom role, scoped to that environment's pool, with no Sys.Modify, Permissions.Modify or User.Modify.
- Why
- A leaked lab token can't touch prod, and no automation token can reconfigure the host, create users or grant itself more access.
- Trade-off
- Some jobs can't be done by the token at all. Host-level work stays in reviewed Layer 0 scripts, and some hypervisor features (see ADR-011) had to be designed around.
Notes
This is also why the host isn’t managed by OpenTofu. Managing bridges and users needs host-level privileges, and a token with those could reconfigure everything. Keeping Layer 0 as a reviewed script keeps the everyday token small.