This repository was archived by the owner on Sep 30, 2024. It is now read-only.
soap: Fix auto-redirect to IdP when SOAP is enabled#64184
Merged
eseliger merged 1 commit intoJul 31, 2024
Conversation
When exactly 1 auth provider is configured, Sourcegraph redirects users automatically to the IdP to speed up the sign-in process, so that users don't have to make an extra click to select the one and only sign-in provider. SOAP is a special case though because it is hidden by default, but enabled on all cloud instances. That caused this auto redirect to never fire for Cloud, since there are technically two auth providers. This PR fixes it by checking for the sourcegraph-operator query parameter which tells the UI to show the magic SOAP auth provider in the list. Closes SRC-500 Test plan: Tested on a cloud instance that indeed there is no auto redirect. Then tested locally with SOAP configured that auto redirects happen after this PR, and that there is no auto redirect when the ?sourcegraph-operator query parameter is set.
Contributor
|
💡 Learn more about each section: PR description tips, Test Plan and Changelog. |
Member
Author
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ggilmore
approved these changes
Jul 31, 2024
Contributor
|
@eseliger, sorry to bother you, but do you think this change could cause an auth requirement on dotcom? |
vovakulikov
added a commit
that referenced
this pull request
Aug 2, 2024
This reverts commit eb5a0d1.
sqs
referenced
this pull request
Aug 2, 2024
Reverts sourcegraph/sourcegraph#64184 The sourcegraph/sourcegraph#64184 is probably caused auth redirect on dot com. Revert it while we're fixing the original problem ## Test plan CI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

When exactly 1 auth provider is configured, Sourcegraph redirects users automatically to the IdP to speed up the sign-in process, so that users don't have to make an extra click to select the one and only sign-in provider.
SOAP is a special case though because it is hidden by default, but enabled on all cloud instances. That caused this auto redirect to never fire for Cloud, since there are technically two auth providers.
This PR fixes it by checking for the sourcegraph-operator query parameter which tells the UI to show the magic SOAP auth provider in the list.
Closes SRC-500
Test plan: Tested on a cloud instance that indeed there is no auto redirect. Then tested locally with SOAP configured that auto redirects happen after this PR, and that there is no auto redirect when the ?sourcegraph-operator query parameter is set.
Changelog
When only a single auth provider is configured, users are again redirected correctly to the identity provider on Sourcegraph Cloud.