Skip to content

Configure post-logout redirect URI for OAuth2/OIDC - #1936

Open
DanielStuempel wants to merge 1 commit into
kafbat:mainfrom
DanielStuempel:main
Open

Configure post-logout redirect URI for OAuth2/OIDC#1936
DanielStuempel wants to merge 1 commit into
kafbat:mainfrom
DanielStuempel:main

Conversation

@DanielStuempel

@DanielStuempel DanielStuempel commented Aug 13, 2026

Copy link
Copy Markdown
  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

What changes did you make? (Give an overview)
Added a post logout redirect URI so the auth provider redirects back to Kafka UI after logout.
According to documentation: https://docs.spring.io/spring-security/reference/reactive/oauth2/login/logout.html#oauth2login-advanced-oidc-logout

Is there anything you'd like reviewers to focus on?
No.

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually: compiled locally, deployed to Kubernetes, verified redirect with Keycloak OIDC
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

Summary by CodeRabbit

  • Bug Fixes
    • Improved OpenID Connect logout behavior by redirecting users to the application’s base URL after logout.

@DanielStuempel
DanielStuempel requested a review from a team as a code owner August 13, 2026 11:54
@kapybro kapybro Bot added status/triage/manual Manual triage in progress and removed status/triage/manual Manual triage in progress labels Aug 13, 2026
@kapybro

kapybro Bot commented Aug 13, 2026

Copy link
Copy Markdown

AI Summary

Kafka UI currently lacks a configured redirect URI after user logout, preventing the auth provider from returning to the application. This change adds a post-logout redirect URI to the OIDC configuration, ensuring the user is properly redirected back to Kafka UI following a session termination.

@kapybro kapybro Bot changed the title Add post logout redirect URI Configure post-logout redirect URI for OAuth2/OIDC Aug 13, 2026
@kapybro kapybro Bot added area/auth App authentication related issues impact/changelog A PR with changes which should be addressed in the changelog explicitly impact/documentation A PR with changes which should be addressed in the documentation scope/backend Related to backend changes type/enhancement En enhancement/improvement to an already existing feature labels Aug 13, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi DanielStuempel! 👋

Welcome, and thank you for opening your first PR in the repo!

Please wait for triaging by our maintainers.

Please take a look at our contributing guide.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 34b8b707-dc29-442e-80f2-38b7f71cc667

📥 Commits

Reviewing files that changed from the base of the PR and between 07c4351 and fe06bb0.

📒 Files selected for processing (1)
  • api/src/main/java/io/kafbat/ui/config/auth/OAuthSecurityConfig.java

📝 Walkthrough

Walkthrough

The default OIDC logout handler now sets {baseUrl} as the post-logout redirect URI before returning the handler.

Changes

OAuth logout flow

Layer / File(s) Summary
Configure OIDC logout redirect
api/src/main/java/io/kafbat/ui/config/auth/OAuthSecurityConfig.java
The handler now configures {baseUrl} as the post-logout redirect URI before returning.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Mergeability Score: ⚪ Minimal · up to fe06b

This localized authentication configuration change adds the post-logout redirect behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: alexeyzavyalov

Poem

A rabbit logs out with a hop and a cheer,
{baseUrl} guides the return path clear.
The handler is set, then sent on its way,
For a tidy goodbye at the end of the day.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: configuring a post-logout redirect URI for OAuth2/OIDC.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth App authentication related issues impact/changelog A PR with changes which should be addressed in the changelog explicitly impact/documentation A PR with changes which should be addressed in the documentation scope/backend Related to backend changes type/enhancement En enhancement/improvement to an already existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant