Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Quarkus to limit maximum HTTP request size (quarkus.http.limits.max-body-size) to 1 meg #243

Merged
merged 6 commits into from
Mar 10, 2023

Conversation

tatu-at-datastax
Copy link
Contributor

@tatu-at-datastax tatu-at-datastax commented Mar 9, 2023

What this PR does:

Lowers limit for max HTTP request from 10 to 1 meg (for service protection); requests with bigger payload with fail with 413 HTTP Status code (non-configurable).

This setting is used in addition to document limits to prevent any processing of too big payload; document checks can only perform validation of already decoded document, in-memory data structures.

Which issue(s) this PR fixes:
Fixes #242

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@tatu-at-datastax tatu-at-datastax self-assigned this Mar 9, 2023
@tatu-at-datastax tatu-at-datastax changed the title (WIP) Actually change max http request size in configs first Actually change max http request size in configs first Mar 10, 2023
@tatu-at-datastax tatu-at-datastax marked this pull request as ready for review March 10, 2023 00:21
@tatu-at-datastax tatu-at-datastax requested a review from a team as a code owner March 10, 2023 00:21
@tatu-at-datastax tatu-at-datastax changed the title Actually change max http request size in configs first Configure Quarkus to limit maximum HTTP request size (quarkus.http.limits.max-body-size) to 1 meg Mar 10, 2023
@tatu-at-datastax
Copy link
Contributor Author

Strange: test seems bit flakey (native-image one failed first time). May need to add retries if there are false failures.

src/main/resources/application.yaml Outdated Show resolved Hide resolved
@tatu-at-datastax
Copy link
Contributor Author

Added @RetryingTest to hopefully eliminate most false fails, passed on first try. Merging.

@tatu-at-datastax tatu-at-datastax merged commit 20032ac into main Mar 10, 2023
@tatu-at-datastax tatu-at-datastax deleted the tatu/242-limit-input-req-size branch March 10, 2023 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants