Summary
Design epic (DRAFT) for replacing the "create a client in the web UI, copy Client ID + password, paste into installer" onboarding with: sign in (browser device flow) → name + confirm location → done.
Draft RFC lives at docs/rfcs/0001-cli-auth-and-client-provisioning.md (currently uncommitted on develop — to be opened as a PR for review once it firms up).
Key findings that shaped it
- Client =
EdgeDevice (Django User subclass). Human-readable name (first_name) and structured location (location → Electricity Maps ZONE_CHOICES) already exist and feed a working carbon pipeline. No new model fields needed. - Provisioning API already exists:
POST /edge-device/ (writable: first_name, account, location, password). - Auth today = DRF token + Google/GitHub web OAuth. No RFC 8628 device flow, no PAT — the only net-new backend surface.
- A maintained Go CLI (
tracebloc/cli, v0.2.0) already exists and is installed by the client installer — the right home for login + client create.
Status
DRAFT — open for enhancement. Not approved.
Next steps (not started)
Constraints carried in
- Credentials entered by the user interactively / browser — never through tooling.
- Dual-mode: existing Client ID + password installs must keep working.
Summary
Design epic (DRAFT) for replacing the "create a client in the web UI, copy Client ID + password, paste into installer" onboarding with: sign in (browser device flow) → name + confirm location → done.
Draft RFC lives at
docs/rfcs/0001-cli-auth-and-client-provisioning.md(currently uncommitted ondevelop— to be opened as a PR for review once it firms up).Key findings that shaped it
EdgeDevice(Django User subclass). Human-readable name (first_name) and structured location (location→ Electricity MapsZONE_CHOICES) already exist and feed a working carbon pipeline. No new model fields needed.POST /edge-device/(writable: first_name, account, location, password).tracebloc/cli, v0.2.0) already exists and is installed by the client installer — the right home forlogin+client create.Status
DRAFT — open for enhancement. Not approved.
Next steps (not started)
backend(device endpoints),cli(commands),client(installer reorder) — RFC §12Constraints carried in