Add server.request.body.files_content AppSec address for Akka HTTP#11725
Open
jandro996 wants to merge 5 commits into
Open
Add server.request.body.files_content AppSec address for Akka HTTP#11725jandro996 wants to merge 5 commits into
jandro996 wants to merge 5 commits into
Conversation
…HTTP - Extend handleMultipartStrictFormData (strictUnmarshaller) and handleStrictFormData (formFieldMultiMap) in UnmarshallerHelpers to accumulate file content via MultipartContentDecoder and dispatch EVENTS.requestFilesContent() callback - Content dispatch is sequential after filenames (fires only if no prior block), consistent with other frameworks (Tomcat, Netty, Jersey) - Uses ByteString.take(MAX_CONTENT_BYTES).toArray() to avoid full allocation; MAX_* constants read from Config - Add testBodyFilesContent() overrides to both akka-http-10.0 and akka-http-10.6 test modules
Member
Author
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ace3f1abca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…lback absent When only files_content is subscribed (not requestBodyProcessed), the previous code still called getData().decodeString() on every file body part to populate conv — decoding the full file into a String regardless of MAX_CONTENT_BYTES. Gate decodeString and handleArbitraryPostData on bodyCb != null to avoid unnecessary full-file allocation.
…BindSyncTest Sync server binding does not support body processing; override returns false to match the pattern already used for testBodyMultipart, testBodyFilenames, etc.
…BindSyncTest (10.6) Same fix as 10.0: sync binding does not process body, override returns false to match testBodyMultipart, testBodyFilenames, etc.
claponcet
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Extends the Akka HTTP AppSec instrumentation to dispatch the `server.request.body.files_content` WAF address for multipart file uploads.
Motivation
Part of APPSEC-61875: extending `server.request.body.files_content` WAF address support across Java frameworks. Akka HTTP already has `server.request.body.filenames` support since #11173; this PR adds the content counterpart following the same pattern established in #11198 (Tomcat + Netty) and #11229 (Jersey + RESTEasy).
Additional Notes
`akka-http-10.6` tests require an Akka commercial repository token (`akkaRepositoryToken`) which is only available in CI. Local test runs cover `akka-http-10.0` only.
Contributor Checklist
Use `solves` instead, and assign the PR milestone to the issue
Jira ticket: APPSEC-61875
Note: Once your PR is ready to merge, add it to the merge queue by commenting `/merge`. `/merge -c` cancels the queue request. `/merge -f --reason "reason"` skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.