Repository navigation
Dashboard: automatic browser access, no token entry - #294
Closed
Coding-Dev-Tools wants to merge 1 commit into
Closed
Coding-Dev-Tools wants to merge 1 commit into
Coding-Dev-Tools wants to merge 1 commit into
Conversation
Remove the browser token form and both window.prompt() token prompts. The dashboard now mints its HttpOnly session for any same-origin browser request that reaches it: loopback, a literal address, a single-label/mDNS name, or the host in ENGRAPHIS_DASHBOARD_URL, still gated by the custom browser header, an exact Origin/Host match, and a trusted-proxy check for forwarding headers. That covers the Docker host, LAN, tunnel, and hosted deployments without a credential prompt. Machine clients and /mcp still require Authorization: Bearer ENGRAPHIS_API_TOKEN. Set ENGRAPHIS_BROWSER_AUTO_SESSION=0 for a hardened deployment: POST /api/auth/link (bearer-protected) and engraphis-dashboard --link mint a single-use code, signed with the token plus a per-process epoch, delivered in a URL fragment, valid for 15 minutes, and redeemed at POST /api/auth/handoff for a 12-hour session. Docs state the resulting boundary (the deployment's network reachability) and the public-deployment warning. Tests cover automatic access, cross-site and rebinding rejection, trusted-proxy handling, the link round trip, replay rejection, and the CLI.
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Oct 31, 2026
Owner
Author
|
Superseded by #296, which implements the same behavior directly on current main; this branch was stacked on the older \eat/file-guard-protection\ tree. Closing to avoid duplicate review. The branch remains available if you want to compare implementations. |
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.
Why
Opening the dashboard from another machine asked a person to type
ENGRAPHIS_API_TOKENinto a web form, and the Docker-host path could ask for it too. A deployment secret does not belong in a browser, and a single-user node should not gate its own human surface with a credential prompt.What changed
Browsers never enter a token. The remote sign-in dialog and both
window.prompt()token prompts are gone.Automatic access is the default.
POST /api/auth/local-sessionnow mints the HttpOnly session for any same-origin browser request that reaches the deployment:X-Engraphis-Browser-Sessionheader is required;Originmust exactly match a publishedHost— loopback, any literal address, single-label/mDNS (.local,.home.arpa), or the host inENGRAPHIS_DASHBOARD_URL;ENGRAPHIS_FORWARDED_ALLOW_IPS, andX-Forwarded-Protodecides the scheme behind that proxy.That closes the Docker-host case (container-NAT peers) and every LAN/tunnel/Railway deployment without a form. Public hostnames must be configured via
ENGRAPHIS_DASHBOARD_URL(the Railway template already sets it), which keeps DNS rebinding out.Machine clients are unchanged.
/api/*and/mcpstill requireAuthorization: Bearer ENGRAPHIS_API_TOKEN.Hardened mode remains available. Set
ENGRAPHIS_BROWSER_AUTO_SESSION=0to require a one-time link:POST /api/auth/link(bearer-protected) mints a code signed with the token plus a per-process epoch;engraphis-dashboard --linkprints the link (railway run engraphis-dashboard --linkon Railway,docker compose exec engraphis engraphis-dashboard --linkin Compose);POST /api/auth/handoff;Security posture
The dashboard's boundary is now the deployment's network reachability: whoever can open that origin gets this node's memories. That is the same trust model as the loopback quickstart, made explicit.
SECURITY.md,docs/CONFIGURATION.md,docs/DOCKER.md,docs/HOSTING_RAILWAY.md,docs/AGENT_CONNECT.md, and.env.exampledocument it, including the warning for public deployments.Verification
python -m pytest tests/test_local_browser_access.py tests/test_local_auth_browser_session.py tests/test_dashboard_auth_placement.py tests/test_commercial_hardening.py tests/test_start_dashboard.py -qpython -m pytest tests/ -qnpx playwright test tests/e2e/ledger.spec.js tests/e2e/workspace-smoke.spec.js --project=chromium(64 passed)ruff check .,python scripts/externalize_dashboard_assets.py,python scripts/check_commercial_manifest.py--link, redeem for an HttpOnly cookie, authenticated/api/bootstrap200, replay 401.Stacked PR
This builds on
feat/file-guard-protection(PR #289) because the Ledger assets and their tests live in that branch's state. Retarget tomainonce #289 lands.Not done
No merge, deploy, or release. No credentials or generated databases are included.