Fix getPostLogOutUrl
to include contextPath
#100
Merged
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.
@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 becauseJenkins.doLogout
was redirecting tosecurityRealm/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 isreq.getContextPath() + "/"
), whichGoogleOAuth2SecurityRealm
was neglecting to do. Reproduced bug and verified fix using a Kind cluster running CI behind ngrok.