【发布时间】:2014-11-13 08:03:12
【问题描述】:
我正在使用 Spring saml 示例和 wso2 身份服务器中 saml 的基本配置来实现 saml 身份验证
到目前为止,当 wso2 服务器响应我的应用程序时,我在登录后收到此错误。
我不知道要注意什么。
org.springframework.security.authentication.AuthenticationServiceException:确定元数据合同时出错 在 org.springframework.security.saml.SAMLProcessingFilter.attemptAuthentication(SAMLProcessingFilter.java:91) 在 org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:211) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 在 org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) 在 org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:166) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 在 org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 在 org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 在 org.springframework.security.saml.metadata.MetadataGeneratorFilter.doFilter(MetadataGeneratorFilter.java:87) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 在 org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) 在 org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) 在 org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) 在 org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) 在 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1636) 在 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:564) 在 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) 在 org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578) 在 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221) 在 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111) 在 org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:498) 在 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) 在 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045) 在 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) 在 org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199) 在 org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) 在 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:98) 在 org.eclipse.jetty.server.Server.handle(Server.java:461) 在 org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:284) 在 org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244) 在 org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534) 在 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) 在 org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) 在 java.lang.Thread.run(Thread.java:744) 原因:org.opensaml.saml2.metadata.provider.MetadataProviderException:找不到发行者的元数据某事 在 org.springframework.security.saml.processor.SAMLProcessorImpl.retrieveMessage(SAMLProcessorImpl.java:108) 在 org.springframework.security.saml.processor.SAMLProcessorImpl.retrieveMessage(SAMLProcessorImpl.java:172) 在 org.springframework.security.saml.SAMLProcessingFilter.attemptAuthentication(SAMLProcessingFilter.java:77) ... 36 更多
【问题讨论】:
-
我面临与上述完全相同的问题。这是 2 岁,但我不想问同样的问题。我正在使用 WSO2 IS 5.2。我研究了源代码,发现错误发生在 SAMLProcessorImpl 类中。具体在这里: if (samlContext.getPeerEntityMetadata() == null) { throw new MetadataProviderException("Metadata for issuer " + samlContext.getInboundMessageIssuer() + " was not found");你找到答案了吗?
标签: java spring wso2 saml wso2is