Repository navigation
Dashboard: allow a fixed access token for reverse-proxied dashboards (token changes on every restart) #2787
shaggy2626
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
When the dashboard is exposed through a reverse proxy or a forward (
--allowed-origins/AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS), everyagent-browser dashboard startgenerates a new access token (DashboardConfig::new->generate_dashboard_access_token()incli/src/main.rs, 0.45.0). The private access URL therefore changes on every restart: service restarts, host reboots, agent-browser upgrades.For a long-running dashboard watched by one person from a fixed device, they have to re-open a fresh
#dashboard-access-token=URL after every restart. A bookmark can't stay valid, so they need another channel (chat, email) to deliver each new URL.Proposal
Let an operator supply the token, the same way the dashboard process already receives it:
agent-browser dashboard start --access-token-file <path>(preferred: keeps the secret off the command line), and/orAGENT_BROWSER_DASHBOARD_ACCESS_TOKENindashboard startinstead of always generating one, after validating it withis_valid_dashboard_access_token(64 hex).Generation stays the default, so current behaviour is unchanged. The "already running" check (
has_valid_access_token) anddashboard.configwould store the supplied token as they store a generated one.Workaround we use today
A small wrapper that does what
dashboard startdoes: it writesdashboard.configanddashboard.pid, then execs the binary withAGENT_BROWSER_DASHBOARD=1,AGENT_BROWSER_DASHBOARD_PORT,AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINSand our ownAGENT_BROWSER_DASHBOARD_ACCESS_TOKEN, under a systemd user unit. It works on 0.45.0, but it depends on internals that may change, so a supported option would be better.Security note
A fixed token is a long-lived credential, so it should be the operator's explicit choice (opt-in flag or file). The docs could recommend rotating it and keeping the file mode 600.
All reactions