Skip to content
quarry View Ticket
Login

View Ticket

Private repositories: visibility flag and read gating

Closed32801e6bd26375f738d030800aa88cce548b9db0Created 105.0 days agoUpdated 68.0 days ago
Description2026-08-17 23:42:03
Grounding this in 0001 after a correction elsewhere: the RFC already anticipates this work and places it here rather than in zit.

§7 states the current position as a deliberate v1 choice, not an oversight:

> Pulls stay anonymous in v1.

and puts the enforcement point beyond doubt:

> TLS, HTTP keep-alive, auth, and N-repos-on-one-port live here — zit's deliberately minimal one-shot server stays untouched.

§8 names the v2 shape:

> v1 ships single-org, flat repo namespace, admin + per-repo tokens; role granularity is v2 and adds tables, not architecture.

So this ticket is that v2 step, and "adds tables, not architecture" is the standard it should meet. Three consequences for the plan above:

1. **The gate is quarry's edge, everywhere — including sync.** `zit serve` children bind loopback behind `xfer`, so gating the web while leaving the proxied pull path open is not a partial fix, it is no fix. Item 4 in the list is not optional.

2. **The credential already exists.** §7's sync auth is shipped: quarry verifies the login card's nonce and signature per request against the §6.3 secret, and "the same secret backs web/API writes via HTTP Basic (§8), so there is exactly one credential per user". A private repository should reuse that identity rather than introduce a second notion of who a reader is.

3. **This changes a stated default, so it needs to be explicit.** Anonymous pull is what every existing client expects. Visibility must default to public on upgrade, and taking a repository private is the deliberate act — never the reverse.

2026-09-03 11:54:49

Landed: repo visibility flag (public by default and on migration; private is the deliberate act), read gating at the web edge, and the same gate on the sync path via xfer.SetReadGate so a private store refuses anonymous pull as well as anonymous browsing. One credential per user, as §7/§8 asked.