0205. Hosting accounts and push authentication
- Status: Accepted (maintainer, 2026-11-17)
- Date: 2026-11-08
- Plan: H3–H7, VR7, R8
- Review: Security and authority
Context
Local VC approves a self-reported HARNESS_VC_BY owner, optionally checking admin uid ownership. Serving that CLI directly over HTTP would allow identity spoofing. Hosting needs accounts without an M14 dependency, secrets in model-visible output or a third-party identity service. Release signatures and push auth differ.
Decision
Accepted: operator-provisioned human/agent accounts and scoped opaque bearer tokens. Accounts use random 256-bit opaque credentials. Store domain-separated SHA-256 digests, scopes, expiry and revocation; compare digest bytes without an early exit. Use direct OS entropy through the existing platform/natives mechanism (Linux getrandom(2), macOS getentropy(3)/arc4random_buf), sharing R3b's port; no OpenSSL rand or weak fallback. See 0200. Never use model-generated tokens. Local credential files are private and outside source/locks.
JSON APIs use Authorization: Bearer. A read-only browser UI may use HTTP Basic with account ID and a separately scoped opaque token as the password; no stored user passwords or cookies. Reject duplicate/mixed auth schemes. Browser mutations are disabled in v0; clients explicitly approve/land/publish over authenticated API. All remote auth crosses HTTPS terminated by a trusted reverse proxy; backend is loopback only. Ignore forwarded identity headers and untrusted Host link origins.
Scopes distinguish repo read, branch push, land, human approve and namespace publish. Authenticate before allocation/existence disclosure. Map checked human identity to OWNERS; bind approvals to exact source. The trusted bridge rechecks grant generation/resource scope under mutation lock. Uploaded approval/gate objects cannot create indexes. Dedicated approval writer owns admin refs; gate children never get its store/credential authority. Commit provenance stays claims.
Tokens never appear in argv, URLs, logs, JSON replies or package metadata. Creation writes directly to an operator-selected private file. A release publisher token cannot sign; Ed25519 reviewer/publisher keys remain separately managed. Disable/revoke applies to the next mutation, including session finalization.
Alternatives considered
- Signed request challenges — avoids reusable bearer text, but adds nonce, clock/replay and key-discovery mechanisms not needed for TLS-backed v0.
- Proxy identity only — smaller app, but couples authorization to proxy header hygiene and deployment identity products; a possible later integration.
- Passwords/OAuth/JWT — expands credential storage, recovery, dependencies and revocation semantics; unnecessary for operator-run agent-first hosting.
- Cookie write UI — familiar, but requires CSRF/session lifecycle; deferred.
Consequences
Hosting plan specifies records/routes and
revocation races. H3 tests actual entropy, scopes and secret
redaction offline. Maintainer accepted this bounded auth model and
read-only initial browser scope on 2026-11-17.