-
Notifications
You must be signed in to change notification settings - Fork 395
[OIDC] Enhance OIDC Integration: Secure client secret handling and fix access token storage #4159
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: master
Are you sure you want to change the base?
Conversation
|
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.
Pull Request Overview
This PR enhances OIDC integration by introducing support for dynamically acquiring the OIDC RP client secret via a script and fixes access token storage issues.
- Introduces a new configuration option (OIDC_RP_CLIENT_SECRET_SCRIPT) for secret retrieval.
- Adjusts the authentication and logout methods to use the new secret source as a fallback.
- Updates configuration templates to document the new option.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
desktop/core/src/desktop/settings.py | Added retrieval for a new client secret script configuration. |
desktop/core/src/desktop/conf.py | Updated default client secret value and added a new secret script config. |
desktop/core/src/desktop/auth/backend.py | Modified authentication flow to use the new secret and added token-saving behavior; possible indentation issue. |
desktop/conf/pseudo-distributed.ini.tmpl | Updated config comments to include the new secret script option (naming inconsistency noted). |
desktop/conf.dist/hue.ini | Updated config comments to include the new secret script option (naming inconsistency noted). |
Comments suppressed due to low confidence (3)
desktop/core/src/desktop/auth/backend.py:875
- The function 'save_refresh_tokens' appears to be indented within 'save_access_tokens', causing it to be defined as a nested function instead of a class method. Consider moving it to the same indentation level as 'save_access_tokens'.
def save_refresh_tokens(self, refresh_token):
desktop/conf/pseudo-distributed.ini.tmpl:834
- The configuration key in the template ('oidc_rp_client_script') does not match the key used in the code ('oidc_rp_client_secret_script'). Update the template for consistency.
## oidc_rp_client_script=
desktop/conf.dist/hue.ini:832
- The configuration key in the template ('oidc_rp_client_script') does not match the key used in the code ('oidc_rp_client_secret_script'). Update the template for consistency.
## oidc_rp_client_script=
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.
Thanks @SoniaComp for contributing a fix!
I've left one small review 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.
LGTM!
desktop/core/src/desktop/conf.py
Outdated
default="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | ||
default="" | ||
), |
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.
@SoniaComp Looks like there are some unit test failures, can you please check? Also is this change required?
What changes were proposed in this pull request?
How was this patch tested?
This patch was tested by building the Hue Docker image internally and deploying it via Helm chart. We verified the integration with Keycloak OIDC during testing.
Please review Hue Contributing Guide before opening a pull request.