Files
slp-modular-cms/aidlc-docs/features/andreaslop-site-hosting/handback-u2.md
T

5.7 KiB

Hand-back U2 - andreaslop-client

Branch feature/andreaslop-site-hosting (3 U2 commits on top of the U1 ones, not pushed, nothing deployed). Code summary: construction/andreaslop-client/code/code-summary.md. Test deploy status: not done, it needs Bryan's explicit go in this session and the Pi steps (construction/andreaslop-client/infrastructure-design/manual-steps-for-bryan.md, final).

1. What was built

  • New client SlpModularCms.Api.AndreaSlopFotografie (Identity + Availability; no Master, no Offerings), WebsiteMode.PrerenderedPages, port 5200, StrictSite default policy with the website's Umami/Sentry origins, Website:NoIndex=true committed, tests project.
  • Optional first-admin setup token (Identity:Setup:Token, X-Setup-Token, 401 identical for missing/wrong, tokenRequired in GET Setup/status, both setup endpoints under the login limiter, security event setup_token_rejected 5007).
  • Shared Core change (option B): opt-in ForwardedHeaders:KnownProxies and per-client-address rate-limit partitions for login, refresh, sentry-tunnel, offerings-public. Without configuration the old behaviour applies to Api, Api.SlpSoftware, Api.Slave.
  • Admin theme asf (VITE_THEME=asf, website palette exactly, Marcellus/Jost self-hosted, the website's real favicon.png), VITE_DEFAULT_LANGUAGE=nl (stored choice still wins), token field on the setup page.
  • CI: config-asf, publish-asf-test, deploy-asf-test behind Gitea variable ASF_TEST_DEPLOY_ENABLED == 'true', manual box "Deploy ASF test"; existing jobs, env block and deploy-scp.yaml unchanged (diff = additions only).

2. Names (for U3 and Pi-Main)

Gitea variables ASF_TEST_DEPLOY_ENABLED, DEPLOY_PATH_ASF_TEST, SERVICE_NAME_ASF_TEST (same form as SERVICE_NAME_TEST), HEALTH_CHECK_URL_ASF_TEST, VITE_SENTRY_DSN_ASF (DSN of the ASF website Sentry project); jobs publish-asf-test/deploy-asf-test; theme frontend/themes/asf; unit andreaslopfotografie-test; folder apps/andreaslopfotografie/test; DB AndreaSlopFotografieTest / user AndreaSlopFotografie; port 5200; shared/env variables listed in infrastructure-design.md.

3. U1 correction found during U2

The 301 Location was built from the decoded path without re-encoding: /a%3Fb/ redirected to /a?b (another resource), # would start a fragment, non-ASCII ended up raw in a header value. Found by the existing property test (flaky about 1 in 15 runs), fixed with PathString.ToUriComponent plus regression tests. Normal paths are unchanged. The host is never worse than before for such paths; whether nginx encodes identically is for the web verify (one encoded path), I cannot run nginx here.

4. Test results

  • Green locally: Core 351, Identity 57, Availability 82, Master 57, Offerings 57, ASF host configuration 5, frontend 293 (Vitest), ESLint and tsc -b clean, frontend builds for default and asf verified.
  • Not run here (no MariaDB on this machine): Api.Tests and Api.AndreaSlopFotografie.Tests/HostPipelineTests. The CI job backend-test starts MariaDB and runs them; the result will be reported after the first push and CI run.
  • CI proof (branch feature/andreaslop-site-hosting, head e37b8f3, workflow_dispatch, all deploy inputs false): run 606 failed on one frontend test (first test of SetupPage.test, lazy-route spinner still shown after 8 s on the slow runner; CI frontend-test takes ~290 s, also on master); run 607 on the same commit is fully green: backend-test with MariaDB (Api.Tests 4/4, ASF host tests 10/10 incl. HostPipelineTests, Core 351, Identity 57, Availability 82, Master 57, Offerings 57), vulnerability-scan, frontend build/test/lint. Conclusion: cold-start timing flake of the first lazy-loaded test, not a defect; hardening is optional. No deploy job ran (all publish/deploy jobs skipped). config-asf ran because ASF_TEST_DEPLOY_ENABLED=true was set, which shows that vars in a job-level if: works on this Gitea.
  • Not yet observed, only possible on the first test deploy: forwarded headers and HTTP/1.0 behind the proxy Pi, vars in a job-level if: on this Gitea, per-request file lookup timing on the Pi.

5. Information, no action needed

  • Contrast pairs below WCAG AA (decision Q5 = B, colours exactly as the website): border on background 1.30:1 (decorative line colour) and ink-3 #8a827a on paper 3.54:1 (not used as a text colour by the theme). All text and button pairs pass AA, in light mode with the website palette. Dark mode is derived (the website has none; button accent lightened to #8a9681 for 5.16:1).
  • Radius 0.25rem is a choice; the website defines no radius token.
  • logo.png is not used: the admin has no logo element and the scope is tokens + favicon.
  • The admin favicon is themes/asf/favicon.png (copied read-only from the website; the website repo was not touched).

6. Open items and risks

  1. Vulnerability gate (pre-existing advisories) - resolved with Bryan's go (option A): System.Security.Cryptography.Xml pin 10.0.10 -> 10.0.14 in Core and the Availability/Master/Offerings test projects (transitive Pkcs follows); frontend zod ^4.6.6 and @tanstack/react-router 1.170.46 (pulls seroval 1.7.9). dotnet list package --vulnerable is clean and pnpm audit --prod finds nothing; all suites rerun green. Shared packages changed: SlpSoftware and the other hosts get these patched versions too (DataProtection uses the Xml package), so watch the first SlpSoftware test deploy after merge.
  2. Setup token must be removed from shared/env after the first administrator exists (step 17).
  3. The proxy block change is only the proxy_pass target (port 5200); the website repo generator is updated in U3.
  4. Production for ASF is out of scope.