I am having a JSP/Servlet based application running on Pivotal Cloud Foundary and using Siteminder for authentication.
The logout we implemented but is unsuccessful currentnly includes
- clearing of request.getSession().invalidate()
- followed by clearing of cookiesn (request.getCookies followed by setting MaxAge of all cookies to 0)
- followed by calling of the siteminder provided /logout url in new popup window
- followed by window.location as PCF Logout for logout from the PCF application.
With above steps the logout is not successful. However if I do the Shift+Cntrl+Del and delete the cookies --> then the logout works successful. So programmatically I want to achieve the same behavior using Servlet and JSP.
Thanks in advance!
Using the Pivotal SSO Tile, there are two steps you need to do to make this work.
First, you need to set up your plan using the Layer7 SiteMinder Integration Guide.
As is listed there...
This is a fairly complicated process and very specific to your provider. The only tip I can give you here is to do things exactly like in the docs. It's very easy to break stuff, so following exactly what's written gives you the best chance for success.
Once you get your plan set up, the second part would be to create a service instance using the plan & bind that to your app. Then follow the instructions for integrating your app.
The part to take specific note about, which is what handles the single logout is documented in the API here.
If you follow the docs for creating your service plan, it will be configured to do single logout, so you just need to make sure this endpoint is called after logging a user out in your app.
There's an example of how you'd do this for Spring Boot apps here.
To explain, this code get's invoked by Spring after a successful logout. The code here is simply creating a URL to the
/logout.doendpoint & issuing a redirect to the client. This is what's described in the doc link above.