The multi tenant SAML application I'm working on uses spring-security-saml and contains two service providers and one IDP (Active Directory Federation Services). The developer who worked SSO into this application chose to make it multi tenant because it is a dual-purpose application with two different interfaces - essentially two applications in one. It is designed to be used in a browser with two tabs open, so one interface runs in the first tab and the other interface runs in the second tab. Everything seems to be working properly with the exception of one particular workflow:
- Open a browser, navigate to the ADFS sign in page, and sign in to the application with the first service provider
- Open another tab, navigate to the ADFS sign in page, and choose the second service provider
- Perform a Global Logout
The log file contains errors like this:
Message a598hd6ff68479a44c3495f7h4216aa not found in session 11cfm6ja982te14dxxul71iufg
Received logout response is invalid
InResponseToField in LogoutResponse doesn't correspond to sent message a598hd6ff68479a44c3495f7h4216aa
I suspect that this is related to the fact that the same JSESSIONID cookie is being shared between tabs, so when one SP logs out it terminates the associated session. Then when the other SP tries to log out with the same session it fails because the session is gone. Can someone please help me solve this problem?