| 1 | --- |
| 2 | type: bug |
| 3 | id: bd-8a591dc |
| 4 | status: open |
| 5 | title: Machine access is a permanent grant — provisioning is O(machines) and revocation never happens |
| 6 | created: 2026-07-31 |
| 7 | source: provisioning a disposable agent VM against the pilot host, 2026-07-31 |
| 8 | --- |
| 9 | |
| 10 | # Machine access is a permanent grant |
| 11 | |
| 12 | Granting a machine access to a valley host means appending its public key to |
| 13 | `services.valley.authorizedKeys` and rebuilding the host. The grant has no expiry, so it persists |
| 14 | until someone edits the list again. Nothing observes that the machine it was issued for has ceased |
| 15 | to exist, and a disposable machine leaves its key behind when it goes. |
| 16 | |
| 17 | Two costs follow, and they compound as the number of machines grows. |
| 18 | |
| 19 | Provisioning is O(machines) with a human deploy in the loop. Each new machine needs a change to the |
| 20 | host's declaration, review, a merge, and an interactive rebuild of the host. That is a deploy of the |
| 21 | primary git host to grant read access to a scratch machine — an expensive motion to repeat, and one |
| 22 | performed on the machine whose availability everything else depends on. |
| 23 | |
| 24 | Revocation is the harder cost, because it never happens on its own. A key list only shrinks when a |
| 25 | human notices an entry is dead and removes it, and nothing prompts that noticing. Ephemeral machines |
| 26 | are exactly the case where the grant outlives the grantee, so the list accretes standing grants to |
| 27 | destroyed hosts. Each entry reaches every project on the host, because access is host-level by |
| 28 | design. |
| 29 | |
| 30 | ## Why it is acceptable today |
| 31 | |
| 32 | Every key in the list belongs to the operator, the host is reachable only over a private tailnet, and |
| 33 | the projects are small in number. A stale entry is a key nobody holds on a host nobody else can |
| 34 | route to. The defect is one of scale and hygiene, not a live exposure. |
| 35 | |
| 36 | ## The gate |
| 37 | |
| 38 | The mechanism needs replacing before either of these becomes true: |
| 39 | |
| 40 | - machines that are not the operator's own are granted access, or |
| 41 | - machines are provisioned often enough that the manual rebuild is a routine motion rather than an |
| 42 | exception. |
| 43 | |
| 44 | Dispatched agent machines make the second true first, and they arrive with S3. |
| 45 | |
| 46 | ## Directions, not decisions |
| 47 | |
| 48 | - **Move authorization to the tailnet.** Identity is already declared to be Tailscale-ACL-based, and |
| 49 | the tailnet is already the front door, but it currently establishes reachability while a static key |
| 50 | list establishes authorization. An ACL tag naming which nodes may act as the git user would make |
| 51 | access follow from a machine's tag, needing no host change per machine, and would inherit node |
| 52 | expiry as a TTL. Whether Tailscale SSH composes with `git-shell` and non-interactive |
| 53 | `git-receive-pack` is unverified, and it bypasses the module's sshd hardening. |
| 54 | - **Short-lived certificates.** An SSH CA trusted by the host, issuing certificates that expire in |
| 55 | hours, makes revocation the default rather than an act of hygiene. It also introduces a signing |
| 56 | service, which is a new coordination point to justify against the decentralization constraint. The |
| 57 | trust backstop wants something shaped like this anyway. |
| 58 | - **Do not credential the machine at all.** Integration is planned to be pull-based. A contributor |
| 59 | the integrator fetches from needs to be reachable, not authorized to push. A disposable machine is |
| 60 | a better fetch source than it is an authorized pusher. |
| 61 | |
| 62 | ## Related |
| 63 | |
| 64 | The instance-level counterpart is qinling's `dcr-34b3f6d` (keys partition by capability), which |
| 65 | observes that the pilot host's key inventory conflates decryption, authentication, and human |
| 66 | signing, and wants it partitioned by capability. Splitting a git-only class out of the inventory's |
| 67 | user list — done for the machine that surfaced this — separates authentication from decryption for |
| 68 | one member, and is a down payment on that partition rather than a substitute for it. Neither change |
| 69 | gives a grant an expiry. |
| 70 | |
| 71 | The open question this sharpens is *when* Phase-0 identity has to grow and into what |
| 72 | ([openquestions.md](../../design/openquestions.md)). This bug is one concrete forcing function: a |
| 73 | machine that exists for an afternoon. |