DEV Community

Auth By Example
Auth By Example

Posted on

Background jobs still need the caller's authorization

Enqueueing work does not pause permission checks. A worker that later updates a document, sends an email, or calls an API still acts for someone.

Carry the original actor (and tenant) with the job, and authorize the action again when the worker runs. A system service account that skips those checks is a delayed privilege escalation.

Top comments (0)