Skip to content

Intermittent 401 "exp claim is too far in the future" due to default 10-minute JWT expiry #69

Description

@gpailler

I'm hitting random 401s when running generate on some of our CI agents with the following error: 'Expiration time' claim ('exp') is too far in the future

After some digging, I found two issues:

  • The default JWT expiry is 10 minutes, which is exactly GitHub's maximum. If the machine's clock is even a couple seconds behind, GitHub sees the exp as exceeding the limit and rejects it.

  • The --duration flag doesn't actually work because the code reads c.Int("jwt-expiry") but the flag is registered as "duration"

I propose #68 to fix both issues.

Thanks 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions