No description
Find a file
Claude 2cdbf270f6
Add multi-user security service with per-app authorization
Control plane:
- Users and app grants stored in SQLite (users + user_apps tables)
- bcrypt password hashing
- Sessions: HashMap<token, user_id> (in-memory, cleared on restart)
- Bootstrap: first admin auto-created from HIY_ADMIN_USER/HIY_ADMIN_PASS if DB is empty
- /admin/users page: create/delete users, toggle admin, grant/revoke app access
- /api/users + /api/users/:id/apps/:app_id REST endpoints (admin-only)

Deployed apps:
- Every app route now uses Caddy forward_auth pointing at /auth/verify
- /auth/verify checks session cookie + user_apps grant (admins have access to all apps)
- Unauthenticated -> 302 to /login?next=<original URL>
- Authorised but not granted -> /denied page
- Session cookie set with Domain=.DOMAIN_SUFFIX for cross-subdomain auth

Other:
- /denied page for "logged in but not granted" case
- Login page skips re-auth if already logged in
- Cookie uses SameSite=Lax (required for cross-subdomain redirect flows)

https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
2026-03-20 14:22:57 +00:00
builder Add multi-user security service with per-app authorization 2026-03-20 14:22:57 +00:00
docs Replace Cloudflare DNS challenge with standard Let's Encrypt HTTP-01 2026-03-20 11:41:40 +00:00
infra Add session-based auth to dashboard and API 2026-03-20 13:45:16 +00:00
proxy Add session-based auth to dashboard and API 2026-03-20 13:45:16 +00:00
server Add multi-user security service with per-app authorization 2026-03-20 14:22:57 +00:00
.env.example Add session-based auth to dashboard and API 2026-03-20 13:45:16 +00:00
.gitattributes Add .gitattributes: force LF line endings for shell scripts 2026-03-19 09:40:26 +00:00
.gitignore Add .gitignore, remove target/ from tracking 2026-03-19 08:26:07 +00:00
Cargo.lock M1: Rust control plane, builder, dashboard, and infra 2026-03-19 08:25:59 +00:00
Cargo.toml M1: Rust control plane, builder, dashboard, and infra 2026-03-19 08:25:59 +00:00
plan.md Add MVP plan for self-hosted Heroku clone on Raspberry Pi 2026-03-19 07:38:17 +00:00