SPB Git

Repository Public

ADR-0006-single-operator-tenancy.md 1.2 KB

# ADR-0006 — Tenancy model and dashboard authentication in V1

Status: accepted, 2026-12-04. To be revisited before any third party is given a key.

  • Data is tenant-scoped everywhere (every query filters on tenant_id; cross-tenant access answers 404). Tests cover it.
  • Operator-wide actions are attached to the admin scope: source policies and kill switches (PUT /v1/policies), worker drain, worker registry. In V1 there is one operator; an admin key of any tenant can therefore engage a kill switch for the whole fleet. Before onboarding a second organisation, split a separate operator scope.
  • Dashboard sign-in exchanges an API key for an HttpOnly, SameSite=Strict session cookie with a CSRF token. Passkeys / an external identity provider are not implemented. identity.spboucher.ai exists in the fleet and is the candidate; integrating it needs its audit and the owner's approval.
  • Worker identity is a dedicated worker key (hashed, revocable, rotatable) over the private network. mTLS between workers and gateway is not implemented; the internal API must not be routed publicly (the reverse-proxy route excludes /internal/).
Files main
Menu

Theme