Skip to content

Sign dashboard users in by project API key - #357

Merged
dipeshbabu merged 1 commit into
mainfrom
feat/dashboard-project-access
Nov 20, 2026
Merged

dipeshbabu merged 1 commit into
mainfrom
feat/dashboard-project-access

Conversation

@dipeshbabu

Copy link
Copy Markdown
Owner

On a shared server, anyone past the proxy login could type any project name into the dashboard sidebar and read that project's traces (prompts, tool data). The API already isolates projects by key; the dashboard did not.

`AGENTLOOP_DASHBOARD_REQUIRE_KEY=true` (new `dashboard/access.py`):

  • shows a sign-in form asking for a project API key; nothing else renders until it verifies via `store.verify_api_key` (same check as the HTTP API);
  • binds `project_id` for every page to the key's project, replacing the free-text field with the project name and a Sign out button (all page reads/writes were already scoped by `project_id`);
  • hides `API Keys` (admin task) and `Patch Plan` (reads files on the dashboard host);
  • after 5 failed sign-ins in a session, further attempts wait 60 s.
    Without the setting, local behaviour is unchanged.

Deploy: `deploy/docker-compose.yml` enables it; the `deploy-stack` CI job asserts the setting in the running dashboard. Caddy's login stays as the outer gate.

Tests: unit tests for the setting, page filtering, key binding, invalid keys and lockout; Streamlit AppTest with two projects proving a key for `alpha` shows `alpha-agent` but not `beta-agent`, no navigation before sign-in, hidden pages, and sign-out. All 40 existing dashboard tests pass. Docs: DASHBOARD, PRODUCTION, CLOUD_DEPLOY, changelog.

🤖 Generated with Claude Code

A shared dashboard let anyone past the proxy login type any project name
and read its traces. With AGENTLOOP_DASHBOARD_REQUIRE_KEY=true the
dashboard asks for a project API key, verifies it like the HTTP API, and
binds every page to that key's project. The project field, API-key
creation and the host-file patch plan are unavailable to project users,
and five failed sign-ins in a session wait a minute. The cloud deploy
stack enables it and CI checks the setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown

AgentLoop replay self-test

This required repository check evaluates generated synthetic demo traces. It tests the replay and CI machinery; it does not show that this PR improves application performance.

AgentLoop CI Report

  • Status: passed
  • Replay: Replay passed: latency improvement 69.66%, cost improvement 78.82%, retry delta -1.
  • Merge recommendation: synthetic self-test only; assess application traces before merge
  • Findings: 1 total, 0 high severity, 1 patchable

Performance Gates

Gate Status Detail
latency_regression pass 0.00% regression <= 0.00% allowed
cost_regression pass 0.00% regression <= 0.00% allowed
latency_improvement pass 69.66% improvement >= 20.00% required
cost_improvement pass 78.82% improvement >= 5.00% required
retry_non_increase pass 0 candidate retries <= 1 baseline retries

Trace inputs

This comparison includes synthetic data. It does not establish application performance gains from a pull request.

Side Run ID Path Synthetic marker Source
baseline run_7edbf7a7cd0f4a03 runs/research_agent_baseline.json yes agentloop_demo
candidate run_0a9bd0bc18174381 runs/research_agent_optimized.json yes agentloop_demo

Metric Impact

Metric Impact
Latency improvement 69.66%
Cost improvement 78.82%
Retry delta -1
Candidate schema validity not provided
Candidate quality score not provided

Top Findings

Finding Severity Type Rewrite
al_cache_context_4178192efa4d: Cache repeated prompt/context prefix medium cache_context Move stable instructions into cached prefixes, summaries, or framework-level memory instead of resending full text.

@dipeshbabu
dipeshbabu merged commit 8b4a740 into main Nov 20, 2026
26 checks passed
@dipeshbabu
dipeshbabu deleted the feat/dashboard-project-access branch November 20, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant