ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

java – Spring security Saml – SP和IDP之间的时差

2019-07-14 15:27:59  阅读:286  来源: 互联网

标签:java spring spring-security saml-2-0


我正在寻找一种方法来增加我的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>

标签:java,spring,spring-security,saml-2-0
来源: https://codeday.me/bug/20190714/1459428.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有