Phase 1: identity, sessions, audit, frontend shell
AD sign-in over LDAPS (search with the service account, bind as the user, nested groups through LDAP_MATCHING_RULE_IN_CHAIN, disabled accounts refused), roles as the union of PS-* groups mapped by a table derived from the seeded departments. Server-side sessions with idle, lock and absolute timeouts, Origin and X-Requested-With check, step-up unlock. Optional Argon2id PIN set with the domain password; PIN sign-in by employee ID on registered devices only; five wrong attempts disable the PIN, three wrong at unlock or signature end the session. Rate limits per account and per address before any bind. Devices, signatures table and sign helper, audit rows for every identity event, SSE over LISTEN/NOTIFY with presence. Account settings and Admin APIs and screens (AD view, devices, PIN clearing, group map with missing-group flags, refresh from AD now). CLI ad-groups --list and ad-refresh. Migration 0002. Frontend: real sign-in (password tab, PIN keypad on registered devices), lock screen, role switcher, Account settings, Admin shell, screen placeholders. CI: Samba AD DC container (PSTEST.LOCAL) with a generated CA, 49 of the 50 groups plus one extra, 17 test users; wired into the CI compose overlay and the Gitea workflow; Playwright sign-in scenario. Verified on docker-1: 171 server tests green inside the CI stack against PostgreSQL and the Samba DC, 48 frontend tests, 8 Playwright scenarios against the live stack (password and PIN sign-in, lock and unlock, Admin group map). Findings recorded in the docs: the DC needs CAP_SYS_ADMIN, a hidden tab locks only after a minute as the old build did, and the app uses the alias ps-app for Playwright because "app" is on Chromium's HSTS preload list. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
@@ -6,15 +6,15 @@ This repo is the rebuild of Packet Station as a server application: Docker Compo
|
||||
|
||||
## Status
|
||||
|
||||
**Rebuild in progress. Phase 0: skeleton, image, doctor.**
|
||||
**Rebuild in progress. Phase 1 done: identity, sessions, audit, frontend shell.**
|
||||
|
||||
No user feature exists yet. The old build on `M:\Production\Packet Station` stays the live system until go-live. The new system starts empty; nothing is migrated from M:.
|
||||
People can sign in; no packet feature exists yet. The old build on `M:\Production\Packet Station` stays the live system until go-live. The new system starts empty; nothing is migrated from M:.
|
||||
|
||||
| Area | Exists yet? |
|
||||
|---|---|
|
||||
| Repo, docs, CLAUDE.md | Yes (phase 0) |
|
||||
| Image, compose, CI, `doctor`, migration runner, security headers, build version endpoint | Yes (phase 0, image and stack verified on docker-1) |
|
||||
| Sign-in, sessions, audit, frontend shell | No (phase 1) |
|
||||
| Sign-in (AD password, PIN on registered devices), sessions, lock screen, Account settings, Admin shell, audit, SSE | Yes (phase 1, verified against the Samba DC in the CI stack on docker-1) |
|
||||
| Packets, policy, Clerical screens | No (phase 2) |
|
||||
| VISUAL feed and drawings | No (phase 3) |
|
||||
| Warehouse, shop, Q.C., close and file, PDFs | No (phases 4 to 7) |
|
||||
@@ -76,7 +76,18 @@ docker compose -p packetstation-test --env-file /etc/packetstation/test/stack.en
|
||||
-f deploy/compose.yaml -f deploy/compose.proxy.yaml up -d
|
||||
```
|
||||
|
||||
The `packetstation` command has `doctor`, `migrate`, `app` and `worker`.
|
||||
The `packetstation` command has `doctor`, `migrate`, `app`, `worker`, `ad-groups --list` (the 50 AD group names the app expects) and `ad-refresh` (create or refresh the users from the groups' members).
|
||||
|
||||
CI stack with the Samba domain controller and the Playwright scenario, on a Docker host:
|
||||
|
||||
```bash
|
||||
deploy/ci/make-secrets.sh
|
||||
docker compose -p packetstation-ci --env-file deploy/ci/ci.env -f deploy/compose.yaml -f deploy/compose.ci.yaml up -d --build --wait
|
||||
docker compose -p packetstation-ci --env-file deploy/ci/ci.env -f deploy/compose.yaml -f deploy/compose.ci.yaml --profile e2e run --rm playwright
|
||||
docker compose -p packetstation-ci --env-file deploy/ci/ci.env -f deploy/compose.yaml -f deploy/compose.ci.yaml down -v
|
||||
```
|
||||
|
||||
Server tests that need PostgreSQL run when `TEST_PG_SUPERUSER_URL` is set; the ones that need the domain controller run when the `TEST_LDAP_*` variables and `TEST_DC_USERS_FILE` are set. See [deploy/samba/README.md](deploy/samba/README.md).
|
||||
|
||||
## Docs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user