Clustered environments
One of the things that we failed to mention in our initial diagram of Single Logout was how the logout is performed. Unfortunately, it is implemented by storing a mapping of the service ticket to HttpSession
as an in-memory map. This means that Single Logout will not work properly within a clustered environment:
Figure 18.3 – CAS authentication in a clustered environment
Consider the following situation in the context of the preceding diagram:
- The user logs in to Cluster Member A.
- Cluster Member A validates the service ticket.
- It then stores in memory, the mapping of the service ticket to the user’s session.
- The user requests to log out from the CAS server.
The CAS server sends a logout request to the CAS service, but Cluster Member B receives the logout request. It looks in its memory but does not find a session for Service Ticket A, because it only exists in Cluster Member A. This means...