Skip to content

Feature: straightmail v0.5.0 - #4

Open
codeministry wants to merge 48 commits into
encircle360-oss:masterfrom
codeministry:feature/straightmail-v0.5.0
Open

codeministry wants to merge 48 commits into
encircle360-oss:masterfrom
codeministry:feature/straightmail-v0.5.0

Conversation

@codeministry

@codeministry codeministry commented May 29, 2026 •

Copy link
Copy Markdown
Member

feat: straightmail v0.5.0 — multi-tenancy, SQLite, API-key auth, Git-sync, four Docker stacks

Summary

This PR introduces multi-tenancy, three authentication modes, Git-sync for templates, SQLite as the default database,
and a restructured Docker Compose setup. Changes span backend, frontend, infrastructure, and CI/CD.


What's new

Multi-tenancy

  • Per-tenant SMTP configuration (host, port, TLS, credentials, sender address)
  • Per-tenant API keys stored as SHA-256 hashes
  • Per-tenant Git-Sync with individual repository URL and access token
  • TenantReconciliationService: tenants declared in application.yml under tenants.config.* are automatically
    created or updated at startup — zero-touch provisioning, no manual API calls required
  • New REST API: GET/POST/PUT/DELETE /api/v1/tenants (admin-only, requires database profile)
  • TenantContext resolves the active tenant from the request on every call; service and business logic layers never
    read HttpServletRequest directly

Authentication modes (AUTH_MODE)

The boolean auth.enabled flag has been replaced by a three-value auth.mode property:

AUTH_MODE Behaviour
oidc (default) JWT Bearer token from OIDC provider; tenant resolved from configurable JWT claim
api-key X-API-KEY header; per-tenant or global SHA-256 hash lookup
none All endpoints open; suited for network-isolated deployments

Git-Sync for templates

  • Per-tenant Git repository cloned on a configurable cron schedule
  • ShedLock prevents concurrent sync in HA deployments
  • GitTemplateSourceProvider loads .ftl files from the working tree into a local cache table
  • Sync status and last-run result visible in the admin dashboard

Template source architecture

Templates are now resolved from up to three independent sources; the first match wins:

  1. Database — full CRUD via UI / API (requires database profile)
  2. File — read-only .ftl files from a mounted host directory
  3. Git-Sync — cloned from a per-tenant Git repository on a schedule

Every template carries an implicit source:database, source:file, or source:git tag — filterable via the API.

Encryption at rest

EncryptionService (AES-256-GCM) encrypts all secrets before persistence (SMTP password, Git token, API key hash).
Secrets are never returned in plain text by the API. Double-encryption is prevented by checking the stored value before
each write.

SQLite as default database

SQLite (WAL mode, single-file) replaces PostgreSQL as the default. PostgreSQL remains fully supported via environment
variables:

DB_URL=jdbc:postgresql://host:5432/straightmail
DB_DRIVER=org.postgresql.Driver
DB_DIALECT=org.hibernate.dialect.PostgreSQLDialect
DB_USERNAME=...
DB_PASSWORD=...

Frontend changes

  • Tenant management UI — full CRUD for tenants with SMTP configuration form, API key management, and Git-Sync
    settings
  • API-Key login page — alternative login flow for AUTH_MODE=api-key deployments
  • Dashboard — new Git-Sync status card and File-Sync status card alongside the existing API status card
  • New NGXS states: TenantState, ApiKeyState
  • New guards: adminGuard (tenant admin area), canDeactivateFormGuard (unsaved changes protection)
  • New interceptor: ApiKeyInterceptor adds X-API-KEY and X-Tenant-ID headers in API-Key mode

Infrastructure changes

Docker Compose

The single root-level docker-compose.yml has been replaced by four mode-specific stacks in docker/:

Stack Auth Database Use case
minimal.yml None — Quick local testing, file-based templates only
apikey-sqlite.yml API-Key SQLite Lightweight self-hosted deployment
oidc-sqlite.yml OIDC + Keycloak SQLite Full multi-tenant development setup
oidc-postgres.yml OIDC + Keycloak PostgreSQL Production-equivalent local environment

Build the JAR first, then start a stack:

cd backend && ./gradlew bootJar
cd ../docker && docker compose -f oidc-sqlite.yml up

See docker/README.md for details.

Helm chart

The Helm chart has been removed from this repository and will be maintained in a dedicated helm-charts repository.


Developer experience

  • application-local.yml is now gitignored — real credentials can never be accidentally committed
  • application-local.yml.example added with placeholder values (ACME tenant, smtp.example.com)
  • application-dev.yml removed; use application-local.yml (copied from the example) instead
  • SKIP_FRONTEND_BUILD=true skips the Angular build for backend-only development

Breaking changes

Upgrading from v0.4.0? The changes below require manual migration steps before deploying this version. Review each
item carefully.

What changed Before After
Auth config key auth.enabled: true/false AUTH_MODE: oidc / api-key / none
Frontend directory client/ frontend/
Docker Compose docker-compose.yml at root Four stacks in docker/
Template service package service/template/TemplateService (monolithic) service/template/provider/ (composite providers)
Controller package controller/MailController (flat) controller/mail/MailController (nested)
Default database PostgreSQL (MongoDB removed in v0.4.0) SQLite (PostgreSQL still supported via env vars)
ENCRYPTION_KEY Optional Required in database profile
Liquibase migrations Single changeset file Consolidated master file with 8 changesets
Liquibase 0001 type uuid (PostgreSQL native) varchar(36) — requires manual migration on v0.4.0 PostgreSQL instances

Liquibase note

Changeset 0001 changes the id column type from uuid to varchar(36) for SQLite compatibility.

Existing PostgreSQL deployments (v0.4.0) are affected. If the old 0001 changeset has already been applied (which it has on any v0.4.0 installation), Liquibase will detect a checksum mismatch and refuse to start. Before applying this PR to a v0.4.0 PostgreSQL instance, either:

  1. Add a compensating changeset that alters the id column type from uuid to varchar(36), or
  2. Clear the Liquibase checksum for changeset 0001 in the databasechangelog table and ensure the column type is compatible.

Test coverage

  • All existing tests updated for the new architecture
  • MailHog replaced by Mailpit in Docker Compose stacks and Testcontainers
  • New test classes: TenantIntegrationTest, TenantSenderEnforcementTest, TemplatesControllerTest,
    StatusControllerTest, EncryptionServiceTest, TenantServiceTest, TenantReconciliationServiceTest,
    GitSyncSchedulerTest, and more
  • Backend unit tests (non-Docker) pass locally; Docker-dependent integration tests (Mailpit Testcontainer) run in CI

Changelog

Backend — [0.5.0]

Added

  • Multi-tenancy: TenantService, TenantRepository, /v1/tenants CRUD admin API
  • Per-tenant API key authentication (ApiKeyTenantResolutionFilter) with SHA-256 hashing via EncryptionService
  • AbstractTenantResolutionFilter base class; JWT and API-key resolution share common logic
  • Config-based tenant provisioning via TenantProperties + TenantReconciliationService (YAML-declared tenants
    reconciled at startup)
  • StartupConfigLogger: logs all resolved configuration at startup with masked secrets
  • auth.mode property (oidc | api-key | none) replacing the boolean auth.enabled flag
  • No-authentication mode: NoAuthTenantResolutionFilter resolves tenant from X-Tenant-ID header or falls back to
    default
  • Database-backed Git sync status (GitSyncStatusRepository) and template caching
  • GitSyncScheduler with initial sync on application startup; ShedLock uses JVM system time for SQLite compatibility
  • Read-only template view (TemplateView.editable) distinguishing DATABASE vs FILE/GIT templates
  • Implicit source tags (source:database, source:file, source:git) auto-applied by TemplateService
  • Branch-aware Git template handling: multiple branches can expose the same template ID
  • effectiveTags unifying explicit and source tags for consistent tag-based filtering
  • Tenant branding fields (logo_url, brand_color) in TenantDTO
  • Comprehensive Javadoc on all public REST controller methods

Changed

  • Switched default database from PostgreSQL to SQLite (jdbc:sqlite:); Liquibase changesets updated
  • MailHog replaced by Mailpit in Testcontainers and all Docker Compose stacks
  • Keycloak hostname handling updated; JWK endpoint URL and issuer URL split into separate config properties
  • ObjectProvider<T> used for all beans conditional on the database profile
  • Package structure reorganized: controller/mail/, controller/template/, controller/tenant/,
    service/template/loader/, service/template/provider/
  • @Autowired field injection replaced by constructor injection throughout

Removed

  • auth.enabled boolean property (superseded by auth.mode)
  • Helm chart and related CI workflows

Frontend — [0.5.0]

Added

  • Multi-tenancy UI: tenant list, create/edit/delete forms, tenant selector in sidebar
  • API-key authentication mode: /api-key-login page, ApiKeyState, ApiKeyInterceptor
  • TenantState.isDatabaseMode selector; DB-mode-only actions (New Template, New Tenant) conditionally rendered
  • TemplatesState with source-tab filtering (DATABASE / FILE / GIT / ALL) and tag filtering
  • TemplateGridComponent and grid/list view toggle (persisted in UiState)
  • Read-only TemplateViewComponent for GIT/FILE templates
  • Git branch badge in template table/grid for source:git templates
  • DashboardState tracking Git sync status per tenant
  • FileSyncCard / GitSyncCard components for sync status display
  • UserAvatar, TenantAvatar, NavIconComponent reusable UI components
  • HelpPanelComponent: context-sensitive off-canvas help panel (right panel / bottom sheet on mobile)
  • Auto-save for render form values (persisted in LocalStorage via RenderState)
  • Playwright E2E test suites: templates.spec.ts, tenants.spec.ts
  • autoAuth Playwright fixture: pre-seeds sessionStorage/localStorage before each test

Changed

  • TranslateModule imports replaced by standalone TranslatePipe across all components
  • MailHog references replaced with Mailpit in E2E test configurations
  • Unsaved-changes guard unified via canDeactivate across form pages
  • Font sizes standardized to rem units across all component stylesheets

Fixed

  • mockTenants E2E helper now mocks /v1/tenants/me (the actual LoadTenants endpoint) instead of /v1/tenants
  • Playwright autoAuth fixture seeds tenant with editable: true so "New Template" / "New Tenant" buttons render
    correctly

Checklist

  • Credential scan: zero matches for real SMTP hosts, passwords, tokens, or customer names
  • application-local.yml gitignored
  • All four Docker Compose stacks validate (docker compose config)
  • Backend compiles without errors (./gradlew compileJava -PskipFrontendBuild=true)
  • Backend unit tests pass locally
  • No NgModule created; all Angular components standalone
  • No detectChanges() calls in production Angular code

@codeministry
codeministry marked this pull request as draft May 29, 2026 10:13
@codeministry
codeministry marked this pull request as ready for review May 29, 2026 10:14
@codeministry codeministry changed the title Feature/straightmail v0.5.0 Feature straightmail v0.5.0 May 29, 2026
@codeministry codeministry changed the title Feature straightmail v0.5.0 Feature: straightmail v0.5.0 May 29, 2026
- Add tenant configuration instructions (`TENANTS_CONFIG`) for non-database profiles.
- Document breaking changes for template directory structure and tenant subdirectories.
- Update Docker Compose examples with new environment variables and volume mappings.
# Conflicts:
#	backend/src/test/java/com/encircle360/oss/straightmail/AbstractTemplateLoaderTest.java
#	src/main/java/com/encircle360/oss/straightmail/service/EmailService.java
#	src/main/java/com/encircle360/oss/straightmail/service/template/AbstractTemplateLoader.java
…rove error logging functionality

- Added AbstractTemplateLoaderTest to validate template loading scenarios, covering missing and partial templates.
- Enhanced error logging in `AbstractTemplateLoader` to differentiate required vs optional template file handling.
- Improved `EmailService` logging to provide better operator visibility for email requests and SMTP dispatch events.
…a toolchain to version 25

- Bump dependencies: updated `sqlite-jdbc`, `hibernate-community-dialects`, `jsoup`, `lombok`, and others to latest versions.
- Update base Docker image to Temurin 25 and optimize layering for image build process.
- Adjust Gradle wrapper scripts for compatibility with the new Gradle version.
…o 25 across workflows and dependencies

- Update workflows to use Node.js 22 and Java 25.
- Upgrade Angular framework and related dependencies to 22.1.x.
- Add `.nvmrc` for Node.js version management.
- Minor template formatting adjustments in frontend components.
… of ngModel

The five shared field components received the real form control as an input but
mirrored its value by hand: an internal signal, a valueChanges subscription and a
ControlDirtyDirective that re-implemented the dirty marking reactive forms already
provide. They now bind [formControl] directly, which also removes the NG01354
warning by removing its cause rather than opting out of it.

Call sites use the typed form.controls.x instead of form.get('x'), and the
redundant [disabled] bindings on text and select fields are gone where the control
itself is already disabled. ControlDirtyDirective is deleted along with its spec.

CodeEditorComponent now buffers writeValue and setDisabledState until its view
exists. Reactive forms call both during directive init, before ngAfterViewInit
creates the editor, so without buffering the editor stayed empty and editable.
Tenants author their own templates, so template source and template ids are untrusted
input. Two holes followed from that.

FreeMarker was left at its default TemplateClassResolver.UNRESTRICTED_RESOLVER, so the
?new built-in could instantiate any class on the classpath — including
freemarker.template.utility.Execute, which runs OS commands. Any caller holding a
per-tenant API key (ROLE_USER, no admin) could reach it through POST /v1/email/inline or
a stored template, read the process environment and with it ENCRYPTION_KEY, which
decrypts every tenant's SMTP password and git token. FreemarkerSecurityConfig now sets
ALLOWS_NOTHING_RESOLVER and disables the ?api built-in once at startup. The object
wrapper moves there too: Configuration is a shared singleton, so setting it per request
was both a race and repeated startup work.

FileTemplateSourceProvider resolved template names against the tenant directory without
normalising or confining them, so "../other-tenant/welcome" read another tenant's
template — over the URL with the ::-encoding and, bypassing any URL filtering entirely,
over the templateId in the JSON body of /v1/render and /v1/email. Paths are now
normalised and checked to stay under the tenant directory. AbstractTemplateLoader had
the same flaw on both its classpath and filesystem paths and gets the same guard;
ClassPathResource normalises ".." away rather than refusing it, so the check has to
happen before the lookup.

Both were reproduced by tests that fail without the fixes.
TenantReadController.list() and get(slug) had no authorization at all, while every write
in TenantAdminController requires ROLE_ADMIN and the sibling /me filters by identity.
A customer holding only their own per-tenant API key could therefore enumerate every
tenant on a shared installation and read each one's smtpHost, smtpPort, smtpUser,
smtpSender, gitRepoUrl and hasApiKey — mail relay infrastructure plus half a credential
pair. Passwords and tokens were correctly withheld.

Both endpoints are admin-only now. That matches their only consumer: the admin UI reads
them, while the login and startup flows use /v1/tenants/me, which stays open.
No filter chain configured any headers, so responses carried only Spring Security's
defaults and no Content-Security-Policy. That matters here because SpaController serves
the admin UI from the same origin as the API and the access token lives in browser
storage: a script injected into that origin reads it. All three chains now send a CSP,
a Referrer-Policy and HSTS, and forward-headers-strategy is set so HSTS is actually
emitted behind a TLS terminator.

The policy is derived from the deployment (the configured OIDC issuer is added to
connect-src, frame-src and form-action) and can be replaced wholesale via
security.content-security-policy.

A strict script-src broke the app on first try: NGXS compiles selector property getters
with new Function(), so the bundle needs 'unsafe-eval' unless NGXS is told otherwise.
Rather than weaken the policy for exactly the attack it exists to stop, the store now
runs with compatibility.strictContentSecurityPolicy.

Alongside that: actuator exposure is set explicitly instead of relying on the framework
default, mavenCentral comes before mavenLocal so a stale local artifact cannot win, the
compose stacks bind their ports to 127.0.0.1 instead of 0.0.0.0, and docker/README.md
states what a real deployment has to change — these stacks ship dev credentials and run
without the production profile, so Swagger is reachable by design.
…by origin

The production build configuration had no fileReplacements, so environment.prod.ts was
dead code and every production bundle carried the development environment: an
http://localhost:50003/api fallback, http://localhost:8090 as the OIDC issuer fallback
and logLevel 1, which makes angular-auth-oidc-client log its flow to the browser console.
production being false also revealed the API base URL on the dashboard.

Fixing that alone would have broken the app at load: the interceptors computed their base
path with new URL(environment.apiUrl) and no base argument, which throws for the relative
"/api" the backend returns by default. It only worked because the dev environment's
absolute fallback was shipping. Both changes therefore belong together.

While in those files, credentials are now scoped by origin as well as path. A request to
a foreign host whose path happens to start with the API base no longer receives the
bearer token or the API key.

auth.interceptor.ts had no spec at all; it has one now.
…in-repo

The repository's default branch is master, but backend.yml, frontend.yml and monorepo.yml
triggered on main only and therefore never ran — including the docker gate in backend.yml.
The one workflow that did trigger, release.yml, could not succeed: it called ./gradlew and
./Dockerfile from the repo root although both live under backend/, never made gradlew
executable and had no SKIP_FRONTEND_BUILD despite having no Node setup. The practical
result was that SBOM and provenance, which only that workflow produced, reached nothing:
whatever images exist were pushed unscanned and unattested.

All workflows now trigger on [master, main], so this works today and survives a rename.
release.yml is fixed, and its docker context is scoped to ./backend so the dev compose
stacks and their placeholder credentials stay out of the build context. backend.yml and
monorepo.yml — the workflows that actually push — now produce an SBOM and provenance and
run a Trivy scan, which is what the job name "Build, scan & push image" already claimed.

Permissions move from workflow level to job level, so build and test jobs no longer carry
packages: write they never use.

New: dependabot.yml for gradle, npm and github-actions, and codeql.yml for Java and
TypeScript. The Gradle distribution is pinned by checksum.

cleanup.yml no longer calls a reusable workflow from another repository. It runs with
packages: write against this registry, so it belongs where it is reviewed. The preview
sweep is dropped with it — this repo has no preview workflows — while the invariants that
protect the build cache and latest are kept.
The audit listed what the suite already guarantees and what it does not. These close the
gaps that mattered.

AuthModeNoneTest pins auth.mode=none: an anonymous caller reaches the API and holds
ROLE_ADMIN, X-Tenant-ID selects any existing tenant, an unknown slug is 404 and a
malformed one 400. That configuration is intentional and network-protected, but it is the
widest the application has and nothing described it. Tenant isolation is asserted against
a tenant-scoped resource rather than /v1/tenants/me, which is deliberately excluded from
tenant resolution for the login flow.

JwtTenantResolutionFilterTest pins the tenant boundary in OIDC mode: a tenant outside the
JWT claims is refused, a single claim is auto-selected, multiple claims require an
explicit header rather than being resolved silently, and a token without claims is
refused. A regression here would let any authenticated user act as any tenant.

TenantSenderFallbackTest covers the branch TenantSenderEnforcementTest does not: with no
smtpSender configured, the request sender is authoritative. That is documented behaviour,
but only the enforcing half was pinned, so it could have drifted in either direction.
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

locale = DEFAULT_LOCALE;
}

Template template = new Template("email", new StringReader(templateContent), freemarkerConfiguration);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By design: tenants author their own FreeMarker templates. Sandboxed: ?new resolves nothing, ?api off, DefaultMemberAccessPolicy, Spring context hidden behind TemplateRequestContext. Escape attempts are pinned in FreemarkerSandboxTest.

=> Won't fix ✅

The README described five workflows and had drifted from the YAML: codeql.yml
and cleanup.yml were missing entirely, triggers listed only main instead of
master and main, the image names still pointed at encircle360-oss, and the
release job was named after the workflow rather than build-and-push.

Add the two missing workflows, correct triggers, image repositories and tag
schemes against the metadata-action config, document the Trivy scans, SBOM and
provenance attestations, and extend the permissions table with
security-events: write.

Drop the claim that the docker/ Compose stacks consume the published image —
they build from ../backend — and note that backend.yml and monorepo.yml push
the same image and latest tag, so the later run wins.
…en key

Three of the four Compose stacks could not start at all, which the four-stack
verification of the 0.5.0 migration guide surfaced.

minimal.yml, apikey-sqlite.yml and oidc-postgres.yml shipped
ENCRYPTION_KEY: "CHANGE_ME_GENERATE_RANDOM_KEY". That is not valid Base64, so
EncryptionService aborted the context and the container crash-looped on first
start, while docker/README.md claimed every stack comes up without manual
configuration. Each stack now carries a generated key with a comment saying it is
for local development only.

With a valid key the PostgreSQL stack still failed one step later: changeset 0002
created tenants.active, smtp_tls and smtp_ssl as integer, which SQLite accepts
because it stores booleans as integers, but PostgreSQL rejects when Hibernate
binds a boolean. The first insert from TenantReconciliationService aborted
startup, so the stack the migration guide points at for production had never run.
Changeset 0009 converts the three columns; editing 0002 instead would have broken
the checksums of existing installations. The precondition marks it as ran on
SQLite, which leaves those installations untouched.

Verified against all four stacks: PostgreSQL applies 0009, reconciles its three
tenants and delivers an inline mail to Mailpit; an existing SQLite database logs
the precondition failure and keeps its schema.
…lly ships

The "Migrating from 0.4.0" guide was written on 2026-06-01 and has not moved
since, while twenty-three commits landed on top of it — four of them security
fixes that change how a working 0.4.0 setup behaves. None of that was written
down, and all three changelogs still ended at 0.5.0 with a May or April date.

Four changes can break an upgrade and now have their own place in the guide.
FreeMarker runs sandboxed, so templates using ?new or ?api fail at render time
rather than at startup, which is why that one gets its own section with the log
line it produces and a command to find affected templates. Template IDs are
confined to their tenant directory. Tenant reads require ROLE_ADMIN, which also
decides whether the Admin UI's tenant pages have anything to show. Actuator is
down to health.

A new section covers the security defaults that a deployment configures rather
than trips over: the header set, replacing the generated CSP wholesale, and
forward-headers-strategy behind a TLS terminator. Reference sections gained the
matching rows — role requirements under Authentication, ENCRYPTION_KEY,
MANAGEMENT_ENDPOINTS and SECURITY_CONTENT_SECURITY_POLICY as deployment
settings, the unauthenticated management port under Ports, JDK 25 and Node 22
under Local Development. Deployment hardening stays in docker/README.md and is
linked in both directions instead of duplicated.

Every statement here was checked against a running stack rather than read off a
commit message, including that both environment variable names bind the way the
guide says they do.
Regression against master
- EmailService returned an empty array on a render failure, so reading
  rendered[0] threw and a broken template answered 500 instead of the
  400 "Error while rendering template" that master produced.

Security
- SecurityConfig's custom JwtDecoder bypassed Boot's resource-server
  autoconfiguration, so the configured jwt.audiences was never applied and
  any token from the same realm was accepted.
- SmtpSenderBuilder fell back field by field, so a tenant declaring only an
  SMTP host inherited the global relay's username and password. The tenant
  config now wins as a whole, and SMTP AUTH is only announced when a
  username exists.
- The oidc-sqlite stack no longer activates the local profile, which would
  pull a developer's application-local.yml into the image.

PostgreSQL and Linux
- Changesets 0010/0011 convert templates.id and template_tags.template_id
  to uuid and git_sync_status.last_sync_at to bigint, matching the entity
  mappings. Both are postgresql-only and written as raw SQL, because
  Liquibase validates typed change tags against SQLite too.
- The image creates /data, /git and /resources/templates owned by a fixed
  UID, and the stacks keep writable paths in named volumes so the non-root
  container can write to them.
- apikey-sqlite and oidc-postgres set TEMPLATES_FILE_BASE_PATH, which they
  were missing, so file templates were silently never found.

Wrong behaviour
- ApiPaths matches the API prefix on segment boundaries, so /api-key-login
  is no longer treated as an API path.
- SpaErrorViewResolver replaces SpaController: the SPA fallback now runs on
  the 404 path, knows the configured api.prefix and has no nesting limit,
  so unknown API endpoints answer 404 instead of a page of HTML.
- PageContainer builds through the builder; the all-args constructor takes
  (content, size, page) and every caller passed (page, size).
- StatusController no longer gates on auth.enabled, a property that exists
  nowhere.
- JacksonConfig makes Jackson prefer the no-args constructor, so an absent
  property means "use the default" again. Without it, POST /v1/tenants
  rejected every payload that left smtpTls, smtpSsl or active out.

Frontend
- authInterceptor reads the token from the OIDC library instead of a stale
  store copy, keeps X-Tenant-ID on the retry, and shares one refresh across
  concurrent 401s so refresh-token rotation cannot strand a caller.
- The access token and the never-dispatched LoginComplete action are gone
  from AuthState.
- Git sync releases its spinner through finalize and reports failures.
- ApiService uses the configured api base throughout, and dev and e2e serve
  it relative like production, so calls stay same-origin and keep their
  credentials.
- Recipients are required, and chips carry the email validator.

CI and dev stacks
- backend.yml is a build-and-test gate; monorepo.yml is the only publisher
  of ghcr.io/<repo>/backend and takes a concurrency group.
- The mailpit and Keycloak health checks work (no curl in either image,
  and Keycloak serves /health/ready on port 9000), and the backends wait
  for their dependencies.
- The Keycloak realm admin password matches the documented admin/admin.
SpaRoutingTest and ApiKeyLoginRouteTest assert that an unresolved browser
route answers with the admin console. The console is a build artifact and
src/main/resources/static is gitignored, so the backend test job, which runs
with SKIP_FRONTEND_BUILD=true, had nothing to forward to and both assertions
saw a 404.

A stub index.html in the test resources carries <app-root>, and test resources
precede main resources on the test classpath, so the tests now resolve it in
every lane. They pin the SPA fallback, not the Angular bundle; the real
artifact stays covered by the full build in monorepo.yml.
- Templates get a narrow TemplateRequestContext instead of Spring's
  RequestContext; through webApplicationContext any template could read
  encryption.key and call any bean. JsonNodeObjectWrapper pins
  DefaultMemberAccessPolicy so getClass() reflection is blocked as well.
- CSRF stays enabled on all filter chains and exempts only the API prefix,
  which authenticates by bearer token or X-API-KEY header.
- Request-controlled values pass through LogSanitizer before logging.
- EncryptionService concatenates IV and ciphertext without length arithmetic.
- Spring Boot 4.1.2, Gradle 9.8.2; hibernate-community-dialects, sqlite-jdbc
  and Testcontainers versions come from the Boot BOM again
- Angular 22.2, Vitest 5, Playwright 1.64, npm 12 and all other frontend
  dependencies on their latest releases; vite overridden to 8.3.5 to close
  the advisories in the 8.3.0 that @angular/build pins
- Runtime image applies pending Ubuntu security updates and drops the unused
  pebble Go binary carrying critical stdlib CVEs
- Keycloak 26.8.1 in the OIDC Compose stacks
- Ignore .worktrees/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants