没有身份提供商登录页面的SSO

时间:2015-04-06 06:22:44

标签: authentication wso2 single-sign-on saml-2.0 wso2is

我在演示应用程序中使用WSO2 Identity Server进行 SSO with saml

我的要求是用户应向服务提供商登录页面提供登录凭据,而不是提供给身份提供商页面。

为了同样的目的,我跟随了Asela的博客。

[http://xacmlinfo.org/2015/02/12/sso-without-identity-provider-login-page/][1]

此实现适用于验证主用户存储中的用户。

我在我的辅助只读LDAP用户存储上试了一下。它会给出错误而不会对用户进行身份验证。

以下是来自控制台的错误堆栈:

  

[2015-04-06 11:49:46,754]错误   {} org.wso2.carbon.identity.application.authenticator.requestpath.basicauth.BasicAuthRequestPathAuthenticator    - 用户tjayswal的身份验证失败[2015-04-06 11:49:46,755]错误   {} org.wso2.carbon.identity.application.authenticator.requestpath.basicauth.BasicAuthRequestPathAuthenticator    - 身份验证失败org.wso2.carbon.identity.application.authentication.framework.exception.AuthenticationFailedException:   身份验证失败   org.wso2.carbon.identity.application.authenticator.requestpath.basicauth.BasicAuthRequestPathAuthenticator.processAuthenticationResponse(BasicAuthRequestPathAuthenticator.java:94)     在   org.wso2.carbon.identity.application.authentication.framework.AbstractApplicationAuthenticator.process(AbstractApplicationAuthenticator.java:61)     在   org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultRequestPathBasedSequenceHandler.handle(DefaultRequestPathBasedSequenceHandler.java:72)     在   org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultAuthenticationRequestHandler.handle(DefaultAuthenticationRequestHandler.java:114)     在   org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator.handle(DefaultRequestCoordinator.java:94)     在   org.wso2.carbon.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doPost(CommonAuthenticationServlet.java:54)     在   org.wso2.carbon.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doGet(CommonAuthenticationServlet.java:44)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:735)at   javax.servlet.http.HttpServlet.service(HttpServlet.java:848)at at   org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)     在   org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)     在   org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)     在   org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:848)at   org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)     在   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)     在   org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)     在   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)     在   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)     在   org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)     在   org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve $ 1.invoke(CarbonTomcatValve.java:47)     在   org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)     在   org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)     在   org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)     在   org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)     在   org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)     在   org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)     在   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)     在   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)     在   org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)     在   org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:589)     在   org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1653)     在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:615)     在java.lang.Thread.run(Thread.java:745)[2015-04-06 11:49:46,756]   错误   {} org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultRequestPathBasedSequenceHandler    - 身份验证失败org.wso2.carbon.identity.application.authentication.framework.exception.AuthenticationFailedException:   身份验证失败   org.wso2.carbon.identity.application.authenticator.requestpath.basicauth.BasicAuthRequestPathAuthenticator.processAuthenticationResponse(BasicAuthRequestPathAuthenticator.java:115)     在   org.wso2.carbon.identity.application.authentication.framework.AbstractApplicationAuthenticator.process(AbstractApplicationAuthenticator.java:61)     在   org.wso2.carbon.identity.application.authentication.framework.handler.sequence.impl.DefaultRequestPathBasedSequenceHandler.handle(DefaultRequestPathBasedSequenceHandler.java:72)     在   org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultAuthenticationRequestHandler.handle(DefaultAuthenticationRequestHandler.java:114)     在   org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.DefaultRequestCoordinator.handle(DefaultRequestCoordinator.java:94)     在   org.wso2.carbon.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doPost(CommonAuthenticationServlet.java:54)     在   org.wso2.carbon.identity.application.authentication.framework.servlet.CommonAuthenticationServlet.doGet(CommonAuthenticationServlet.java:44)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:735)at   javax.servlet.http.HttpServlet.service(HttpServlet.java:848)at at   org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)     在   org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)     在   org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)     在   org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:848)at   org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)     在   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)     在   org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)     在   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)     在   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)     在   org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)     在   org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve $ 1.invoke(CarbonTomcatValve.java:47)     在   org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)     在   org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)     在   org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)     在   org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)     在   org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)     在   org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)     在   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)     在   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)     在   org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)     在   org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:589)     在   org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1653)     在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:615)     在java.lang.Thread.run(Thread.java:745)

重要

我正在使用WSO2 Identity Server 5.0最新补丁更新版本。

请有人指导我。

提前致谢。

1 个答案:

答案 0 :(得分:2)

在我的POC期间,我也面临同样的问题。我认为这个问题在使用IS的LDAP配置中产生了错误。

检查在

下创建的辅助用户存储xml文件
  

IS_HOME /库/部署/服务器/ userstores /'userstorename'.xml

并根据标准做法检查所有配置是否合适。

这帮助我解决了我的问题,因为我错过了一个;(分号) 在

  

userNameSearchFilter

属性。