[DRAFT RFC] Browser-based auth & one-command client provisioning#55
[DRAFT RFC] Browser-based auth & one-command client provisioning#55saadqbal wants to merge 2 commits into
Conversation
Design epic for replacing copy-pasted Client ID + password onboarding with a device-flow (RFC 8628) browser sign-in + auto-provisioning. Refs #54. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
👋 Heads-up — Code review queue is at 16 / 8 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
- §6.6: derive namespace slug from display name ONCE then freeze (k8s namespaces are immutable); collision-suffix + empty-slug guard + --namespace override; backfill leaves existing slugs untouched. - §6.7: location is soft-required (required but pre-filled); never accept a silent empty (reads as carbon-free); explicit "set later" path; keep DB blank=True for back-compat, enforce at UX layer. - Appendix B: name→slug reference algorithm + prototype validation table + manage.py query to validate against production namespaces. Refs #54. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Stood up a cross-repo tracking epic so this RFC is tracked as the leading CLI plan: tracebloc/backend#830 (North Stars, Epic, owner @saadqbal). It carries the phased plan (Phase 0/1/2), the cross-repo work breakdown (backend / cli / client), and the open questions for the discussion. This RFC doc stays the source of truth — the epic is just the tracker. |
|
Worked the §11 open questions to resolution with a code-grounded sweep (backend / client / cli) and laid out the full cross-repo plan + device-grant design in the tracking epic tracebloc/backend#830. Headlines (most are dictated by the code, not opinion):
Two need your product nod — Q1 (air-gap out) and Q5 (re-parenting deferred); the rest follow from the code. Full detail, the |
Draft for discussion — not for merge yet. Inline comments welcome on
docs/rfcs/0001-cli-auth-and-client-provisioning.md.Tracking epic: #54
What this is
Design RFC for replacing the current onboarding (sign up on web → hand-create a client at
/clients→ copy Client ID + password → paste into installer) with:Why it's mostly additive, not a rewrite
Grounded survey of
backend/client-runtime/clifound that most of the model already exists:EdgeDevice; human-readable name (first_name) and structured location (location→ Electricity MapsZONE_CHOICES) already exist and feed a working carbon pipeline.POST /edge-device/already exists.login+client create.Please weigh in on (RFC §11)
Not in scope yet
Sub-tickets across
backend/cli/client(§12) come after the design firms up.🤖 Generated with Claude Code