Repository navigation
feat(auth): connect an assistant without a terminal - #1832
Merged
Merged
Conversation
The house password, not the address, proves the owner. Any browser that reaches the box may set the first one, also through a Docker port or on the box itself, and choosing it signs that browser in. Settings → Access asks for it right above the assistant's code, and the setup wizard asks for it on a new box. Any non-empty password is accepted; a short one gets a warning. A forgotten password is turned off on the box with `ftw password reset` (`/app/ftw password reset` in Docker). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From an independent review of the previous commit: - A request Authenticate let in while the lock was still off can no longer replace the password the first browser just chose. - The sign-in cookie goes only to a direct local browser that chose the first password or proved the current one. The box itself may still replace a password it never proved, as it may change any setting, but that earns no sign-in. - Every change of the house password writes an audit line with the address. - Access no longer offers "choose a password" when the box's status could not be read, and a choose that meets a password set meanwhile turns into a sign-in. - The password limit counts characters, not bytes. - The docs say how to reset on a native box whose ftw command predates this release, and say plainly that loopback is not a wall against programs on the box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On 25 October 2026 a beta user tried to connect ChatGPT and gave up. Settings → Access asked for a house password first and sent him to System → LAN password. There, pressing Enable from his browser returned:
He runs FTW on Docker Desktop, so his own browser never counts as "loopback". He could not connect an assistant without a terminal.
What Fredrik decided (25 October 2026)
ftw password reset.What changes
Core
POST /api/auth/passwordno longer refuses the first enable from a LAN or Docker address. The app session still cannot turn it on. Choosing the password signs that browser in (signed_inin the answer), so the page goes straight on.resolveLANSecretreads it on loopback). Loopback is still an owner for settings without it, softwcommands keep working. Letting an assistant in needs a signed-in browser from every address. Drivers cannot reach the API (drivers/selfguard.go), and app-session requests never present the house secret.house_passwordand starts the box locked. Home Assistant ingress ignores it. A script that sends none leaves the lock off, as before.ftw password resetturns the lock off through the local API and signs every browser out. On Docker the box's own binary runs it:docker compose exec ftw /app/ftw password reset.Box page
invalid password.Docs:
docs/operations.mdhas a House password section with the reset command;docs/agents.mdstates the new rule.Security, in plain words
ftw password reseton the boxNothing changes for Home Assistant (its login already counts) or for the FTW app (approves with its own signed key).
Evidence
Browser test against a local Core built from this branch, with a local stand-in for FTW Cloud's code lookup that signs real offers with a key the build pins (
-ldflags -X cloudlink.OfferKeys,cloudlink.Endpoint; nothing reached production FTW Cloud).localhost, the box seeing a private LAN address (as Docker Desktop's bridge does). Before (master): the Access block and the Docker error above, reproduced word for word. After: choose a password → signed in → type the code → review → "ChatGPT" can reach this home.127.0.0.1, a native Mac install): "Sign in" → signed in → code → access given. Before, this case told the owner to use another device.1234shows "Short passwords are easy to guess. You can still use this one." and is accepted./app/ftw password reset --url http://127.0.0.1:…turns the lock off; against the LAN address with the lock on it refuses with "run this on the box itself".lan_auth: true, configured: true, andconfig.yamlholds no password.TestBootstrapWizardSavesTheHousePassword/through_Home_Assistant,TestHomeAssistantBootstrapNeedsNoSecondPasswordand the readiness tests.Screenshots, on branch
claude/simple-assistant-connect-shots(not for merging).Tests:
make verifypassed on the first commit. After the review fixes and a rebase on8e33174e,go testforinternal/api,cmd/ftw,internal/ftwcliandinternal/statepasses, andnpm testpasses 884/884. New tests cover: the first password from a LAN, Docker-bridge, IPv4 and IPv6 loopback address; a second device refused; a short password accepted; the race between two first enables; an unproved change on the box earning no sign-in; a cookie on the box widening; an app session never presenting the house password; the wizard saving a verifiable hash (and Home Assistant ignoring it); andftw password reset.Owner approval
The changeset is
minor(a visible change to how the box is claimed and how assistants are let in). Fredrik approved the direction in the session; please confirm theminorhere.Independent review
A separate review (Sonnet) read the diff. It found, and this PR now fixes:
drivers/selfguard.go), and anything else there can change everything already.ftwcommand:ftwmoves withinstall.sh --refresh, notftw update. The docs and changeset give Core's own binary as the fallback.docker-compose.macos.yml.Left as is, on purpose: a wrong Bearer on loopback now counts toward the shared five-guess lockout, as it does from the LAN.
Not covered
TestTheFirstHousePasswordFromAnyAddress/172.17.0.1.🤖 Generated with Claude Code