56 lines
6.4 KiB
Markdown
56 lines
6.4 KiB
Markdown
# Build and Test summary - identity-email-notifications (U1 + U2 + U3)
|
|
|
|
Branch `feature/identity-email-notifications`, head after U3. Everything below was run locally except the MariaDB-backed API host tests, which run in CI (the developer's `appsettings.local.json` overrides the connection string on this machine).
|
|
|
|
## Build
|
|
- `dotnet build` of the solution: succeeds (no new warnings from this feature; the pre-existing NU1510 pruning warnings are unrelated).
|
|
- Frontend: `npx tsc -b` clean, `npx eslint .` clean, `vite build` for the default build and `VITE_THEME=asf` succeeds.
|
|
- New dependency: MailKit 4.18.2 (MimeKit transitive). `dotnet list package --vulnerable --include-transitive`: none.
|
|
|
|
## Unit and component tests
|
|
| Suite | Result |
|
|
|---|---|
|
|
| Core.Tests | 502 passed (mail options/validator, address rules, renderer, SMTP sender against an in-process stub, site settings, mail service, language, password-reset flow with real Identity and tokens, cooldown, dispatcher, stamp check, DI wiring; property-based tests PBT-02/03/07/08/09) |
|
|
| Modules.Identity.Tests | 126 passed (users, hierarchy, mail flows, site settings API, auth incl. forgot/reset) |
|
|
| Modules.Availability / Master / Offerings | 82 / 57 / 57 passed (unchanged) |
|
|
| Api.AndreaSlopFotografie.Tests (config) | 6 passed (mail off by default, no credential committed) |
|
|
| Frontend (Vitest) | 355 passed |
|
|
|
|
## Integration tests
|
|
- **Real MariaDB (run locally in a throw-away container, and in CI via `ConnectionStrings__DefaultConnection`)**: all migrations apply on a fresh database; the two newest are undone and re-applied (`AddSiteSettings`, `AddLanguagePreference`); the `DateTimeOffset` round trip keeps the full 24 hours whatever the written offset.
|
|
- **Real pipeline on a TestServer**: real Identity, real data-protection tokens, real JWT bearer check: deactivated or deleted users are refused with a valid token (GET and POST), a password change or reset ends earlier access tokens (stamp), refresh keeps working after a plain change, a completed reset revokes refresh tokens, a request touches nothing.
|
|
- **SMTP**: the sender talks to an in-process SMTP server (success, sender override, header-injection refused without connecting, timeout, nothing listening).
|
|
- **Not run here, runs in CI**: `Api.Tests` and the ASF `HostPipelineTests` (they start the full hosts against MariaDB and apply the new migrations through the real start-up path).
|
|
- **Manual, still to do (needs Bryan's go and the mail settings on the host)**: one real test mail from the ASF test host to an address of Bryan (invitation; "Wachtwoord vergeten?"; resend), the Mail card, the language choice, a deactivation notice. smtp4dev can be used locally first.
|
|
|
|
## Performance
|
|
Not applicable beyond: one extra indexed query per authenticated request (active and stamp check, no cache by design). Mail is sent inside administrator requests with a 10 s bound; the anonymous reset request answers immediately.
|
|
|
|
## Security checks (Security Baseline)
|
|
Input validation on every new endpoint (address allowlist, bounded lengths), anonymous endpoints rate limited and uniform (no account enumeration), tokens single-use and time-limited, no secrets or tokens or links in logs (recipient domain only), credentials only via environment, start-up validation without echoing secrets, dependency scan clean. Compliant; items N/A as listed in the requirements.
|
|
|
|
## Behaviour changes for SlpSoftware (when it is deployed there)
|
|
Access tokens issued before the release are refused once (silent refresh issues a new one); a password change ends earlier access tokens; three additive migrations (`SiteSettings`, `Users.PreferredLanguage`, `Invitations.Language`); default token providers registered; two new anonymous endpoints that answer 404 while mail is off; nothing else changes without an SMTP host.
|
|
|
|
## Open items before the feature can close
|
|
1. The real test mail on ASF test (manual, above). 2. Operations stage (deployment config, monitoring, production readiness incl. the SPF/DKIM alignment checklist). 3. Bryan's approval of this stage.
|
|
|
|
|
|
## Update 2026-11-09: later changes on this branch (all with tests, all pushed)
|
|
| Change | Test evidence |
|
|
|---|---|
|
|
| D2 stamp in the access token (built in U2) | Core: real Identity + real tokens, password change ends earlier access tokens, refresh issues a new one |
|
|
| Soft mail configuration: a half-finished mail configuration starts the host with mail OFF and one Error line naming the settings (no values, no secrets) | `MailSoftFailureTests`, `DeployedConfigurationTests` for master, slave, SlpSoftware, ASF |
|
|
| `Website__LogLevel` (systemd drops variable names with a dot) | `WebsiteLogLevelTests` |
|
|
| Role hierarchy in the API; the caller is recognised by the user id of the token (a real token has no name claim: an Owner got 403 promoting to Owner) | `UsersApiWithRealTokensTests` (real tokens, real pipeline; 5 of 7 failed before the fix) |
|
|
| Mail diagnostics: SMTP command failure phase and status, redacted first reply line, specific codes (`rejected_sender`, `rejected_recipient`, `tls_failed`, `connection_failed`), `timeout_connect/auth/send`, a timeout of its own per step (it was one shared budget), `TimeoutSeconds` 1..120 | `SmtpFailureTests`, `SmtpSenderDiagnosticsTests` (SMTP stub that refuses or stalls), property test (control characters could re-glue an address) |
|
|
| "New invitation link" mails only on request (`sendEmail`), with a choice dialog | controller, real-HTTP and UI tests |
|
|
| Layout: only the content scrolls, the sidebar stays | layout class tests |
|
|
| Redirect timers cleaned up on unmount (a CI-only "window is not defined") | page test fails on the old code, `useDelayedAction` tests |
|
|
| Availability gate only covers `/api/` (a disabled CMS still serves the website and `/admin`) | 27 new Availability tests incl. a real in-memory pipeline; 16 failed before |
|
|
| Setup page never shown for an unreadable setup status; login notice for a disabled CMS | 6 error cases (5 failed before), limiter test |
|
|
|
|
Current counts (local, last full run): Core 563, Identity 141, Availability 109, Master 57, Offerings 57, ASF host configuration 6, frontend 390. CI (with MariaDB): all green on the runs 626 and before; the MariaDB-backed migration up/down/up and `DateTimeOffset` round trip run there.
|
|
|
|
Still open for this stage: the manual real test mail from the ASF test host (the SMTP sender address and TLS mode of `mail.andreaslop.nl` are being sorted out by Bryan and Pi-Main; the failure diagnostics above exist to see why a mail is refused) and Bryan's approval.
|