-
Notifications
You must be signed in to change notification settings - Fork 58
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
Scheduler rate limiting #1413
Scheduler rate limiting #1413
Conversation
* main: Fix robot test (#1420) Use the correct clearance level variable in organization member list template (#1427) Fix translation in Debian package (#1432) Reschedule tasks when no results in bytes are found after grace period (#1410) Don't scan hostname nmap in nmap boefje (#1415) Add and use our own CVE API (#1383) Add `task_id` as a query parameter to the `GET /origins` endpoint (#1414) Remove member group checks and check for permission instead (#1275) Bump cryptography from 41.0.0 to 41.0.2 in /boefjes/boefjes/plugins/kat_ssl_certificates (#1396) Bump cryptography from 41.0.1 to 41.0.2 in /bytes (#1397) Build the Debian build image on the main branch (#1387) Add explicit `black` config to all modules (#1395) Fix <no title> in the user guide docs (#1391) Add configurable octpoes request timeout (#1382) Remove hardcoded clearance level in member list for superusers (#1390) Add Debian build depends for CVE API package (#1384) Add buttons to manual rerun tasks, both boefjes or normalizers (#1339) Use fix multiprocessing bug on macOS where `qsize()` is not implemented (#1374)
Signed-off-by: ammar <[email protected]>
…ndering Signed-off-by: ammar <[email protected]>
Signed-off-by: ammar <[email protected]>
Signed-off-by: ammar <[email protected]>
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.
As far as I understand, the rate limiter is a property of the BoefjeScheduler
class. This class has a separate rate_limiter
instance per organisation, which means that rate limiting only works per organisation.
In larger deployments, API keys such as for Shodan will likely be shared by multiple KAT organisations. How do we implement rate limiting for that scenario?
…ritance" link (#1590) Co-authored-by: Patrick <[email protected]>
Signed-off-by: ammar <[email protected]> Co-authored-by: Patrick Darwinkel <[email protected]> Co-authored-by: Patrick <[email protected]>
Co-authored-by: Patrick <[email protected]> Co-authored-by: Jeroen Dekkers <[email protected]>
Co-authored-by: Jeroen Dekkers <[email protected]>
Co-authored-by: Mark Janssen <[email protected]>
Co-authored-by: ammar92 <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jeroen Dekkers <[email protected]>
Co-authored-by: Robjen <[email protected]> Co-authored-by: Patrick Darwinkel <[email protected]> Co-authored-by: Patrick <[email protected]> Co-authored-by: Jan Klopper <[email protected]> Co-authored-by: Jeroen Dekkers <[email protected]>
Co-authored-by: ring-ring-ring <[email protected]> Co-authored-by: ammar92 <[email protected]> Co-authored-by: Patrick <[email protected]> Co-authored-by: Jan Klopper <[email protected]>
Co-authored-by: Patrick <[email protected]> Co-authored-by: Jan Klopper <[email protected]>
|
A merge main and rebase resulted in an unfortunate branch state. Until this is solved, in the meantime changes will be made on the following PR: #1611 |
Please refer to #1611 |
Changes
This PR adds rate-limiting capabilities to the scheduler for tasks. Boefjes that are subject to rate limiting (defined in the boefje manifest) are being tracked by an in-memory rate limiter leveraging the package limits. When a task is subject to a rate-limit it will get the
DELAYED
status and will be postponed until it is allowed again. A thread will check for delayed tasks and put them on the queue when they're ready.This will expect some changes in the katalogus mainly exposing a grouping/namespacing on which to rate limit and the parseable rate limit.
Issue link
Closes #1317