Part of #23. Depends on F2.B, F2.C.
Background
copilot-api today has no auth; flipping default-on in one release breaks every existing user. Per security S2, however, --no-auth default is risky — public-facing port + no auth = burned-Copilot-quota and possible account suspension.
⚠️ Open question (please decide before this issue is implemented)
Originally the architect recommended auth=off default in v0.8 to preserve compat. Security review (S2) pushed back: the README itself warns about GitHub abuse-detection. Two viable options:
Option A (compat-first):
--no-auth default in v0.8, deprecation banner every startup
- Default flipped in v0.9
- Safer for existing single-tenant users
Option B (safety-first, recommended by security):
auth=on default in v0.8 with auto-bootstrap (F2.B)
--no-auth requires explicit --i-accept-account-suspension-risk flag
- Refuse
--no-auth on non-loopback bind address unless ack flag set
- Existing users who run on localhost are unaffected; users who exposed the port now must opt-in
This issue assumes Option B — adjust if you pick Option A.
Goal
Safe migration from "no admin features" v0.7 → "fully admin'd" v0.8 with explicit opt-out for the legacy single-tenant pattern.
Tasks
Acceptance criteria
- Running
copilot-api start --no-auth --port 4141 (defaults bind to 0.0.0.0 in current code) refuses without the ack flag
- Running on loopback succeeds with warning
- README has explicit warning + migration path
- Existing tests pass
File pointers
- Touch:
src/main.ts, src/start.ts, README.md, CHANGELOG.md
Dependencies
Depends on F2.B, F2.C. Should land before any v0.8 release.
Part of #23. Depends on F2.B, F2.C.
Background
copilot-api today has no auth; flipping default-on in one release breaks every existing user. Per security S2, however,
--no-authdefault is risky — public-facing port + no auth = burned-Copilot-quota and possible account suspension.Originally the architect recommended
auth=offdefault in v0.8 to preserve compat. Security review (S2) pushed back: the README itself warns about GitHub abuse-detection. Two viable options:Option A (compat-first):
--no-authdefault in v0.8, deprecation banner every startupOption B (safety-first, recommended by security):
auth=ondefault in v0.8 with auto-bootstrap (F2.B)--no-authrequires explicit--i-accept-account-suspension-riskflag--no-authon non-loopback bind address unless ack flag setThis issue assumes Option B — adjust if you pick Option A.
Goal
Safe migration from "no admin features" v0.7 → "fully admin'd" v0.8 with explicit opt-out for the legacy single-tenant pattern.
Tasks
--no-authand--i-accept-account-suspension-riskflags tostartcommand insrc/main.ts--no-authand bind address is loopback (127.0.0.1,::1,localhost): allow with yellow warning printed once--no-authand bind address is non-loopback: REFUSE to start unless--i-accept-account-suspension-riskis set; print red error pointing at the README abuse-detection sectionauth_mode: on | off (loopback) | off (acknowledged risk)/adminstatus page shows the sameserver.start_no_authwith bind address (per F2.D)auth_modemetric to events table (or just log at boot)Acceptance criteria
copilot-api start --no-auth --port 4141(defaults bind to 0.0.0.0 in current code) refuses without the ack flagFile pointers
src/main.ts,src/start.ts,README.md,CHANGELOG.mdDependencies
Depends on F2.B, F2.C. Should land before any v0.8 release.