-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add generic OIDC authentication flow #6783
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6783 +/- ##
==========================================
- Coverage 63.82% 63.17% -0.65%
==========================================
Files 161 164 +3
Lines 13060 13285 +225
Branches 1803 1834 +31
==========================================
+ Hits 8335 8393 +58
- Misses 4425 4592 +167
Partials 300 300
|
Hi @arikfr, |
18294ee
to
e72f92a
Compare
- Added a generic authentication flow for OIDC. - Modified some templates to display OIDC login button. - Added new env variables to support the OIDC auth flow. Mainly, OIDC discovery endpoint is configurable now. - Added new routs for OIDC auth. - Manually tested same flow with Google (without domain verification) and AWS Cognito.
- Fixed typo - Added unit tests cases
- removed redudent userinfo fetch instead parsed id_token for userinfo - added domains verification for OIDC in UI - incorporated review comments - tested with AWS cognito
- fix typo
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! Let's see how the tests do!
Thanks for your work @palash247. I will approve this and leave polishing for another PR. This is a very needed feature and it can't wait anymore.
user_info = oauth.oidc.parse_id_token(token) | ||
if user_info: | ||
session["user"] = user_info |
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.
I would user_info
-> userinfo
in every single place/file because the endpoint is /userinfo
haha (non-issue really)
Can you check:
*You can force push to dismiss the version bumps as you did before |
What type of PR is this?
Description
Generic OIDC login
Note: Seeking feedback
Problem
Currently, Redash is limited to supporting authentication via Google's OIDC. Expanding the authentication support to a generic OIDC flow increases Redash's accessibility and flexibility, making it a more inclusive tool for diverse environments.
Implementation Steps
To fully implement and integrate the generic OIDC authentication flow into Redash, the following steps need to be taken (Open for feedback):
Make OIDC Discovery Endpoint Configurable: This flexibility allows Redash to dynamically adapt to different IdPs by simply modifying configuration parameters.
Implement Routes for OIDC Authentication: Develop new routes within the application to handle the authentication process via OIDC.
Modify Login Templates: Update the UI components, specifically the login page templates, to include an OIDC login button.
Manual Testing with Multiple OIDC IdPs: To ensure compatibility and robustness, manually test the new authentication flow with multiple OIDC IdPs, including but not limited to Google, AWS, Okta, and Auth0. (Tested with Google and AWS Cognito)
Implement Unit Tests
Write Documentation for OIDC Configuration: Create detailed documentation to assist users in configuring OIDC with Redash. This documentation should cover configuration steps for different IdPs.
Mutate OIDC to include domain check: (not sure about this one) Current Google OIDC flow has domain verification, see if this can be made generic.
Replace Google OIDC with generic one
How is this tested?
For testing manually, following steps should be more are less common among different IdPs.
Related Tickets & Documents
#6781
Mobile & Desktop Screenshots/Recordings (if there are UI changes)