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

feat: Refresh token expiration window #3770

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StarAurryon
Copy link
Contributor

@StarAurryon StarAurryon commented May 25, 2024

This is a rebase, squash merge and fix of the previous PR here: #2827

Introduce optional configuration value oauth2.refresh_token_rotation.grace_period that can be set as a duration (1m,
Add a new migration: boolean used SQL column in hydra_oauth2_refresh

When grace_period has positive duration the act of using a refresh token will not invalidate the token and instead mark it as used in the database and set its expiration time to the UTCNOW + the value of the grace period. This will allow a client to continue to use a refresh token for the duration of the grace period.

Related issue(s)

#1831

Checklist

  • [X ] I have read the contributing guidelines.
  • [ X] I have referenced an issue containing the design document if my change
    introduces a new feature.
  • [ X] I am following the
    contributing code guidelines.
  • [X ] I have read the security policy.
  • [ X] I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    [email protected]) from the maintainers to push
    the changes.
  • [X ] I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@StarAurryon StarAurryon changed the title add refresh_token grace period feat: Refresh token expiration window May 25, 2024
@StarAurryon
Copy link
Contributor Author

Just a quick question here regarding grace period. Shouldn't we also ensure that when a new refresh token is issued the grand parent refresh token is revoked and also all the "brother" refresh tokens are revoked ?

My understanding is that hydra does not need to think like that a the moment as no grace period was implemented.

@StarAurryon StarAurryon force-pushed the refresh-token-expiration-window-2 branch from b55a602 to 10d82e7 Compare May 25, 2024 12:22
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

2 participants