Skip to content

[PLT-3581] Add configurable sign-out URL via --sign-out-url / OAUTH2_PROXY_SIGN_OUT_URL#32

Open
majimenez-stratio wants to merge 4 commits into
branch-0.4from
feature/PLT-3581-sign-out-url-0.4
Open

[PLT-3581] Add configurable sign-out URL via --sign-out-url / OAUTH2_PROXY_SIGN_OUT_URL#32
majimenez-stratio wants to merge 4 commits into
branch-0.4from
feature/PLT-3581-sign-out-url-0.4

Conversation

@majimenez-stratio
Copy link
Copy Markdown
Collaborator

@majimenez-stratio majimenez-stratio commented May 12, 2026

Summary

  • Connects the already-registered (but dead) --sign-out-url / OAUTH2_PROXY_SIGN_OUT_URL flag so operators can override the post-logout browser redirect URL
  • Fixes a bug in SISProvider.GetSignOutURL where existing query params in the sign-out URL were silently dropped (e.g. ?appId=5784 from Autentica/REDSARA)
  • Regenerates docs/docs/configuration/alpha_config.md to document the new field

Backport of #29 (master) targeting branch-0.4.

Closes PLT-3581

Use case

Autentica (REDSARA) requires a non-standard logout URL with a query param:

https://autentica.redsara.es/Autentica/logout?appId=5784

This can now be set with:

OAUTH2_PROXY_SIGN_OUT_URL=https://autentica.redsara.es/Autentica/logout?appId=5784

Test plan

  • go test ./providers/... -run TestSISProviderGetSignOutURL passes (3 cases: no redirect, redirect added, existing query params preserved)
  • Configure --sign-out-url with a URL containing query params and verify redirect works end-to-end

🤖 Generated with Claude Code

majimenez-stratio and others added 4 commits May 12, 2026 19:20
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant