-
Notifications
You must be signed in to change notification settings - Fork 250
[batch/auth] Making session timeout duration configurable #14810
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
base: main
Are you sure you want to change the base?
Conversation
Not sure i particularly like the idea of an environment variable for this. Why did you opt for this solution over editing the existing configuration file? |
There's currently no existing config file for auth, but long-ish term we probably should have one. In any case, we grab the environment variable here in the same manner we do in other auth scripts (e.g. here). |
makes sense. thanks for the explanation |
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.
auth/deployment.yaml
Outdated
name: auth-oauth2-client-secret | ||
key: sp_oauth_scope | ||
optional: true |
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.
Have you tried setting this in a developer environment to see it working?
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.
Yup, there's now a proper Kubernetes secret for this (see the auth-config portion of the current deployment.yaml). Also noted in the updated description
Mostly good, just want to see it working in a developer environment before giving the 👍 |
Change Description
Adding SESSION_MAX_AGE_SECS environment variable, allowing this session timeout window to be configurable in different deployments. This is set to 30 minutes by default.
Testing results:
/api/v1alpha/userinfo
api call, am no longer able to after timeout;Security Assessment
Impact Description
Enables configuration of this timeout duration, however we already have had a notion of timing out sessions. Additionally, this will shorten our default timeout window from 30 days to 30 minutes.
(Reviewers: please confirm the security impact before approving)