Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWT: require valid exp claim by default #5057

Merged
merged 1 commit into from
May 16, 2024
Merged

JWT: require valid exp claim by default #5057

merged 1 commit into from
May 16, 2024

Conversation

rnewson
Copy link
Member

@rnewson rnewson commented May 16, 2024

Overview

Users of JWT rightly expect tokens to be considered invalid once they expire. It is a surprise to some that this requires a change to the default configuration. In the interest of security we will now require a valid exp claim in tokens. Administrators can disable the check by changing required_claims back to the empty string.

We do not add nbf as a required claim as it seems to not be set often in practice.

Testing recommendations

N/A

Related Issues or Pull Requests

#5046

Checklist

  • Code is written and works correctly
  • Changes are covered by tests
  • Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • Documentation changes were made in the src/docs folder
  • Documentation changes were backported (separated PR) to affected branches

@rnewson rnewson force-pushed the jwt-exp-by-default branch 2 times, most recently from b8a8e79 to e87c731 Compare May 16, 2024 10:36
Copy link
Contributor

@big-r81 big-r81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor

@big-r81 big-r81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Jan commented, remove the 3.4 changelog entry in this PR and include it in #4888.

@rnewson rnewson force-pushed the jwt-exp-by-default branch 2 times, most recently from 83655f4 to 1d48c78 Compare May 16, 2024 15:53
Users of JWT rightly expect tokens to be considered invalid once they expire. It
is a surprise to some that this requires a change to the default
configuration. In the interest of security we will now require a valid `exp`
claim in tokens. Administrators can disable the check by changing
`required_claims` back to the empty string.

We do not add `nbf` as a required claim as it seems to not be set often in
practice.

closes #5046
@rnewson rnewson merged commit f9e0eed into main May 16, 2024
23 checks passed
@rnewson rnewson deleted the jwt-exp-by-default branch May 16, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants