First GM login #5

Closed
opened 2026-11-10 16:48:32 +01:00 by SirStone · 2 comments
Owner

Part of #2

Question

How is the single GM account bootstrapped? No spec says yet.

  • Options: (a) CLI one-shot that prints the GM invite; (b) env var seed; (c) first visitor claims GM (insecure).
  • Suggested default: (a) CLI.
Part of #2 ## Question How is the single GM account bootstrapped? No spec says yet. - Options: (a) CLI one-shot that prints the GM invite; (b) env var seed; (c) first visitor claims GM (insecure). - Suggested default: (a) CLI.
SirStone added the wayfinder:grilling label 2026-11-10 16:48:32 +01:00
SirStone added a new dependency 2026-11-10 16:49:03 +01:00
SirStone self-assigned this 2026-11-10 17:52:59 +01:00
Author
Owner

Decision: first GM login (FIXED 2026-11-10)

  • Only the server CLI creates the GM. fff-vtt gm-link creates the single GM player and a GM invite if none exists, then prints the full join URL. The public origin comes from the same config the server reads.
  • Running it again prints the same link. Existing GM sessions are not touched.
  • fff-vtt gm-link --new rotates: a new GM invite secret, the old one stops working, and all GM sessions are revoked. It refuses while the server is running. Plain gm-link (show) works at any time.
  • Access control is filesystem permissions on the data files. No extra password.
  • A visitor without an invite never becomes GM. There is no first-visitor claim; they only see a "need an invite" page.
  • GM display name defaults to "GM". Renaming is deferred to #6.

Rejected:

  • Seeding the secret from env/config: it leaks through config, the repo and backups.
  • Printing the link at startup: secrets end up in logs.
  • First visitor claims GM: a takeover risk.
  • Rotating on every lookup: logs out GM devices.
  • Live rotation while the server runs: needs an admin channel into the running server.

DESIGN pointer: docs/DESIGN.md section 3.2, "First GM login".
Commit: ae2f7c48dc

**Decision: first GM login (FIXED 2026-11-10)** - Only the server CLI creates the GM. `fff-vtt gm-link` creates the single GM player and a GM invite if none exists, then prints the full join URL. The public origin comes from the same config the server reads. - Running it again prints the same link. Existing GM sessions are not touched. - `fff-vtt gm-link --new` rotates: a new GM invite secret, the old one stops working, and all GM sessions are revoked. It refuses while the server is running. Plain `gm-link` (show) works at any time. - Access control is filesystem permissions on the data files. No extra password. - A visitor without an invite never becomes GM. There is no first-visitor claim; they only see a "need an invite" page. - GM display name defaults to "GM". Renaming is deferred to #6. Rejected: - Seeding the secret from env/config: it leaks through config, the repo and backups. - Printing the link at startup: secrets end up in logs. - First visitor claims GM: a takeover risk. - Rotating on every lookup: logs out GM devices. - Live rotation while the server runs: needs an admin channel into the running server. DESIGN pointer: `docs/DESIGN.md` section 3.2, "First GM login". Commit: ae2f7c48dcb54954ace975155eb92e3fc97d5d5c
Author
Owner

Amended by Players and invites (#6): gm-link → gm-key; GM signs in via shared link + GM key. Rest unchanged.

Amended by Players and invites (#6): gm-link → gm-key; GM signs in via shared link + GM key. Rest unchanged.
Sign in to join this conversation.