Part of #9024.
TriggerSpec.validate (jaclang/scale/scheduler/impl/scheduler.impl.jac:15-21) only requires interval > 0, and /jobs has no per-user job limit. Any authenticated user can create as many jobs as they like at interval=0.001, each running a walker under their own root, against a fixed thread_pool_size (default 10) shared by every job on the pod.
Today this is masked by #9025 (the API cannot create jobs at all); once that is fixed the abuse path is open.
Proposed fix
- a minimum interval (1 s, configurable under
[scale.scheduler])
- a per-user active-job cap, admin-exempt
- reject a
date in the past at request time with 400 instead of scheduling a misfire
Related
Filed separately from the decorator-validation issue because this is a hardening item on an authenticated endpoint, not a developer nicety.
Environment
Part of #9024.
TriggerSpec.validate(jaclang/scale/scheduler/impl/scheduler.impl.jac:15-21) only requiresinterval > 0, and/jobshas no per-user job limit. Any authenticated user can create as many jobs as they like atinterval=0.001, each running a walker under their own root, against a fixedthread_pool_size(default 10) shared by every job on the pod.Today this is masked by #9025 (the API cannot create jobs at all); once that is fixed the abuse path is open.
Proposed fix
[scale.scheduler])datein the past at request time with 400 instead of scheduling a misfireRelated
Filed separately from the decorator-validation issue because this is a hardening item on an authenticated endpoint, not a developer nicety.
Environment
mainatc89fd6b0e(jaclang 0.37.7, after feat(serve)!: one server assembly, pre-fork workers, and a production transport #8981), dev-mode checkout, macOS arm64, embedded Postgres 18jac run --serve --no-client [-w 3] [-p PORT] main.jac(there is nojac serve)jac.tomlwith[project] name = "schedbench",entry-point = "main.jac"and[scale.scheduler] enabled = true