58 lines
4.2 KiB
Markdown
58 lines
4.2 KiB
Markdown
# NFR Requirements Plan - andreaslop-client (U2)
|
|
|
|
U2 Functional Design is skipped (execution plan: no new business domain).
|
|
|
|
## Steps
|
|
- [x] Analyse unit context (requirements FR-U2-01..08, application design C1/C5/C6/C7, existing `continuous_integration.yaml`, `deploy-scp.yaml`, `SetupController`)
|
|
- [x] Collect answers to the questions below
|
|
- [x] Generate `nfr-requirements/nfr-requirements.md` and `tech-stack-decisions.md`
|
|
- [x] Security Baseline and PBT applicability (tabulated in the artifacts)
|
|
|
|
## Findings from the existing code that shape the questions
|
|
- `continuous_integration.yaml` deploys `Api.SlpSoftware` to its test host **automatically on every push to master** and has a separate opt-in production deploy. The reusable `deploy-scp.yaml` already does what Andrea needs (timestamped release, `shared/wwwroot-web` symlink, atomic `current` switch, health check), so both website-delivery variants only differ in what `shared/wwwroot-web` is.
|
|
- `POST /Setup/owner` and `GET /Setup/status` are anonymous and have **no rate limiter**; only `/Auth/login` (`login` policy: 5 per 60 s) and refresh are limited.
|
|
- The shared admin frontend is built once per publish job with Vite variables; it has `dev:slpsoftware` modes and a `useTheme` hook (light/dark).
|
|
|
|
## Pre-filled assumptions
|
|
- Scale/availability: one small instance on the test Pi; no HA; rollback = previous release kept by `deploy-scp.yaml`.
|
|
- Secrets (DB password, JWT secret, setup token, Sentry DSN) only in `shared/env` on the Pi and Gitea secrets/variables, never in the repository.
|
|
- Tech stack: no new packages; theme is plain CSS variables; token comparison via `CryptographicOperations.FixedTimeEquals`.
|
|
|
|
## Question 1: When does the ASF test deploy run?
|
|
- A) Only when someone starts the workflow manually and ticks a new box "Deploy ASF test" (recommended: a merge to master never touches Andrea's site by surprise; test only)
|
|
- B) Automatically on every push to master, like `Api.SlpSoftware`, plus the manual box
|
|
- X) Other (please describe after [Answer]: tag below)
|
|
|
|
[Answer]: B-ish (relayed via CMS and API, Bryan: Zelfde als nu): automatic test deploy on every push to master like Api.SlpSoftware, plus the manual box. Test only. Must skip cleanly while Andrea deploy variables and secrets are unset.
|
|
|
|
## Question 2: How do the pipelines relate?
|
|
- A) Add separate jobs for the Andrea client (build its admin with its theme, publish its project, call the existing `deploy-scp.yaml`); the `Api.SlpSoftware` jobs stay byte-for-byte as they are (recommended: zero risk for the existing deploy)
|
|
- B) Turn the existing publish job into a matrix over both clients (less duplication, but changes the working SlpSoftware pipeline)
|
|
- X) Other (please describe after [Answer]: tag below)
|
|
|
|
[Answer]: A (relayed via CMS and API)
|
|
|
|
## Question 3: Rate limiting for the first-admin setup endpoints
|
|
`/Setup/owner` and `/Setup/status` have no limiter today. With the optional setup token a stranger could still guess the token.
|
|
- A) Put both setup endpoints under the existing `login` limiter policy (5 per 60 s), and log failed token attempts as a security event (recommended)
|
|
- B) A new, separate `setup` limiter policy with its own settings
|
|
- C) No limiter, only the token
|
|
- X) Other (please describe after [Answer]: tag below)
|
|
|
|
[Answer]: A (relayed via CMS and API)
|
|
|
|
## Question 4: Setup token on the test instance
|
|
- A) Required on test (set in `shared/env`); the token is only needed until the first administrator exists, and it can be removed from `shared/env` afterwards (recommended)
|
|
- B) Optional on test (not set); the setup page is open until the first admin is created
|
|
- X) Other (please describe after [Answer]: tag below)
|
|
|
|
[Answer]: A (relayed via CMS and API)
|
|
|
|
## Question 5: Theme accessibility target
|
|
The theme maps Andrea's brand colours onto the admin's design tokens.
|
|
- A) Text and interactive elements must reach WCAG AA contrast (4.5:1 text, 3:1 large text and UI); where the brand colour fails, the admin uses a darker/lighter variant of it (recommended)
|
|
- B) Use the brand colours exactly as the website does, without a contrast check
|
|
- X) Other (please describe after [Answer]: tag below)
|
|
|
|
[Answer]: B (relayed via CMS and API, Bryan explicit choice): brand colours exactly as the website, no contrast check. Trade-off recorded in nfr-requirements.md.
|