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 act
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.
π° Read the original article on Dev.to Security
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.