OpenFn / OpenFn/kit

worker: Possible infinite loop when JWT verification fails

Open
#944 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DevX
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

If there's a problem in JWT verification, we think there's a case where the claim loop will continue to run infinitely even though the socket is disconnected. This sort of ends up with a zombie worker which will noiselessly fail to claim forever.

And that makes sense because the backoffloop will just trap an error and back off.

To reproduce:

  • in the lightning mock, set the not before token on the JWT to sometime in the future
  • This will trigger JWT validation to fail in the worker
  • This will exit the claim channel but also continue to run the backoff loop without doing anything

Need to investigate this

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure in the lightning mock with the JWT not-before token set in the future. Trace the worker's claim channel and backoff loop to determine why failed verification continues after the socket disconnects; done means the worker stops instead of retrying forever.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.