gunk-dev/the-valley

dcr-9b5da04-hosts-serve-isolated-valleys.md

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