No description
Find a file
Barely Removable 8c6992035f Add per-user logins alongside the shared password
The dashboard had one shared password and no concept of a user. This
adds real accounts: a username field on the login page, per-user
credentials, and the signed-in user recorded on the session, which is
the groundwork for per-user permissions later.

Credentials are salted pbkdf2 hashes in settings.json's `users` map.
Three deliberate choices there:

- settings.json rather than an env var, because a pbkdf2 hash contains
  '$' and docker compose interpolates that when it reads .env. It's also
  already the bind-mounted file that survives `up -d --build`.
- pbkdf2 rather than Werkzeug's default scrypt, which needs a hashlib
  built against OpenSSL — the macOS system Python has no hashlib.scrypt
  and would raise at hash time.
- load_users() re-reads the file per check, so adding a user or changing
  a password is live in every gunicorn worker with no restart. The old
  _runtime_password was per-worker and only ever half-applied.

Multi-user activates only once an account exists. Until then the
original LOGIN_PASSWORD path is used unchanged and the username field is
hidden, so deploying this can't lock the existing install out.
manage_users.py prompts for passwords via getpass — never echoed, never
a CLI argument — and only ever writes hashes; it refuses to remove the
last account, which would silently drop the dashboard back to the shared
password.

Two fixes carried along: login no longer requires the LOGIN_PASSWORD env
var specifically, so a settings.json-only password works instead of
locking you out; and the legacy comparison now uses hmac.compare_digest,
which the old docstring claimed but '==' didn't provide.

Also gitignores settings.json and data/ — they hold API keys and now
password hashes, were excluded from the deploy rsync but not from git.

Verified: legacy fallback still signs in with no accounts configured; a
9-case credential matrix (right/wrong user x right/wrong password, plus
the retired shared password); per-user change-password scoped to the
signed-in account and live without restart; and the add/passwd/remove
guards.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 13:03:21 -07:00
.claude Make the listen port configurable via PORT 2026-08-27 07:51:07 -07:00
.forgejo/workflows Persist settings.json across deploys via a data volume 2026-08-26 09:34:46 -07:00
arr-summary Initial commit: Arr Summary source from server 2026-08-25 22:59:31 -07:00
nginx Initial commit: Arr Summary source from server 2026-08-25 22:59:31 -07:00
static Add per-user logins alongside the shared password 2026-08-27 13:03:21 -07:00
templates Add per-user logins alongside the shared password 2026-08-27 13:03:21 -07:00
.env.example Initial commit: Arr Summary source from server 2026-08-25 22:59:31 -07:00
.gitignore Add per-user logins alongside the shared password 2026-08-27 13:03:21 -07:00
app.py Add per-user logins alongside the shared password 2026-08-27 13:03:21 -07:00
CLAUDE.md Add per-user logins alongside the shared password 2026-08-27 13:03:21 -07:00
docker-compose.yml Persist settings.json across deploys via a data volume 2026-08-26 09:34:46 -07:00
Dockerfile Initial commit: Arr Summary source from server 2026-08-25 22:59:31 -07:00
export-to-unraid.sh Initial commit: Arr Summary source from server 2026-08-25 22:59:31 -07:00
gunicorn.conf.py Make the listen port configurable via PORT 2026-08-27 07:51:07 -07:00
manage_users.py Add per-user logins alongside the shared password 2026-08-27 13:03:21 -07:00
requirements.txt Initial commit: Arr Summary source from server 2026-08-25 22:59:31 -07:00
UNRAID-SETUP.md Initial commit: Arr Summary source from server 2026-08-25 22:59:31 -07:00