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

SSO: fix mergeSettings() in case the DB contains empty URLs #84290

Merged
merged 5 commits into from Mar 13, 2024

Conversation

dmihai
Copy link
Contributor

@dmihai dmihai commented Mar 12, 2024

What is this feature?

Previously, the empty URLs from the DB settings were not replaced by the URLs defined in the system settings. This was an issue for providers that require clients to send empty values for auth_url, token_url and api_url. The expectation in that case was that the auth_url, token_url and api_url would get their values from the system settings but that didn't happen if clients sent empty values for those settings. It worked only if clients didn't send them at all.

Why do we need this feature?

This is a fix for the escalation https://github.com/grafana/support-escalations/issues/9668.

Who is this feature for?

For everybody using SSO Settings API.

Which issue(s) does this PR fix?:

Fixes #

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@dmihai dmihai requested a review from a team March 12, 2024 14:03
@dmihai dmihai requested a review from a team as a code owner March 12, 2024 14:03
@grafana-delivery-bot grafana-delivery-bot bot added this to the 11.0.x milestone Mar 12, 2024
@dmihai dmihai added the no-changelog Skip including change in changelog/release notes label Mar 12, 2024
@dmihai dmihai changed the title SSO: fix mergeSettings() in case the DB contains empty strings SSO: fix mergeSettings() in case the DB contains empty URLs Mar 12, 2024
@grafanabot
Copy link
Contributor

❌ Failed to run Playwright plugin e2e tests.

Click here to browse the Playwright report and trace viewer.
For information on how to run Playwright tests locally, refer to the Developer guide.

@grafanabot
Copy link
Contributor

❌ Failed to run Playwright plugin e2e tests.

Click here to browse the Playwright report and trace viewer.
For information on how to run Playwright tests locally, refer to the Developer guide.

Copy link
Contributor

@IevaVasiljeva IevaVasiljeva left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

Hello @dmihai!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

Copy link
Contributor

This PR must be merged before a backport PR will be created.

@dmihai dmihai merged commit 2acd48d into main Mar 13, 2024
25 checks passed
@dmihai dmihai deleted the dmihai/sso-merge-empty-config branch March 13, 2024 08:31
grafana-delivery-bot bot pushed a commit that referenced this pull request Mar 13, 2024
* fix mergeSettings() in case the db contains empty strings

* use correct github urls in test

* overwrite only urls

* update comment for mergeSettings()

(cherry picked from commit 2acd48d)
dmihai added a commit that referenced this pull request Mar 13, 2024
…#84344)

SSO: fix mergeSettings() in case the DB contains empty URLs (#84290)

* fix mergeSettings() in case the db contains empty strings

* use correct github urls in test

* overwrite only urls

* update comment for mergeSettings()

(cherry picked from commit 2acd48d)

Co-authored-by: Mihai Doarna <mihai.doarna@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend backport v10.4.x no-changelog Skip including change in changelog/release notes type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants