Skip to content

Verify worker's team when landing/retiring workers - #9676

Merged
taylorsilva merged 3 commits into
masterfrom
verify-workers-team
Aug 6, 2026
Merged

taylorsilva merged 3 commits into
masterfrom
verify-workers-team

Conversation

@taylorsilva

@taylorsilva taylorsilva commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

Changes proposed by this PR

It is currently possible, if you had a worker's team private key, to connect to TSA and land/retire any team-scoped worker, even those not belonging to the team the private key was scoped to.

This change blocks it at the API layer by including information about the worker in request body. Requests through TSA already scope the request properly and have the right checks in place to ensure a user can't fake the team the private key is scoped to.

This does also make land/retire/delete requests between Workers and the Web not backwards compatible. The worker version has been bumped from 2.5 to 3.0. Land/retire/delete requests from old workers will fail because they won't populate the request body and will get back a HTTP 400 from the web node.

I will emphasize again, that this requires one to have a worker's private key for authenticating to TSA. There are more malicious things one could do if they had a worker's private key, such as spin up their own workers and capture a team's workloads.

Note on upgrading

Due to this incompatibility with the API change, I recommend upgrading workers first and then web nodes. Upgrading in that order won't cause any issues if workers try to land/retire because the un-upgraded web nodes will ignore any body contents sent in the API request.

not usd anymore. Were likely from back when tsa was its own binary and
repo

Signed-off-by: Taylor Silva <[email protected]>
@taylorsilva taylorsilva added the bug label Aug 5, 2026
@taylorsilva
taylorsilva force-pushed the verify-workers-team branch from 740d39f to 34bdec0 Compare August 5, 2026 21:37
@taylorsilva taylorsilva added this to the v8.3.0 milestone Aug 5, 2026
…r's team

Before this commit it was previously possible, if you had a worker's
team private key, to connect to TSA and land/retire any team-scoped
worker, even those not belonging to the team the private key was scoped
to.

This change blocks it at the API layer by including information about
the worker in request body. Requests through TSA already scope the
request properly and have the right checks in place to ensure a user
can't fake the team the private key is scoped to.

This does also make land/retire/delete requests between Workers and the
Web not backwards compatible. The worker version has been bumped from
`2.5` to `3.0`. Land/retire/delete requests from old workers will fail
because they won't populate the request body and will get back a HTTP
400 from the web node.

Signed-off-by: Taylor Silva <[email protected]>
@taylorsilva
taylorsilva force-pushed the verify-workers-team branch from 34bdec0 to cb2ab03 Compare August 6, 2026 14:36
@taylorsilva
taylorsilva merged commit 3c44eaa into master Aug 6, 2026
11 checks passed
@taylorsilva
taylorsilva deleted the verify-workers-team branch August 6, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant