-
Notifications
You must be signed in to change notification settings - Fork 80
feat(setting): add validation for auth-user-session-idle-ttl-minutes #510
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0f3f475 to
7dddcf6
Compare
pmatseykanets
previously approved these changes
Feb 19, 2025
JonCrowther
reviewed
Feb 20, 2025
Contributor
JonCrowther
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally looks good, just a comment and test change
7dddcf6 to
7ed7445
Compare
7ed7445 to
54f98d6
Compare
JonCrowther
previously approved these changes
Feb 20, 2025
crobby
previously approved these changes
Feb 21, 2025
Collaborator
crobby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super tiny nit and a non-blocking question.
lgtm. very straightforward
54f98d6 to
59c3451
Compare
crobby
previously approved these changes
Feb 21, 2025
JonCrowther
previously approved these changes
Feb 21, 2025
Signed-off-by: Alessio Greggi <alessio.greggi@suse.com>
Signed-off-by: Alessio Greggi <alessio.greggi@suse.com>
59c3451 to
ba9d94c
Compare
crobby
approved these changes
Feb 21, 2025
JonCrowther
approved these changes
Feb 21, 2025
This was referenced Feb 24, 2025
This was referenced Mar 28, 2025
This was referenced Jul 28, 2025
This was referenced Nov 19, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: rancher/rancher#45931
This depends on: rancher/rancher#48778 to be merged and refers to the following RFC: https://docs.google.com/document/d/1jN2faXl9FEb2E_9Ohm7uBrrVwuwnIj4HORiL4Wb9Udw/edit?tab=t.0
This PR adds validation functionality to the webhook, for a new user attribute:
auth-user-session-idle-ttl-minutes.This parameter differs from the existing
auth-user-session-ttl-minutesas the former tracks UI activity such as mouse clicks and keystrokes, while the latter is a timer for user session.Problem
Rancher has
auth-user-session-ttl-minutesto set a max length a UI session (16hrs) can last, where has user is idle for a specific time and come back still session is valid now. i.e., There is no configurable parameter to set the idle session timeout.Solution
For rancher/webhook I developed the validation function to be added to the validating webhook.
This will validate the user input for
auth-user-session-idle-ttl-minutes, the new configurable parameter to set the idle session duration on the UI.How to test it
Prerequisites: k3d running, with rancher instance up.
Build the branch:
Setup ngrok as follow:
Export the variables needed by the webhook and run it:
Check with
kubectlthat the webhook is behaving in the right way, by changing thevaluefield randomly:CheckList