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:
+38
-18
@@ -133,21 +133,41 @@ jobs:
|
||||
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||
provenance: false
|
||||
|
||||
# Phase 1: end to end. Compose up with the CI overlay and the Samba DC, seed fixtures,
|
||||
# run the Playwright scenarios, upload the report, then down -v.
|
||||
# e2e:
|
||||
# needs: [server, frontend]
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - run: deploy/ci/make-secrets.sh
|
||||
# - run: >-
|
||||
# docker compose -p packetstation-ci --env-file deploy/ci/ci.env
|
||||
# -f deploy/compose.yaml -f deploy/compose.ci.yaml up -d --build --wait
|
||||
# - run: >-
|
||||
# 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
|
||||
# - if: always()
|
||||
# run: >-
|
||||
# docker compose -p packetstation-ci --env-file deploy/ci/ci.env
|
||||
# -f deploy/compose.yaml -f deploy/compose.ci.yaml down -v
|
||||
# End to end. Compose up with the CI overlay and the throwaway Samba DC, run the Playwright
|
||||
# scenarios, upload the report, then down -v. The runner needs a Docker daemon whose bind
|
||||
# mounts see this checkout (open question 15, deploy/samba/README.md).
|
||||
e2e:
|
||||
needs: [server, frontend]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
COMPOSE: >-
|
||||
docker compose -p packetstation-ci --env-file deploy/ci/ci.env
|
||||
-f deploy/compose.yaml -f deploy/compose.ci.yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Throwaway secrets
|
||||
run: bash deploy/ci/make-secrets.sh
|
||||
|
||||
- name: Stack up (app, worker, postgres, Samba DC)
|
||||
run: $COMPOSE up -d --build --wait --wait-timeout 300
|
||||
|
||||
- name: Playwright
|
||||
run: $COMPOSE --profile e2e run --rm playwright
|
||||
|
||||
- name: Stack logs
|
||||
if: failure()
|
||||
run: $COMPOSE logs --no-color --tail 300 samba-dc migrate app worker
|
||||
|
||||
- name: Upload Playwright report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: playwright-report
|
||||
path: tests/e2e/playwright-report
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Stack down
|
||||
if: always()
|
||||
run: $COMPOSE --profile e2e down -v
|
||||
|
||||
Reference in New Issue
Block a user