java – Spring security Saml – SP和IDP之间的时差
发布时间:2020-12-15 05:12:00 所属栏目:Java 来源:网络整理
导读:我正在寻找一种方法来增加我的saml消息的到期时间.我使用 Spring Security和SAML 1.0.0-RC2. 此时,如果服务器**时间太不相同,例如5分钟,我得到以下错误: HTTP Status 401 - Authentication Failed:Error validating SAML message: SAML response is not val
我正在寻找一种方法来增加我的saml消息的到期时间.我使用
Spring Security和SAML 1.0.0-RC2.
此时,如果服务器**时间太不相同,例如5分钟,我得到以下错误: HTTP Status 401 - Authentication Failed:Error validating SAML message: SAML response is not valid; nested exception is org.opensaml.common.SAMLException: SAML response is not valid 我想将到期时间设置为10分钟,以防止出现这些错误.我一直在查看文档,但我不明白如何更改到期时间.如果我查看Configuration authentication object部分,可以更改到期时间,但我无法理解这个想法. 有人可以帮帮我吗? **我的服务器(SP)和客户服务器(IDP,很可能是安装了ADFS的服务器). 解决方法
在Stefan的anwser之后,我知道在哪里看!实际上文档确实描述了这个东西,我只是没有拿起它:
10.3 Validity intervals.欢呼Stefan指出responseSkew属性!
只需将属性responseSkew添加到WebSSOProfileConsumerImpl和SingleLogoutProfileImpl bean: <bean id="webSSOprofileConsumer" class="org.springframework.security.saml.websso.WebSSOProfileConsumerImpl"> <property name="responseSkew" value="600"/> <!-- 10 minutes --> </bean> <bean id="logoutprofile" class="org.springframework.security.saml.websso.SingleLogoutProfileImpl"> <property name="responseSkew" value="600"/> <!-- 10 minutes --> </bean> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |