Repository navigation
[dashboard] Improve dashboard session params - #1913
Conversation
## What this PR does This patch enables the `offline_access` scope for the dashbord keycloak client, so that users get a refresh token which gatekeeper can use to automatically refresh an expiring access token. Also session timeouts were increased. ### Release note ```release-note [dashboard] Increase session timeouts, add the offline_access scope, enable refresh tokens to improve the overall user experience when working with the dashboard. ``` Signed-off-by: Timofei Larkin <[email protected]>
Summary of ChangesHello Timofei Larkin (@lllamnyp), I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the dashboard's user experience by enhancing its authentication and session management. By enabling refresh tokens and extending session durations, users will experience fewer interruptions due to expiring sessions, as Gatekeeper can now automatically refresh access tokens. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
📝 WalkthroughWalkthroughThis change adds OAuth2 scope configuration to the OAuth proxy invocation and extends the KeycloakClient specification with optional client scopes and session/logout attributes in the dashboard system templates. Both are configuration-only additions with no functional logic modifications. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request enables the offline_access scope and increases session timeouts for the dashboard, which should improve the user experience by allowing automatic token refreshes. The changes in gatekeeper.yaml and keycloakclient.yaml are correct and achieve the stated goal. My review includes suggestions to make the new session timeout values and OAuth scopes configurable through Helm values. This will enhance the chart's flexibility and maintainability by allowing different configurations for different environments.
| - --cookie-secure=true | ||
| - --cookie-secret=$(OAUTH2_PROXY_COOKIE_SECRET) | ||
| - --skip-provider-button | ||
| - --scope=openid email profile offline_access |
There was a problem hiding this comment.
The OAuth scopes are hardcoded. To provide more flexibility, consider making the scopes configurable via the Helm chart's values.yaml. This would allow administrators to easily customize the requested scopes, for example, to disable offline_access if it's not desired in a specific environment.
- --scope={{ .Values.dashboard.oauth.scopes | default "openid email profile offline_access" }}| client.session.idle.timeout: "86400" | ||
| client.session.max.lifespan: "604800" |
There was a problem hiding this comment.
The session idle timeout and max lifespan are hardcoded. It's a good practice to make these values configurable through the Helm chart's values.yaml file. This improves flexibility and maintainability, allowing for easier customization across different deployment environments which may have different security requirements.
client.session.idle.timeout: {{ .Values.dashboard.session.idleTimeout | default "86400" | quote }}
client.session.max.lifespan: {{ .Values.dashboard.session.maxLifespan | default "604800" | quote }}|
Successfully created backport PR for |
|
Successfully created backport PR for |
What this PR does
This patch enables the
offline_accessscope for the dashbord keycloak client, so that users get a refresh token which gatekeeper can use to automatically refresh an expiring access token. Also session timeouts were increased.Release note
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.