-
Notifications
You must be signed in to change notification settings - Fork 465
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
Exempt bootstrap package uploads from server-side request timeout #25536
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25536 +/- ##
==========================================
- Coverage 63.59% 63.59% -0.01%
==========================================
Files 1619 1619
Lines 155002 155003 +1
Branches 3985 3985
==========================================
- Hits 98572 98568 -4
- Misses 48659 48664 +5
Partials 7771 7771
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
package.json
Outdated
@@ -3,7 +3,7 @@ | |||
"version": "0.99.99", | |||
"description": "The premier osquery fleet manager.", | |||
"engines": { | |||
"node": "20.11.1", | |||
"node": "20.18.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change needed for this big fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not. I'll fix.
var zeroTime time.Time | ||
rc := http.NewResponseController(rw) | ||
// For large software installers, the server time needs time to read the full | ||
// For large software installers and bootstrap packages, the server time needs time to read the full | ||
// request body so we use the zero value to remove the deadline and override the | ||
// default read timeout. | ||
// TODO: Is this really how we want to handle this? Or would an arbitrarily long |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, a long timeout would be better. Otherwise, a bug in our agent with software/package download could DDOS our server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This covers a timeout long enough to upload a 2+GB installer over a slowish connection, so basically any timeout long enough to support that use case will be long enough to afford a DoS scenario unfortunately.
52f21bc
to
a2e3cd5
Compare
…5536) For #25533 - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality
…5536) For #25533 - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality
…5536) For #25533 - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality
…5536) For #25533 - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality
For #25533
changes/
,orbit/changes/
oree/fleetd-chrome/changes
.See Changes files for more information.