Reputation: 1005
Im new to spring security and SAML2 and I was asked to implement a SSO in a spring-security SP with SAML2. Im trying to do a SSO initiated by the IDP(in my case SSOcircle) after the user tried to receive unauthorized resource from the SP. after that the idp redirects the user from authentication, when the authentication phase finishes successfully the user is redirected to https://localhost/webinterface/saml/SSO instead of the resource the user tried to reach, If the resource the user wanted to reach was for example: https://localhost:443/webinterface/webui how do I make the Idp redirect the user back to that same URL?
Upvotes: 0
Views: 4019
Reputation: 457
The SAML service provider must supply the parameter RelayState with the value of the final destination (in your case: https://localhost:443/webinterface/webui) when sending the AuthnRequest to the IDP. The IDP will then send the same value back with the SAML response after successful authentication. This is for SP initiated SAML SSO.
With IDP intitiated SSO you can use the URL
https://idp.ssocircle.com/sso/idpssoinit?metaAlias=%2Fpublicidp&spEntityID=<YOUR SERVICE PROVIDER ENTITY ID>&RelayState=<finalURL>
Upvotes: 4