ATMs should fetch with per-machine read-only deploy keys, not an operator account key #102
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while fixing the auto-upgrade failures in #98 / #101.
sintra's
/root/.ssh/id_ed25519is byte-identical to the operator's personal key on bohm (SHA256:0qUvwBVIF7l1l2YkqgoaDLOW3FsWBnfZrnO93MZ/y0I), and Forgejo authenticates it as the account, not as a deploy key:That is why sintra's
system.autoUpgradecan fetch with nothing registered against the repo: it is acting aspadreug, an org admin. So root on that machine carries write access to every repo in aiolabs, not read access to bitspire.Not urgent: sintra is an in-house development machine, not deployed. Filing it because the pattern should be settled before any machine with this shape ships, and because the fix is the right shape regardless.
batm3 is already closer to correct. It has its own generated key (
root@bitspire), unauthorized only because nobody registered it. An updater only ever fetches, so a read-only deploy key scoped to this repo is exactly the right grant.Proposed:
padreug@gizmoon the accountRelates to the operator access plane in ADR-002: authorization should be per-machine and revocable, and a shared operator key is neither.
Deploying batm3 surfaced the other half of this: a per-machine deploy key has to be registered on every private flake input, not just on this repo.
batm3's key was added to
aiolabs/bitspire, and its firstnixos-upgraderun then got past fetching and failed while evaluating:Tested from the machine:
Those two are currently the only
git+ssh://forgejo@git.atitlan.io/...inputs in flake.nix. Registering the same key onaiolabs/atm-tuishould finish it — Forgejo allows one key to be attached to several repos, so no second keypair is needed.sintra never hit this because it authenticates as the operator account, which can read the whole org. That is the same asymmetry this issue is about, seen from the other side: account-wide access hides the problem, per-machine keys make it explicit.
Two things worth folding into the checklist above:
The second is the trap. The failure is invisible until someone reads a machine's journal, which is exactly how #98 went unnoticed for six weeks.