SAML 响应 notBeforeDate 问题

Issue with SAML response notBeforeDate

身份验证期间出现 SAMLException“当前日期早于 notBeforeDate”。对于 90% 的登录尝试,当前日期和 "notBeforeDate" 相同,这会导致错误。出现此错误的原因可能是什么?

简而言之:这很可能是由 IdP/SP 服务器上的时间漂移​​引起的。 如果您有权访问这些服务器,请确保您已与 NTP 正确同步 servers/or 手动将时间调整为正确的时间。

如果不这样做,请通知在 IdP 端或 SP 端工作的 IT 部门。让他们知道检查服务器时间同步。

错误指的是 SAML 请求的这一部分:

<saml:Subject>
  <saml:NameID SPNameQualifier="http://sp.example.com/demo1/metadata.php" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7</saml:NameID>
  <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
    <saml:SubjectConfirmationData NotOnOrAfter="2014-07-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/>
  </saml:SubjectConfirmation>