security: add ReadTimeout and WriteTimeout to API server#830
Open
tejas0077 wants to merge 1 commit intogetprobo:mainfrom
Open
security: add ReadTimeout and WriteTimeout to API server#830tejas0077 wants to merge 1 commit intogetprobo:mainfrom
tejas0077 wants to merge 1 commit intogetprobo:mainfrom
Conversation
Signed-off-by: Tejas Saubhage <tsaubhage0007@gmail.com>
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.
Found an inconsistency while reading the codebase.
The trust center HTTPS server has ReadTimeout and
WriteTimeout set to 30 seconds. The API server has
neither.
Same codebase. Same risk. Different treatment.
Without these, a slow client can trickle request body
data indefinitely — keeping connections open and quietly
exhausting server resources.
One-line fix. Two timeouts. Consistent behavior across
both servers.
apiServer.ReadTimeout = 30 * time.Second
apiServer.WriteTimeout = 30 * time.Second
Not glamorous. Just the kind of thing that matters before
a compliance platform goes to production.
Summary by cubic
Set 30s ReadTimeout and WriteTimeout on the API server. This prevents slow clients from holding connections open and aligns with the trust center HTTPS server.
Written for commit 95c0278. Summary will update on new commits.