SAMLException: InResponseToField of the Response doesn't correspond to sent message

前端 未结 2 1310
花落未央
花落未央 2021-01-18 01:51

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 pr

2条回答
  •  盖世英雄少女心
    2021-01-18 02:12

    When you applicate generated an AuthnRequest, the request has an ID which your application somehow keeps. The corresponding response from IdP must have InResponseTo attribute set to that same ID value so that your application can verify that the response is meant to be for the request it sent.

    However, when your user bookmarked the adfs link that contains request (www.login-server.com/adfs/ls/?SAMLRequest=xxx...), your application had totally forgotten about that request. In other word, it no longer kept the request ID somewhere and couldn't verify response.

    The solution is to tell your users not to bookmark the www.login-server.com/adfs/ls/?SAMLRequest=xxx... link. Instead, they must bookmark a link in your application where it can generate a new request and send to ADFS.

提交回复
热议问题