Skip to content

scheduler: any authenticated user can schedule a job every millisecond with no per-user cap #9032

Description

@kashmithnisakya

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions