We are working on an application, which is protected with spring security saml.
Authentication works fine, but there is one problem with the following workflow in production environment.
- user requests the unprotected address www.server.com
- response is a html page with an inline script that changes window.location.href to the saml protected page (service provider) www.server.com/app/action?param1=value1¶m2=value2
- spring saml detects that authentication is needed and redirects the user to the login form (identity provider) on www.login-server.com
- at this point the login form is the first page that is displayed to the user
- user adds this login page as bookmark (including saml related url params for this http session) www.login-server.com/adfs/ls/?SAMLRequest=xxx&SigAlg=xxx&Signature=arGdsZwJtHzTDjQP1oYqbjNO
- user works with the application...
- at the next day the user opens this bookmark and login
- IdP redirects to the SP but the belonging http session has already expired
Now we get the following exception in our application:
org.opensaml.common.SAMLException: InResponseToField of the Response doesn't correspond to sent message arGdsZwJtHzTDjQP1oYqbjNO
Any ideas how to handle this workflow so the user can use the application after successful login? Thanks for your answers!
init-Action
of your application? – Smilacaceous