| 1 | --- |
| 2 | type: decision |
| 3 | id: dcr-9b5da04 |
| 4 | status: decided |
| 5 | title: "Isolate valleys that share a host" |
| 6 | created: 2026-08-22 |
| 7 | source: design conversation, 2026-08-22 |
| 8 | supersedes: [dcr-2f03be3] |
| 9 | --- |
| 10 | |
| 11 | # Isolate valleys that share a host |
| 12 | |
| 13 | A host can serve several valleys. Each valley has separate repository access, service state, and |
| 14 | permissions. Every project belongs to exactly one valley, whose shared policy and identity registry |
| 15 | govern it. |
| 16 | |
| 17 | Hosting several valleys on one machine is a current design goal. A valley spanning several hosts |
| 18 | remains possible but deferred. Replication provides backup depth until a |
| 19 | [user scenario](../../design/user-scenarios.md) requires more; see |
| 20 | [[dcr-d7952bc]](dcr-d7952bc-phase0-replication-github-transitional.md). |
| 21 | |
| 22 | ## Access and service isolation |
| 23 | |
| 24 | While Git access uses SSH and Unix users, each valley has its own push user. That user's |
| 25 | `authorized_keys` is compiled only from the valley's registry. Permissions from different valleys |
| 26 | must not be combined into one compiled artifact. |
| 27 | |
| 28 | The SSH user in a clone URL selects the valley. Repositories and service state are separated on the |
| 29 | same basis. A service that needs a separate user also needs a separate user for each valley; |
| 30 | [[bd-500adf7]](../bugs/bd-500adf7-bus-shares-git-user.md) describes the bus example. |
| 31 | |
| 32 | Valleys do not receive one another's events by default. Bus isolation could use separate buses or |
| 33 | authenticated subjects scoped to each valley. This remains open and depends on the authentication |
| 34 | work in [[bd-d853d9c]](../bugs/bd-d853d9c-bus-unauthenticated.md). |
| 35 | |
| 36 | ## Identity and integrators |
| 37 | |
| 38 | A person, machine, or service can belong to several valleys. Each registry independently names the |
| 39 | keys it recognizes and grants permissions within that valley. |
| 40 | [[dcr-b87f6e8]](dcr-b87f6e8-identity-is-a-governed-registry.md) defines this registry model. |
| 41 | |
| 42 | Each valley declares one integrator principal. Its controllers sign as that principal, even when |
| 43 | there is a controller for each of several protected projects. A principal can hold several keys, |
| 44 | allowing controllers on different machines to use different keys under the same identity. |
| 45 | |
| 46 | ## Preserve access to governance |
| 47 | |
| 48 | The registry compiler must reject a state with no unexpired key authorized to govern the registry's |
| 49 | own stream. A rejected compilation must leave the last valid artifacts in place. |
| 50 | |
| 51 | This check protects against rendering a registry with no governing key. Credential expiry and |
| 52 | continued access also require the lifecycle rules in |
| 53 | [[dcr-b87f6e8]](dcr-b87f6e8-identity-is-a-governed-registry.md); compilation does not make keys |
| 54 | immune to later expiry. |
| 55 | |
| 56 | ## Host ownership |
| 57 | |
| 58 | The valley that owns the host stores its declaration in its repository. |
| 59 | |
| 60 | The isolation described here separates valleys from their peers on the same machine. The host |
| 61 | administrator retains root access to the machine and its data. A valley that needs independence from |
| 62 | that administrator needs infrastructure under separate control. |
| 63 | [[ida-8482624]](../ideas/ida-8482624-federation-groups.md) explores cooperation between such |
| 64 | valleys. |
| 65 | |
| 66 | ## Open questions |
| 67 | |
| 68 | Bus scoping, per-valley user names, filesystem layout, and the full set of services requiring |
| 69 | separate users need concrete designs when a second valley is deployed on one host. |
| 70 | |
| 71 | [[dcr-8f069dd]](dcr-8f069dd-valley-is-the-unit.md) defines the valley as the unit of shared policy. |