docs(plan): gateway admin token recovery flow #401
Reference in New Issue
Block a user
Delete Branch "docs/gateway-token-recovery-plan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan document for mission cli-unification-20260404 task CU-03-01.
Captures the BetterAuth cookie-based admin token recovery design locked in Session 1: mosaic gateway login persists a session cookie, and mosaic gateway config recover-token / rotate-token reuse the existing POST /api/admin/tokens endpoint (no new server endpoints required — AdminGuard already accepts BetterAuth session cookies).
Sections: problem statement, design summary, surface contract (server + CLI commands + file touch list), installer fix preview for CU-03-06, test strategy for CU-03-07, and risks. Feasibility confirmed during investigation — AdminGuard.validateSession reads cookies via fromNodeHeaders.
Planning only — no runtime code changes.