Add sessions-web, the prod-side web page and container

Stdlib-only Python app: password login (scrypt), signed SameSite=Strict
cookie, CSRF tokens, login rate limiting, strict CSP and no JavaScript. Every
action is one ssh call to sessions-ctl with a pinned host key. Ships a
Containerfile and a Podman Quadlet unit (rootless, read-only root, all
capabilities dropped, published on 127.0.0.1 only, secrets via podman secret).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
agent 2026-09-30 11:55:38 +00:00
parent 1816f6f863
commit 7a2077f730
6 changed files with 564 additions and 0 deletions

8
web/env.example Normal file
View file

@ -0,0 +1,8 @@
# ~/.config/sessions-web/env on prod — non-secret settings only (chmod 600 anyway).
# Secrets (SSH key, cookie secret, password hash) are podman secrets; see README.
SESSIONS_DEV_HOST=2.28.100.223
SESSIONS_DEV_PORT=14922
SESSIONS_DEV_USER=agent
# The reverse proxy in front sets X-Forwarded-For; trust it for rate limiting.
SESSIONS_TRUST_PROXY=1
SESSIONS_COOKIE_SECURE=1