Skip to content

Document the security model and Wicket's trust assumptions - #1535

Open
papegaaij wants to merge 2 commits into
masterfrom
document-security-model
Open

Document the security model and Wicket's trust assumptions#1535
papegaaij wants to merge 2 commits into
masterfrom
document-security-model

Conversation

@papegaaij

@papegaaij papegaaij commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Documents which inputs Wicket treats as trusted, so that operators know what they are responsible for and reporters know what the framework does and does not claim to defend.

This is documentation only — no behaviour changes.

SECURITY.md (new)

Adds the ASF reporting process, supported versions, and a Security Model section stating the framework's trust assumptions:

  • The container-reported host, port and scheme are trusted. There is no hostname allowlist and no Host validation, in ServletWebRequest#setParameters, HttpsMapper#createRedirectUrl, or — importantly — OriginResourceIsolationPolicy#getTargetUriFromRequest, where the container-reported host becomes the trusted target URI that incoming Origin/Referer headers are compared against. Documents the four deployment steps that follow from that.
  • X-Forwarded-* is not trusted by default, and X-Forwarded-Host is not implemented at all.
  • Client-supplied URLs are not trusted for authority — the Ajax base URL can influence the path, never the authority.
  • Serialized data is trusted — the page store and session store are trusted, private storage.
  • Another origin may not invoke a listener where ResourceIsolationRequestCycleListener is registered, with the two things deliberately outside that boundary (page renders are allowed; sibling origins can be trusted explicitly).
  • CryptoMapper is not an authorization mechanism.

The document is explicit that a report depending on the framework distrusting something the model treats as trusted may be closed as a deployment issue — while a demonstrated bypass of a boundary the model does claim is a vulnerability. Where the code falls short of a stated boundary, the code is what needs fixing.

Javadoc and user guide

  • HttpsMapper — records that the redirect host comes from the container and that the mapper deliberately performs no hostname validation.
  • security_3.adoc — a section on the redirect host coming from the container, and the deployment configuration that follows.
  • pagestoring.adoc, ICrypter, DefaultCrypter, GCMSIVCrypter, StoreSettings#setCrypter — document that page store encryption does not by itself imply tamper detection, and that the default DefaultCrypter (AES-256-CBC) is unauthenticated while GCMSIVCrypter is not.

Note on the crypter documentation

That last item documents the page store as it behaves on master today. #1536 supersedes it: every shipped scheme becomes authenticated, so the caveat no longer applies and those passages are rewritten there. This PR is the base of that one, so the two are best read in order.

🤖 Generated with Claude Code

papegaaij and others added 2 commits August 3, 2026 17:06
Add a SECURITY.md covering how to report a vulnerability privately, the
supported release lines, and the trust boundaries the framework assumes.

Wicket derives its own scheme, host and port from the servlet container and
trusts those values as its identity. They back every absolute URL rendered
via UrlRenderer, the scheme-switch redirect in HttpsMapper, and the trusted
target URI that OriginResourceIsolationPolicy compares incoming Origin and
Referer headers against. Nothing in the framework validates the Host header,
because only the deployment knows its canonical hostnames, so state that
rejecting unexpected hosts is the container's or reverse proxy's job.

Also document that page store encryption protects only as far as the
configured ICrypter states, which matters because Wicket deserializes
whatever it reads back from the store. DefaultCrypter (AES-256-CBC) is
unauthenticated and gives confidentiality only; GCMSIVCrypter
(AES-256-GCM-SIV) additionally makes the stored bytes tamper-evident.

Touches the javadoc of HttpsMapper, ICrypter and its implementations, and
StoreSettings, plus the HTTPS and page storing chapters of the user guide.
The supported version table follows the download page.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
States the boundary the resource isolation listener is there to enforce: another
origin may not invoke a listener on a page. Also records what sits deliberately
outside it, so that neither is mistaken for a defect - a page may still be
rendered by a simple top-level navigation from anywhere, and a deployment may
choose to trust every origin on its own site.

Notes that the listener is opt-in, and that CryptoMapper is not a substitute.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@papegaaij
papegaaij marked this pull request as ready for review August 5, 2026 06:39
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.

1 participant