oatpp-authkit/test
Uwe Schuster 0d2312499e #3: SecurityHeadersInterceptor — strict baseline + CspOverride ctor (Option B)
Aligns the default CSP, X-Frame-Options, HSTS and Permissions-Policy with
docs/security-baseline.md:
  - script-src/style-src drop 'unsafe-inline' and the unpkg.com allowance
  - img-src narrows from 'self' data: https: → 'self' data:
  - connect-src narrows from 'self' wss: ws: → 'self'
  - frame-ancestors flips from 'self' → 'none'
  - X-Frame-Options flips from SAMEORIGIN → DENY
  - HSTS keeps max-age=63072000 but drops includeSubDomains by default
    (apex-clobbering hazard noted in audit #1)
  - Permissions-Policy header added with the baseline sensor allowlist

Adds a CspOverride struct + ctor so consumers that genuinely need a
relaxation (Swagger UI subtree, cross-origin connect, …) can flip
individual directives without forking the interceptor. Empty fields
inherit the strict baseline.

Bumps to 0.3.6 (alongside owner's pending #4 + #5 + #6 work).

Closes #3

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 21:54:58 +02:00
..
CMakeLists.txt #3: SecurityHeadersInterceptor — strict baseline + CspOverride ctor (Option B) 2026-04-25 21:54:58 +02:00
test_body_size_limit.cpp #4: BodySizeLimitInterceptor — fail-closed on missing/malformed Content-Length 2026-04-25 21:36:50 +02:00
test_negotiation.cpp #2: Browser-friendly 401/403 — content-negotiate JSON vs HTML/redirect 2026-04-25 13:23:08 +02:00
test_security_headers.cpp #3: SecurityHeadersInterceptor — strict baseline + CspOverride ctor (Option B) 2026-04-25 21:54:58 +02:00