EDM-2612: Logout method in OCP is POST. Remove cookie on logout#393
Merged
celdrake merged 1 commit intoDec 3, 2025
Merged
Conversation
WalkthroughUpdates to authentication cookie handling and OpenShift logout behavior: session cookie clearing now sets MaxAge -1 and sends Clear-Site-Data header; setCookie computes a local secure flag. OpenShift logout discovery and remote /logout call were removed; function now returns an empty URL and nil error. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
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. Comment |
rawagner
approved these changes
Dec 3, 2025
509253b to
0c2151e
Compare
This was referenced Jun 22, 2026
jkilzi
added a commit
that referenced
this pull request
Jun 23, 2026
OpenShiftAuthHandler.Logout was returning ("", nil) since PR #393
(EDM-2612), which cleared only the FlightCtl session cookie but left
the OpenShift OAuth browser session active. Because the login page
auto-redirects when a single non-K8s provider is configured, users
were silently re-authenticated immediately after clicking Logout.
The original discovery-based approach ({apiServerURL}/.well-known/
oauth-authorization-server) was problematic when apiServerURL pointed
to the K8s API server, producing https://api.cluster:6443/logout as
the logout target — an invalid endpoint.
Fix: derive the logout URL directly from authURL (the OAuth
authorization endpoint). authURL always holds the OAuth server host
regardless of how apiServerURL is configured, so taking scheme://host
and appending /logout gives the correct
https://oauth-openshift.apps.{cluster}/logout without any HTTP
round-trip.
Fixes #708
Signed-off-by: Jonathan Kilzi <jkilzi@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Jonathan Kilzi <jkilzi@redhat.com>
jkilzi
added a commit
that referenced
this pull request
Jun 23, 2026
OpenShiftAuthHandler.Logout was returning ("", nil) since PR #393
(EDM-2612), which cleared only the FlightCtl session cookie but left
the OpenShift OAuth browser session active. Because the login page
auto-redirects when a single non-K8s provider is configured, users
were silently re-authenticated immediately after clicking Logout.
The original discovery-based approach ({apiServerURL}/.well-known/
oauth-authorization-server) was problematic when apiServerURL pointed
to the K8s API server, producing https://api.cluster:6443/logout as
the logout target — an invalid endpoint.
Fix: derive the logout URL directly from authURL (the OAuth
authorization endpoint). authURL always holds the OAuth server host
regardless of how apiServerURL is configured, so taking scheme://host
and appending /logout gives the correct
https://oauth-openshift.apps.{cluster}/logout without any HTTP
round-trip.
Fixes #708
Assisted-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Jonathan Kilzi <jkilzi@redhat.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.
Fixes issues on logout:
Summary by CodeRabbit
Bug Fixes
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.