[VS-NfD] Add security response headers and an explicitly restrictive CORS policy #197
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#197
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan reference:
20-massnahmenplan.md-> Phase 2ADR: n/a
Effort: S (1 AT)
Depends on: —
Context
Response headers are the cheapest verifiable hardening evidence there is,
and their absence is the first thing an automated assessment reports. CORS
must be a stated decision, not an implicit default.
Current state
helmetis not a dependency ofapps/apiand appears nowhere inapps/api/src; no CORS configuration was found in the api bootstrap.default-src 'self',script-src 'self') — the api's own responses are the gap.Acceptance criteria
X-Content-Type-Options,Referrer-Policy,X-Frame-Options/frame-ancestors, and aPermissions-Policy, eachvalue chosen deliberately.
APP_BASE_URLorigin only, credentials rules stated); a cross-origin request from
another origin is rejected by test.
to break — covered by an existing or new plugin e2e assertion.
regressions are caught.
docs/architecture/security.mdlists the headers and their reasons.Out of scope
Changing the web tier's CSP, and certificate/TLS termination (operator's
reverse proxy).
Done in PR #252 (commit
3c62b7b, CI run 504 green, fast-forward merge).All acceptance criteria met: header set (HSTS, nosniff, Referrer-Policy no-referrer, X-Frame-Options SAMEORIGIN, minimal Permissions-Policy) via a hand-rolled middleware wired through the AppModule MiddlewareConsumer; CORS explicitly restrictive (only the APP_BASE_URL origin is echoed, Vary: Origin, foreign origin gets no ACAO by test); plugin-sandbox framing verified by a new frame assertion in plugins.e2e.db.test.ts; header set fenced by security-headers.e2e.test.ts; rationale table in docs/architecture/security.md.