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

Make sure token does not expire within 10 seconds instead of 2 #268

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

bluesliverx
Copy link
Contributor

@bluesliverx bluesliverx commented Nov 2, 2022

We have seen issues where a token is attempted to be used and is determined to be valid by the code, but expires before it is actually used. There is a buffer of 2 seconds set in the code, but this is apparently not long enough. Ideally this would be configurable, but for now I would like to extend that buffer to 10 seconds. Tokens will be considered expired if they expire within the next 10 seconds during the check instead of 2 seconds.

This is such a simple change that I decided not to create an issue for it, please let me know if you would like an issue instead.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • (see above) Link to relevant issues in GitHub or Jira
  • [n/a] Link to relevant pull requests, esp. upstream and downstream changes
  • (existing tests pass just fine, I'm not adding any features, just changing the window in which a token is considered expired) Ensure you have provided tests - that demonstrates feature works or fixes the issue

@jetersen jetersen added the bug label Nov 17, 2023
@jetersen jetersen merged commit af8c162 into jenkinsci:master Nov 17, 2023
14 checks passed
@omehegan
Copy link
Member

I wonder if this change is what is causing #323.

@bluesliverx
Copy link
Contributor Author

@omehegan, I don't claim that it isn't, but I'm not seeing how it could be related. Increasing a timeout is causing a hudson.model.View.getOwner() to return null....

@jetersen
Copy link
Member

@omehegan and @bluesliverx more likely #223 (comment) causing the issue simply looked in git blame for when tokenExpiry was added.

@omehegan
Copy link
Member

omehegan commented Feb 5, 2024

@jetersen ah, that makes a lot more sense! I was only going off of the comments in the bug about which versions were affected, sounds like they were off by one or two.

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.

3 participants