Commit Graph
53 Commits
Author SHA1 Message Date
SluijsensandClaude Sonnet 5.5 01703ccddf Hero: zelftest en mapcontrole van de media draaien op de achtergrond, zodat de host niet later gaat luisteren
De hosted services starten voor de webserver; de zelftest van Magick (laden van de native bibliotheek en een testcodering) kostte op de Pi ongeveer 9 s voordat de host luisterde.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 17:20:59 +01:00
SluijsensandClaude Sonnet 5.5 4369c905cd H4: hero in de eerste HTML (regio, preload), gedeeld datablok met contributors (Offerings byte-identiek), ASF golden files, volledige pijplijntest
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 15:58:02 +01:00
SluijsensandClaude Sonnet 5.5 43925cbf37 H3: mediaopslag in een map buiten de release, /media-endpoint (immutable, 404 voor al het andere), mapcontrole en snelheidsbeleid
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 15:21:08 +01:00
SluijsensandClaude Sonnet 5.5 3a50c9750e H1: beeldpijplijn in Core.Media (Magick.NET achter IImageProcessor), pure functies met property-tests, uploadwacht
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 15:18:02 +01:00
SluijsensandClaude Sonnet 5.5 352f84b860 Vertaalbestanden 7: resterende Engelse API-antwoorden (wachtwoord/gebruikersbeheer, 13) en interne-serverfoutzin naar de tekstbestanden; docs/mail-teksten.md (gegenereerd overzicht van alle mailteksten)
TWEEDE GEDRAGSWIJZIGING (goedgekeurd): de 13 Engelse antwoorden van auth/users zijn Nederlands bij Texts:DefaultLanguage=nl; en-bestand = oude tekst letterlijk. De admin toont voor wachtwoord vergeten zijn eigen tekst.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 20:54:06 +01:00
SluijsensandClaude Sonnet 5.5 2307417134 Vertaalbestanden 5-6/6: placeholder-pagina en 'Boek {name}' naar de tekstbestanden; docs/translation-files.md
Placeholder: sjabloon met {{tokens}}, zinnen in core.host.placeholder.*; vergeleken met het originele bestand (zonder witruimte). 'Boek {name}' in offerings.injection.book; ASF-golden files blijven groen.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 20:49:23 +01:00
SluijsensandClaude Sonnet 5.5 8f867d3dda Vertaalbestanden 5a/6: karakteriseringstest van de placeholder-pagina
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 20:45:52 +01:00
SluijsensandClaude Sonnet 5.5 3c3a29bacc Vertaalbestanden 3/6: Identity- en Availability-meldingen naar de tekstbestanden (core.identity.*, availability.*)
Nederlandse tekst ongewijzigd (tests op exacte tekst). De uitzondering MasterControlledAvailabilityException krijgt een technische Engelse melding; de zin voor de beheerder komt uit availability.masterControlled.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 20:41:32 +01:00
SluijsensandClaude Sonnet 5.5 000d0a61b4 Vertaalbestanden 2b/6: mailteksten naar Texts/nl.json en en.json (core.mail.*), renderer via ITextCatalog; uitvoer byte-identiek (42 karakteriseringstests)
Geen gedragswijziging: benoemde plaatshouders {site}/{role}/{validity}/{name}/{count} i.p.v. {0}/{1}/{2}; uur/uren-meervoud in de bestanden.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 17:35:12 +01:00
SluijsensandClaude Sonnet 5.5 893315086f Vertaalbestanden 2a/6: karakteriseringstests van alle mails (7 soorten x nl/en/fr x volledig/kaal), opgenomen uit de huidige renderer
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 17:31:25 +01:00
SluijsensandClaude Sonnet 5.5 4c1cdd054f Vertaalbestanden 1/6: tekstcatalogus (JSON per taal, benoemde plaatshouders, typed sleutels, lagen: map-override en later database, fail-soft) + TextAudit en tests
Embedded resources met WithCulture=false (anders maakt de SDK van 'X.Texts.en.json' een satellite-assembly).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 17:29:41 +01:00
SluijsensandClaude Sonnet 5.5 a13661517d ASF-injectie 2/5: HtmlMarkerInjector (alle html/xml/txt van de prerendered host, adresvervanging, transforms, fail-open, begrensde cache) + tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 16:06:17 +01:00
SluijsensandClaude Sonnet 5.5 7d66944019 ASF-injectie 1/5: HtmlMarkerEditor (regio's, data-blok, ld+json, inline waarden, script-escaping) met tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 16:03:52 +01:00
SluijsensandClaude Sonnet 5.5 24168c68a1 Fase B1: Website:Mode via configuratie (ASF kiest in appsettings), Api = alle-modules-compositie; flaky SMTP-test gerepareerd
- CmsHostOptions.ResolveWebsiteMode: Website:Mode wint van de code, default SpaFallback, onbekende waarde stopt de host.
- ASF: Website:Mode=PrerenderedPages in appsettings.json, Program.cs zonder eigen modus.
- SlpModularCms.Api verwijst nu ook naar Offerings en Contact met generieke default-config (Website/Email/App/Contact/RateLimiting).
- SmtpFailureTests: '535' als los getal, niet als substring van een willekeurige poort.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 15:00:56 +01:00
SluijsensandClaude Sonnet 5.5 32b98fea98 Website: host vervangt het productie-basisadres in index.html door Website__PublicBaseUrl op testinstanties (Website:AuthoredBaseUrl)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 11:44:02 +01:00
SluijsensandClaude Sonnet 5.5 284ff1f91a U6: IndexHtmlInjector (markers OFFERINGS-JSON-LD / OFFERINGS-HTML), 60s cache, invalidatie bij wijziging, ETag
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 23:48:48 +01:00
SluijsensandClaude Sonnet 5.5 a7460a0f9b U6: SpaFallback-SEO: Website:NoIndex (X-Robots-Tag), robots.txt, sitemap.xml en KnownPaths (echte 404)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 23:44:04 +01:00
SluijsensandClaude Sonnet 5.5 5378c21799 Contact: captcha-regio (global/eu) in de token-response en frame-src voor de StrictSite-CSP (CMS-U9 vervolg)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 23:11:07 +01:00
SluijsensandClaude Sonnet 5.5 7974d22912 Contact-mail: vervolg op review (notitie weg, tekstdeel ingesprongen, nieuwe Core-tests voor details en Reply-To)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 15:31:49 +01:00
SluijsensandClaude Sonnet 5.5 a58374abeb Beschikbaarheidspoort laat publieke site-endpoints door en 429 geeft Retry-After met ProblemDetails
Nieuwe marker [PublicSiteEndpoint] (deny-by-default): alleen GET /offerings blijft bereikbaar als het CMS uit staat of in onderhoud is; alle andere acties, adminroutes inbegrepen, blijven 503. OnRejected zet Retry-After en schrijft application/problem+json met alleen type, title en status. Op master zijn de limiet-policies nog globale buckets: de contactroutes mogen pas live na de per-client-partitionering van de ASF-branch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 13:07:18 +01:00
SluijsensandClaude Sonnet 5.5 2818b74604 Mail dark: pagina #080b10 / card #2b3648 met subtiele rand alleen in de dark-regels; licht zonder rand; conversiesimulatie en kleurconflict-test
Continuous Integration / config (pull_request) Successful in 10s
Continuous Integration / changes (pull_request) Successful in 23s
Continuous Integration / config-asf (pull_request) Successful in 9s
Continuous Integration / backend-build (pull_request) Successful in 5m11s
Continuous Integration / vulnerability-scan (pull_request) Successful in 4m22s
Continuous Integration / frontend-prepare (pull_request) Successful in 1m27s
Continuous Integration / backend-test (pull_request) Successful in 7m43s
Continuous Integration / frontend-build (pull_request) Successful in 2m3s
Continuous Integration / frontend-test (pull_request) Successful in 6m5s
Continuous Integration / frontend-lint (pull_request) Successful in 1m52s
Continuous Integration / publish-production (pull_request) Skipped
Continuous Integration / deploy-production (pull_request) Skipped
Continuous Integration / publish-asf-test (pull_request) Skipped
Continuous Integration / deploy-asf-test (pull_request) Skipped
Continuous Integration / publish-test (pull_request) Successful in 6m7s
Continuous Integration / deploy-test (pull_request) Skipped
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 10:07:32 +01:00
SluijsensandClaude Sonnet 5.5 65ee73f3d1 Mail: gutter van 16 px rond de card (inline op de buitenste cel), zodat de paginakleur aan de zijkanten zichtbaar blijft
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:47:02 +01:00
SluijsensandClaude Sonnet 5.5 195443d9a9 Master-URL: ongeldige of placeholder-waarde wordt nooit opgeslagen of verstuurd (master slaat achtergrondchecks over, slave weigert met 400, poller meldt invalid_master_url); veilige diagnostiek bij een mislukte poll; releasenote Master__MasterUrl
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:08:47 +01:00
SluijsensandClaude Sonnet 5.5 64a467b41b Sessie: een start-refresh zonder oordeel (429/5xx/netwerk) zet de gebruiker niet meer op gast maar toont een retry-scherm; Retry-After wordt gestuurd en gerespecteerd
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:04:49 +01:00
SluijsensandClaude Sonnet 5.5 b8f6b25121 Mail: inline rand om de card en Outlook-selectors voor dark mode (media-query blijft, licht ongewijzigd)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 20:59:11 +01:00
SluijsensandClaude Sonnet 5.5 1b7660824a Mail: sitenaam naast het logo; dark mode: card zichtbaar lichter dan de pagina plus rand
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 19:49:53 +01:00
SluijsensandClaude Sonnet 5.5 a9b9ad2931 Mail-logo als vooraf samengestelde witte badge (geen grijze plaat); succes-toast bij rolwijziging
- themes/asf/logo-mail.png (+ make-mail-logo.py), geleverd als /admin/brand-logo-mail.png; ASF Email:LogoUrl wijst ernaar
- Renderer: plaat weggehaald, licht logo 56px, dark-swap naar LogoDarkUrl blijft
- UsersPage: toast na geslaagde rolwijziging (nl+en, ook Owner-bevestiging)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 16:11:33 +01:00
SluijsensandClaude Sonnet 5.5 2cdcb9d868 Mail: donker logo voor dark mode (Email:LogoDarkUrl) en lichte plaat achter het logo
- Optionele Email:LogoDarkUrl, zelfde validatie als LogoUrl; leeg = geen swap
- Twee img-klassen; dark-blok verbergt het lichte logo (incl. mso-hide) en toont het donkere
- Lichte afgeronde plaat (bgcolor + vlak verloop) achter het logo als vangnet voor clients die media queries negeren of inverteren
- ASF: LogoDarkUrl = /admin/brand-logo-on-dark.png (publiek bereikbaar gecontroleerd); SLP leeg (geen on-dark logo)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 13:21:58 +01:00
SluijsensandClaude Sonnet 5.5 f48642e6e8 Mail: merkkleur SLP Software (#ac0000) en dark-mode-robuuste knop
- SlpSoftware appsettings: Email:BrandColor = #ac0000 (primary uit de admin-CSS, BR-U1-07)
- Knop als bulletproof tabelknop (bgcolor + style, rand), tekstkleur automatisch >= 4.5:1
- color-scheme/supported-color-schemes meta + prefers-color-scheme: dark blok met lichtere accentkleur
- MailColours (contrastberekening); IsValidColour-pad ongewijzigd, tests incl. injectie

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 11:29:00 +01:00
SluijsensandClaude Sonnet 5.5 3a9e4ae7aa E-mailfeature Operations: deployment, monitoring, productiegereedheid; configuratiefouten als Error-log
Mislukte mails door een configuratieprobleem (auth_failed, rejected_sender, tls_failed, not_configured) worden
als Error gelogd zodat Sentry een alert stuurt; timeouts en ontvangerproblemen blijven Warning.
Documentatie: uitrol per host met de hand in shared/env, rollback, monitoringplan, checklist; ASF-productie op
IIS als open punt voor een latere feature.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 09:24:19 +01:00
SluijsensandClaude Sonnet 5.5 190deb0da8 Mail: timeout per stap met fase en verstreken tijd in het log
De SMTP-verzender gaf alle stappen samen een tijdsbudget; nu krijgt elke stap (verbinden met STARTTLS,
inloggen, versturen) zijn eigen volledige timeout. Bij een timeout noemt de code de stap
(timeout_connect, timeout_auth, timeout_send) en toont het log per stap de verstreken milliseconden.
TimeoutSeconds blijft instelbaar (standaard 10), bereik nu 1 tot 120. Infra-doc met veiligheidsmodus,
timeout en leeswijzer voor het journal.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 01:30:16 +01:00
SluijsensandClaude Sonnet 5.5 daaadcbdf7 Mail: diagnose van SMTP-weigeringen en keuze bij een nieuwe uitnodigingslink
SMTP: bij een geweigerd commando logt de verzender fase, statuscode en de eerste regel van het serverantwoord
(adressen vervangen, max 120 tekens); specifiekere foutcodes (rejected_sender, rejected_recipient, tls_failed,
connection_failed) die de beheerder in het venster ziet; opstartlog met SMTP-host, poort en standaard
afzenderdomein. Uit de property-test: besturingstekens worden eerst verwijderd, anders kon een adres weer
aan elkaar plakken.
Nieuwe uitnodigingslink: regenerate-invite mailt alleen met sendEmail=true (standaard false); eerst een
keuzevenster 'Alleen link kopieren' / 'Link kopieren en mailen' (zonder mail alleen de link).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 22:30:05 +01:00
SluijsensandClaude Sonnet 5.5 bd9790819d Halve of foute mailconfiguratie: host start, mail uit, een duidelijke Error-logregel
Eén bron (IMailAvailability) bepaalt of mail aan staat: SMTP-host gezet EN de hele mailconfiguratie geldig.
Anders start de host gewoon, gebruikt de Null-verzender, meldt emailEnabled=false en logt eenmalig
mail_configuration_invalid met de namen van de ontbrekende of ongeldige instellingen (nooit waarden of
geheimen). Getest: halve config, elke soort fout, geen geheim in het log, volledige config werkt als
voorheen, geen mailinstelling geeft geen enkele waarschuwing, alle verbruikers zien mail als uit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 20:51:41 +01:00
SluijsensandClaude Sonnet 5.5 142815a3ab Opstart zonder mailconfiguratie getest voor alle hosts, Website__LogLevel zonder punt in de naam
Oorzaak 502 op ASF test: Email__Smtp__Host stond al in de omgeving maar App__PublicBaseUrl nog niet;
de startvalidatie weigert zo'n halve mailconfiguratie. Een host zonder enige mailinstelling start
gewoon: nu voor master, slave, SlpSoftware en ASF getest. Website__LogLevel vervangt de
Logging__LogLevel__SlpModularCms.Website-variabele, waarvan systemd de naam met punt negeert.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 20:40:50 +01:00
SluijsensandClaude Sonnet 5.5 c8e23826c3 U3 password-reset (backend): wachtwoord vergeten en opnieuw instellen
POST auth/forgot-password antwoordt altijd hetzelfde (202) en handelt de mail na het antwoord
af; POST auth/reset-password zet een nieuw wachtwoord met de link uit de mail. Alleen een
voltooide reset trekt alle refresh tokens in (en beeindigt eerdere access tokens via de
security stamp); het aanvragen raakt niets. Link eenmalig en tijdsbeperkt (standaard 60 minuten),
cooldown van 5 minuten per adres in het geheugen, beide endpoints onder de login-limiter.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 19:21:29 +01:00
SluijsensandClaude Sonnet 5.5 149f81a479 U2 identity-mail-flows (backend): taal per gebruiker, uitnodigingsmail, opnieuw versturen, meldingen, stamp-controle
Kolommen Users.PreferredLanguage en Invitations.Language (additieve migratie). IdentityMailService
verstuurt uitnodiging, nieuwe link en meldingen bij deactiveren, heractiveren en rolwijziging;
een mailfout laat nooit een actie falen, het resultaat gaat mee in de respons naast de
kopieerbare link. Nieuwe actie resend-invite. De security stamp zit in het access token en wordt
vergeleken in de actief-controle: een wachtwoordwijziging beeindigt eerder uitgegeven access tokens,
de refresh geeft stil een nieuw token.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 19:10:44 +01:00
SluijsensandClaude Sonnet 5.5 745f0b2203 U1 mail-foundation (backend): verzender, opties, sjabloon, SiteSettings met toegestane afzenderlijst
IEmailSender met MailKit-implementatie (StartTls, timeout, fouten als waarde), opties met
startvalidatie, nl/en sjabloon, taalkeuze, tabel SiteSettings (additieve migratie),
SiteSettings-API (Beheerder leest, Eigenaar wijzigt) en emailEnabled/defaultLanguage in de
capabilities. Zonder SMTP-host verandert er niets.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 18:22:26 +01:00
SluijsensandClaude Sonnet 5.5 026a12a3f1 Gebruikersbeheer: rolhierarchie in de API afdwingen en uitnodiging opnieuw aanmaken
Een Beheerder mag alleen gebruikers met rol User verwijderen, deactiveren, van rol wisselen
of hun uitnodiging intrekken, en kent nooit de Owner-rol toe. De regels staan op een plek
(UserManagementRules) en worden in de API afgedwongen. Nieuwe actie om een openstaande of
verlopen uitnodiging een nieuwe link te geven (oude link vervalt).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 15:59:10 +01:00
SluijsensandClaude Sonnet 5.5 ed7a172f44 Uitnodigingen: geldigheid instelbaar (standaard 24 uur) en verlopen uitnodigingen zichtbaar en verwijderbaar
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 15:49:32 +01:00
SluijsensandClaude Sonnet 5.5 3535d14987 Uitnodigingen: naam opslaan en hetzelfde e-mailadres opnieuw kunnen uitnodigen
De naam uit het uitnodigingsformulier werd niet opgeslagen (profiel en verwijder-dialoog
toonden het e-mailadres). Een geaccepteerde uitnodiging bleef na het verwijderen van de
gebruiker staan en blokkeerde het adres; het conflict gaf een 500. Nu 409 met een
specifieke melding en opruimen van verouderde uitnodigingen.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 14:36:09 +01:00
SluijsensandClaude Sonnet 5.5 33a7500648 Beveiliging: gedeactiveerde of verwijderde gebruiker wordt direct geweigerd
Het JWT werd alleen op handtekening en looptijd gecontroleerd, dus een gedeactiveerde
gebruiker kon tot het verlopen van het token lezen en schrijven. Nu controleert de
bearer-validatie per request of het account bestaat en actief is, en weigert de refresh
een inactieve gebruiker.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 14:36:09 +01:00
SluijsensandClaude Sonnet 5.5 d0c1d26c5c Herstel: admin-bestanden geven 404 in PrerenderedPages-modus
De catch-all 404-route van de website werd ook voor /admin/... gekozen, waardoor de
static-file-middleware (die routes met endpoint overslaat) de adminbestanden niet
serveerde. Een routeconstraint houdt de gereserveerde prefixes buiten die route.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 11:12:13 +01:00
SluijsensandClaude Sonnet 5.5 88f5d20a78 Voeg Api.AndreaSlopFotografie toe met setup-token, proxy-bewuste limiters en ASF-admin-thema
- Core: opt-in ForwardedHeaders:KnownProxies en rate limiters per clientadres
  (zonder configuratie ongewijzigd gedrag)
- Identity: optioneel setup-token (X-Setup-Token), beide setup-endpoints onder de
  login-limiter, beveiligingsgebeurtenis setup_token_rejected (5007)
- Nieuw client-project SlpModularCms.Api.AndreaSlopFotografie (Identity + Availability)
  met bijbehorende tests
- Frontend: thema asf (VITE_THEME), VITE_DEFAULT_LANGUAGE, tokenveld op de setup-pagina
- CI: jobs publish/deploy-asf-test achter ASF_TEST_DEPLOY_ENABLED
- Fix U1: 301-Location wordt nu percent-encoded (gevonden door de property-test)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 01:16:34 +01:00
SluijsensandClaude Sonnet 5.5 7d21d9024a Voeg WebsiteMode.PrerenderedPages toe: nginx-gelijke serving van een voorgerenderde website
- Pure WebsitePathResolver (canonieke 301's, echte 404, dotfiles geweigerd, gereserveerde prefixes)
- PrerenderedSiteMiddleware, 404-fallback na de API-routes, gzip, Cache-Control, NoIndex/robots.txt
- Beleid StrictSite met eigen AllowedSite*Origins; volledige headerset op alle websiteresponses
- Tests: voorbeelden, FsCheck-properties en integratietests op een in-memory server

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 15:52:04 +01:00
Sluijsens 33d18ebbf8 Switches the database from SQL Server to MariaDB
The target Pi only has MariaDB, and SQL Server has no ARM64 build at
all - not a config problem, a real gap discovered during deployment
setup. Swapped the EF Core provider, regenerated every migration,
updated connection strings and the backup script everywhere they
appear.

Took two tries to land on a provider that actually works: Pomelo
builds fine against this project's EF Core 10 packages but fails at
runtime (it's compiled against 9's internal API surface, which moved
in 10 wherever Identity/DataProtection force the newer packages).
Oracle's official provider builds and migrates fine but has a real
MariaDB bug in its own migration-lock code, reproduced against a live
database. Kept Oracle's provider and worked around just that one
broken method - everything else it does is correct - rather than
give up more of the stack to chase a workaround.

Verified against a real local MariaDB end to end: all three
migrations applied, both hosts start clean, full suite still green.
2026-07-29 11:59:09 +02:00
SluijsensandClaude Opus 5 8e79a72340 Makes the application say what it is doing and when it fails
U4. Console logging plus Sentry, a same-origin tunnel so ad blockers cannot
silence browser errors, Umami on the admin SPA, and six security events that
alert rules can actually be built on.

The correlation id is the W3C trace id from the ambient Activity, enabled by
one line of ActivityTrackingOptions so every entry from every category carries
it without touching a call site. It propagates across the master/slave
boundary via traceparent, which TraceIdentifier cannot do at all, and it is
the same value ProblemDetails already returns to the browser.

The security events use source-generated LoggerMessage with constant
templates. Sentry groups log events by message, so interpolating an email
address would give every address its own issue and "more than 20 failed
logins in five minutes" could never fire — the events would arrive, be
visible, be tagged, and the alerting would silently be impossible. A test
asserts the rendered message is identical across argument values.

Scrubbing happens in-process, before transmission, and covers Set-Cookie as
well as Cookie: the login response issues the refreshToken there, so
scrubbing only the request side would protect nothing. Transactions are
scrubbed too, because they carry request data and are the channel nobody
thinks of.

The tunnel derives its destination from the DSN once at startup and reads
nothing from the request, which is what separates a tunnel from a
server-side request forgery primitive. Size is capped by a bounded read
rather than by trusting Content-Length, and the endpoint is rate limited.

Two things found along the way. Zod 4's url() hands the value to the URL
constructor, which accepts any scheme — so the existing frontend validation
would have accepted the exact "htp://" typo BR-U4-24 names, and the SPA
would have called a nonexistent origin. Now constrained to http(s). And the
new appsettings comments are verified against the real configuration
provider, because the failure mode if it rejected them is both hosts
refusing to start after a release switch.

One deviation. IAdminTokenValidator was meant to gain a reason-reporting
overload; implemented that way, a substitute returning false by default
silently inverted the access decision while both methods compiled. Two
methods whose difference is invisible at the call site is the defect, so it
is now a single Validate returning AdminTokenResult.

Touches two files from already-committed units: DatabaseMigrationExtensions
(U2) gains a flush before the rethrow, or the one Critical event in the
system dies with the process; AdminTokenValidator (U1) classifies why a
bypass was refused.

Build 0 errors; 366 backend tests pass, up from 315, and 237 frontend tests,
up from 213. tsc clean, eslint clean on every changed file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHoJpxYXzHACSQguHrC5fw
2026-07-28 11:25:54 +02:00
SluijsensandClaude Opus 5 a122548454 Sends the security headers from the application instead of the proxy
U3. These headers normally come from nginx, but the deployment target does
not allow server configuration, so the application emits them itself. That
changes the failure mode: a bad nginx config fails loudly at reload, while a
middleware that never runs sends nothing and says nothing.

Two policies, defined in code. Strict for /admin, /api/v1 and /health;
relaxed for the public website, which is authored elsewhere by someone who
has never seen this policy. Configuration decides where a policy applies and
which external origins are permitted; it cannot invent a policy that is
subtly permissive.

script-src 'self' under Strict has no 'unsafe-inline' and no 'unsafe-eval',
asserted by a test so that loosening it means deleting a test that says why.
style-src does carry 'unsafe-inline' and cannot not: Radix positions its
overlays with inline style attributes, which nonces cannot reach at all.

Two traps handled explicitly. StartsWithSegments rather than string
StartsWith, because "/administrator".StartsWith("/admin") is true and a
public page would silently lose its inline scripts with no server-side trace.
And all decision logic sits in a static writer rather than in the middleware,
because DefaultHttpContext.Response.OnStarting is a no-op — the obvious
middleware test observes nothing and an assertion that nothing was written
passes for entirely the wrong reason.

An unknown policy name fails ValidateOnStart, so the process exits rather
than quietly serving /admin under the relaxed policy. Origin format is
validated too, beyond what the design asked: a CSP source list silently
ignores a malformed source, so a URL with a path would look configured and
block the script anyway.

BR-U3-22's Umami startup warning is withdrawn (REF-U3-01) — the backend
never sees VITE_UMAMI_WEBSITE_ID. It becomes a blocking CI gate in U5.

Build 0 errors; 315 tests pass, up from 253.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHoJpxYXzHACSQguHrC5fw
2026-07-28 10:58:45 +02:00
SluijsensandClaude Opus 5 5f3eda2680 Makes a redeploy safe for the key ring and the schema
Nothing here is visible in normal operation. Its whole purpose is that
swapping the release directory on deploy cannot silently destroy state.

Data Protection secures the API keys that authenticate master/slave
communication. Two separate defaults would each have destroyed them:
keys are held on the filesystem, which a release swap discards, and the
application discriminator is derived from the content root path, which
changes with every release directory — so even keys stored in a database
would have stopped being derivable. Keys now live in
ApplicationDbContext and the discriminator is a fixed constant.

Losing them produces no error. It produces stored keys that no longer
decrypt, which presents as an apparent network fault between a Master
and its slaves and is easily misdiagnosed. That is also why the tests
assert the resulting configuration rather than the registration: the
XmlRepository must be the EF one and the discriminator must be the
constant, plus a round-trip proving a value encrypted before a deploy is
readable after one. A test that only checked "Data Protection is
registered" would have passed in the broken case too.

Both modules previously called AddDataProtection() themselves. Module
registration runs after the host's, so those calls re-registered the
configuration chain and would have overridden the persistent store while
IDataProtector still resolved. They are removed, with a comment at each
site — the deletion otherwise looks like a regression. Each module's own
test project now guards against it being reintroduced.

ApplicationDbContext also migrates itself at startup. Deploy targets
offer no CLI, so migrations cannot be a manual step on the server.
Failures are classified rather than treated alike: a connection failure
means the database is not up yet, normal when the app and the database
start together after a reboot, and is retried with backoff; a migration
failure means something is broken and fails at once. Either way the
process does not start, which is what makes the liveness health check
trustworthy — an application that cannot reach its schema never answers
/health, so monitoring goes red instead of reporting a healthy instance
that cannot serve a request.

The cost of migrating without a human gate is that migrations must stay
forward-compatible and non-destructive, since rollback is "redeploy the
previous release". The new migration is purely additive.

Also wires this and the preceding hosting commit into both hosts, as
they touch the same lines of Program.cs.

Two constraints are enforced by documentation rather than code, and
belong in the deployment instructions: the key table must never be
pruned, and only one instance may migrate a given database at a time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHoJpxYXzHACSQguHrC5fw
2026-07-28 00:00:45 +02:00
SluijsensandClaude Opus 5 29a93ef873 Separates website and admin roots, adds /health, hardens the availability gate
Prepares the single-host layout for deployment. The customer's public
website moves from wwwroot/ to wwwroot/web/, so a CMS deploy can no
longer overwrite content it does not own: with the website in its own
directory, the release directory can be swapped without touching it.

Each front-end gets its own file provider, and both tolerate a missing
directory at startup — a fresh deployment has no website until a
separate workspace deploys one, and the CMS must still serve /admin and
the API. When the website's index.html is absent, an embedded
placeholder is served instead of a 404, which also doubles as proof the
CMS itself is running. The placeholder is embedded in the assembly
rather than shipped into wwwroot/web/, because that directory is owned
and overwritten by the website workspace.

Adds GET /health for uptime monitoring. It reports infrastructure
liveness only and is deliberately NOT the same thing as
/api/v1/Availability/status or /api/v1/System/capabilities: those are
CMS domain state that also serve the master/slave protocol. A healthy
instance can be switched off by design, and a switched-on instance can
be unhealthy, so conflating them would alert on business state and stay
silent on real outages. /health is on the availability gate's bypass
list for the same reason.

Fixes a real defect in the gate's admin bypass. It parsed the bearer
token with ReadJwtToken, which reads claims without verifying the
signature, so an unauthenticated caller could forge an unsigned token
carrying an Owner role claim and bypass the gate that suspends a
customer's site. Protected endpoints still rejected them, so nothing
leaked — but the gate itself was bypassable. The token is now fully
validated against the same parameters as the bearer scheme, resolved
from one shared source so the two cannot drift apart.

Host wiring for these changes lands with the data-durability commit,
since both units touch the same lines of Program.cs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHoJpxYXzHACSQguHrC5fw
2026-07-28 00:00:13 +02:00
SluijsensandClaude Sonnet 5 274946dbff Adds SlpModularCms.Api.Slave for local master/slave dev testing (Unit 1)
Relocates ModuleOrchestrator, ServiceCollectionExtensions, and
ApiPrefixConvention from SlpModularCms.Api into SlpModularCms.Core.Hosting
so a new Master-less SlpModularCms.Api.Slave host project (ports 5285/7222)
can share the same bootstrap code without duplicating it. This lets a
developer run a master instance and a slave instance side by side locally
to test the master/slave connection, without touching the existing
master/slave protocol itself.

Relocates the two orchestrator/convention test files from
Modules.Identity.Tests to Core.Tests, dropping an incidental
ProjectReference to SlpModularCms.Api that existed only for those tests.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-04 02:07:35 +02:00