Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getPostLogOutUrl to include contextPath #100

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

jglick
Copy link
Member

@jglick jglick commented Jul 25, 2023

@jtnord noticed a regression when using this security realm in conjunction with CloudBees CI: when configuring single-sign on from a controller to Operations Center, where O.C. is in turn doing SSO to Google, as of a new O.C. SSO implementation, if you logged out from the controller you could be taken to a bogus URL https://…/cjoc/operations-center-openid/securityRealm/loggedOut which was a 404. This was because Jenkins.doLogout was redirecting to securityRealm/loggedOut relative to a URI /cjoc/operations-center-openid/logout (rather than the more common /cjoc/logout). As hinted at by Javadoc, this method expects the return value to be prefixed by the context path (the default value is req.getContextPath() + "/"), which GoogleOAuth2SecurityRealm was neglecting to do. Reproduced bug and verified fix using a Kind cluster running CI behind ngrok.

@Vlatombe Vlatombe added the bug label Dec 19, 2023
@Vlatombe Vlatombe merged commit 0b5cc72 into jenkinsci:master Dec 19, 2023
12 checks passed
@jglick jglick deleted the getPostLogOutUrl branch December 19, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants