Skip to content

Conversation

Copy link

Copilot AI commented Nov 28, 2025

Adds minimal basic auth to the Panel dashboard using environment variables LIVEDATA_BASIC_AUTH_PASSWORD and LIVEDATA_BASIC_AUTH_COOKIE_SECRET. Accepts any username with the configured password.

Login screen

Changes

  • DashboardBase: Added basic_auth_password and basic_auth_cookie_secret params, passed to pn.serve() in both server property and run_forever()
  • Validation: Both params must be provided together or neither—raises ValueError on partial config
  • reduction.py: Added CLI args --basic-auth-password and --basic-auth-cookie-secret with security warning recommending env vars

Auth options are scoped to the dashboard layer per review feedback (not in generic Service class).

Usage

export LIVEDATA_BASIC_AUTH_PASSWORD=mypassword
export LIVEDATA_BASIC_AUTH_COOKIE_SECRET=some-random-secret
python -m ess.livedata.dashboard.reduction

Or via CLI (not recommended for production):

python -m ess.livedata.dashboard.reduction \
  --basic-auth-password=mypassword \
  --basic-auth-cookie-secret=some-random-secret

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Nov 28, 2025
Copilot AI changed the title [WIP] Add basic password auth to reduction dashboard Add basic password auth to the reduction dashboard Nov 28, 2025
Copilot AI requested a review from MridulS November 28, 2025 06:59
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.

2 participants