Skip to content
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

bug fix: SAML_LOGIN_ENABLED setting logic #5784

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

ism-k
Copy link
Contributor

@ism-k ism-k commented Jul 6, 2022

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

I would like to point out that an existing SAML_LOGIN_ENABLED may have inappropriately strict conditions for it to be true.

I first identified this problem as a bug in the following PR, which I attach as a reference:
getredash/contrib-helm-chart#122

In short, due to a change merged from v10 in PR #5175, SAML cannot be enabled at startup unless an environment variable REDASH_SAML_SSO_URL is set, but this variable is actually unnecessary in the case of dynamic SAML login.

So I'm adding a new conditional branch to avoid SAML_SSO_URL != "" when the SAML login type is not static.

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

@ism-k ism-k changed the title [WIP] bug fix SAML_LOGIN_ENABLED setting logic [WIP] bug fix: SAML_LOGIN_ENABLED setting logic Jul 6, 2022
@ism-k ism-k changed the title [WIP] bug fix: SAML_LOGIN_ENABLED setting logic bug fix: SAML_LOGIN_ENABLED setting logic Jul 6, 2022
@ism-k ism-k marked this pull request as ready for review July 6, 2022 16:54
@susodapop susodapop added the Team Review Meets PR criteria, ready for full review label Jul 6, 2022
@kenchan0130
Copy link
Contributor

@susodapop

This change is very important for redash admin users with SAML settings.
The change itself also appears to be appropriate.

@susodapop
Copy link
Contributor

I'm not currently contributing to the Redash project.

@acefei
Copy link

acefei commented Feb 14, 2023

Highly recommended this merge to the trunk branch, so that I don't need to set the redundant env by kubectl set env deployment/my-release-redash REDASH_SAML_SSO_URL=xxxxx to enable SAML login.
Given @susodapop didn't contribute to the Redash project, could @ism-k invite others to approve this?

@acefei
Copy link

acefei commented Feb 16, 2023

ping @arikfr

Copy link
Member

@arikfr arikfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@arikfr arikfr merged commit d6dbc64 into getredash:master Feb 17, 2023
@ism-k
Copy link
Contributor Author

ism-k commented Feb 17, 2023

@acefei
Thanks for facilitating!

@arikfr
Copy link
Member

arikfr commented Apr 3, 2023

This is not related to the Pull Request directly, but I assume that the author or followers might have SAML enabled for their deployment and should be aware of the following Security Advisory: #5961. This affects all Redash versions and should be patched immediately.

AkaashK pushed a commit to tharzeez/redash that referenced this pull request Jul 18, 2023
harveyrendell pushed a commit to pushpay/redash that referenced this pull request Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Meets PR criteria, ready for full review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants