dianrong/UniAuth

SpringBoot启动一直出现死循环,谁碰到过,该如何解决?

Closed this issue · 3 comments

lkun commented

2017-06-05 17:53:04,482[http-nio-8280-exec-1] WARN org.jasig.cas.client.session.SingleSignOutHandler - Front Channel single sign out redirects are disabled when the 'casServerUrlPrefix' value is not set.
2017-06-05 17:53:04,510[http-nio-8280-exec-3] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:04,511[http-nio-8280-exec-3] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching </spnkclient/login/cas?ticket=ST-2766-3Ge1RZFQToOj4X76moPw-cas01.dianrong.com>, choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1
2017-06-05 17:53:04,525[http-nio-8280-exec-7] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:04,525[http-nio-8280-exec-7] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching </spnkclient/login/cas?ticket=ST-2767-zWIRCnjd2dSszqcx71jc-cas01.dianrong.com>, choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1
2017-06-05 17:53:04,537[http-nio-8280-exec-5] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:04,538[http-nio-8280-exec-5] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching </spnkclient/login/cas?ticket=ST-2768-XfQMfAR497n4shXmLYfy-cas01.dianrong.com>, choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1
2017-06-05 17:53:04,553[http-nio-8280-exec-9] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:04,553[http-nio-8280-exec-9] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching </spnkclient/login/cas?ticket=ST-2769-UW4sd67bKemGqzLPMzvA-cas01.dianrong.com>, choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1
2017-06-05 17:53:04,567[http-nio-8280-exec-10] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:04,568[http-nio-8280-exec-10] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching </spnkclient/login/cas?ticket=ST-2770-WoXlIZnfbEt0OeFhXTwL-cas01.dianrong.com>, choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1
2017-06-05 17:53:04,581[http-nio-8280-exec-6] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:04,581[http-nio-8280-exec-6] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching </spnkclient/login/cas?ticket=ST-2771-vGan9XQWMXygdDmfqwFx-cas01.dianrong.com>, choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1
2017-06-05 17:53:04,592[http-nio-8280-exec-2] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:04,592[http-nio-8280-exec-2] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching </spnkclient/login/cas?ticket=ST-2772-MFbFfOVKVaGpLecIVPsU-cas01.dianrong.com>, choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1
2017-06-05 17:53:04,603[http-nio-8280-exec-8] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:04,603[http-nio-8280-exec-8] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching </spnkclient/login/cas?ticket=ST-2773-GYu3hZEuTRonFff7I5m6-cas01.dianrong.com>, choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1
2017-06-05 17:53:04,612[http-nio-8280-exec-4] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:04,612[http-nio-8280-exec-4] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching </spnkclient/login/cas?ticket=ST-2774-xfVwiCq7uVx5vglRh2bf-cas01.dianrong.com>, choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1
2017-06-05 17:53:04,622[http-nio-8280-exec-1] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:04,622[http-nio-8280-exec-1] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching </spnkclient/login/cas?ticket=ST-2775-6CZUk5SljGU1qbtQ653A-cas01.dianrong.com>, choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1
2017-06-05 17:53:26,890[http-nio-8280-exec-3] WARN c.d.c.u.c.c.SSExpressionSecurityMetadataSource - user not login, when call getAttributes(Object object)
2017-06-05 17:53:26,891[http-nio-8280-exec-3] INFO c.d.common.uniauth.client.support.PatternMatchMost - Found 1 patterns <{org.springframework.security.web.util.matcher.AnyRequestMatcher@1=[authenticated]}> matching , choose org.springframework.security.web.util.matcher.AnyRequestMatcher@1

@lkun spring boot的集成方式跟普通的web系统集成方式是有点区别的。

说明:uniauth提供xml+代码的方式集成,集成需要使用版本1.0.69 及 以上的版本。该集成方式主要是为了处理spring boot系统集成uniauth遇到的问题,当然普通的web系统也能通过该方式进行集成。
集成demo可以查看uniauth中的demo: springboot-ssclient
1 将uniauth的xml配置导入到集成系统的spring的xml配置中。
比如集成系统的xml配置为:

说明:该配置相对于原来的配置方式,主要是将filter的配置以及spring security的配置给删掉了。 2 集成系统引入uniauth的security 的代码配置,集成自uniauth提供的spring security自定义父类UniauthSecurityConfig。 比如springboot-ssclient中的配置如下: @configuration public class WebSecurityConfiguration extends UniauthSecurityConfig { @OverRide public void configure(WebSecurity web) throws Exception { web.ignoring().antMatchers("/js/**", "/favicon.ico"); } } 说明:在覆写父类的 protected void configure(HttpSecurity http) throws Exception;方法进行security的自定义配置时,不要忘记调用super.configure(HttpSecurity http) ; 同时需要在WebSecurityConfiguration上添加@configuration,使其成为一个配置bean。

@lkun 你可以看看springboot-ssclient这个demo

lkun commented

@houfeichj 谢谢你,已经解决了。