简体   繁体   English

与 SAML 和 Spring Security 的连接错误

[英]Error of connection with SAML and Spring Security

I'm using Spring Security 4.2.13.RELEASE and spring-security-saml2-core 1.0.10.RELEASE.我正在使用 Spring Security 4.2.13.RELEASE 和 spring-security-saml2-core 1.0.10.RELEASE。 The idp is Google (and I don't have access to its configuration). idp 是谷歌(我无权访问其配置)。

My application is run on a tomcat-like server.我的应用程序在类似 tomcat 的服务器上运行。 After this short briefing, my issue!在这个简短的简报之后,我的问题!

Often, users complain about problem of connection, they are connect to their idp and when they try to access to my application they go to an error page.通常,用户抱怨连接问题,他们连接到他们的 idp,当他们尝试访问我的应用程序时,他们会进入错误页面。 This page explain "Authentication Failed: Error validating SAML message".此页面解释“身份验证失败:验证 SAML 消息时出错”。 If they empty their web browser cache, they can have the right redirection to the idp and connect to my application.如果他们清空 Web 浏览器缓存,他们可以正确重定向到 idp 并连接到我的应用程序。

Why appear this error?为什么会出现这个错误? It seems configuration is right if they empty their cache.如果他们清空缓存,配置似乎是正确的。

I have change session time of tomcat to be the same of the idp, I also change maxAuthenticationAge and maxAssertionTime of WebSSOProfileConsumerImpl and WebSSOProfileConsumerHoKImpl but it seems the problem is steel here.我已将 tomcat 的会话时间更改为与 idp 相同,我还更改了 WebSSOProfileConsumerImplWebSSOProfileConsumerHoKImplmaxAuthenticationAgemaxAssertionTime ,但似乎问题出在这里。

What should I do?我应该怎么办?

I have change the log level.我已经更改了日志级别。 The error was a session duration too short.错误是会话持续时间太短。 On the log, there is a stack exception bug this stack is only shown in debug mode.在日志中,有一个堆栈异常错误,该堆栈仅在调试模式下显示。 maxAuthenticationAge was the right property to modifiy, I made a mistake on duration computation. maxAuthenticationAge 是要修改的正确属性,我在持续时间计算上犯了一个错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM