[PLT-3581] Add configurable sign-out URL via --sign-out-url / OAUTH2_PROXY_SIGN_OUT_URL#31
Open
majimenez-stratio wants to merge 4 commits into
Open
[PLT-3581] Add configurable sign-out URL via --sign-out-url / OAUTH2_PROXY_SIGN_OUT_URL#31majimenez-stratio wants to merge 4 commits into
majimenez-stratio wants to merge 4 commits into
Conversation
…OUT_URL The flag was already registered but not wired to any struct. This connects it so deployments can override the provider's default sign-out redirect URL without changing the SIS root URL (needed for non-standard IdP logout flows like Autentica). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
url.Values{} was overwriting SignOutURL's query string entirely,
dropping params like ?appId=5784 when adding the rd redirect.
Use redirect.Query() to merge instead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
--sign-out-urlflag was already registered inoptions.gobut never wired to any struct field — it was effectively dead code.OAUTH2_PROXY_SIS_ROOT_URL.?appId=5784) were dropped when appending therdredirect parameter.Changes
pkg/apis/options/providers.goSignOutURL stringfield toProviderstructpkg/apis/options/legacy_options.goSignOutURLtoLegacyProviderwithflag:"sign-out-url"+ map inconvert()providers/providers.goSignOutURLfrom config intoProviderData.SignOutURLproviders/sis.goredirect.Query()instead ofurl.Values{}to preserve existing query paramsproviders/sis_test.goTestSISProviderGetSignOutURLcovering query param preservationUsage
When set, after clearing the session cookie oauth2-proxy redirects the browser to this URL (preserving any existing query params) instead of
<SIS_ROOT>/logout.Test plan
OAUTH2_PROXY_SIGN_OUT_URLunset → logout behaviour unchangedOAUTH2_PROXY_SIGN_OUT_URL=https://autentica.redsara.es/Autentica/logout?appId=5784→ browser redirects to Autentica on sign-out withappIdparam intactgo test ./providers/ -run TestSISProviderpassesRelates to: PLT-3581 (https://stratio.atlassian.net/browse/PLT-3581)
🤖 Generated with Claude Code