尝试使用SAML SSO配置WSO2AM Store和Publisher

时间:2017-01-30 20:52:04

标签: wso2 wso2-am

我使用this文档在远程IdP解决方案中使用SAML配置SSO但是当我尝试访问存储或发布主页时,我在导航器上收到HTTP 500错误并出现以下错误在服务器日志上:

[2017-01-30 18:22:08,980] ERROR - WebAppManager org.mozilla.javascript.WrappedException: Wrapped java.lang.IndexOutOfBoundsException: Index: 0 (/store/jagg/jaggery_acs.jag#42)
org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.WrappedException: Wrapped java.lang.IndexOutOfBoundsException: Index: 0 (/store/jagg/jaggery_acs.jag#42)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:588)
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508)
    at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:377)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
    at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
    at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
    at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
    at org.wso2.carbon.event.receiver.core.internal.tenantmgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:48)
    at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1749)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1708)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.mozilla.javascript.WrappedException: Wrapped java.lang.IndexOutOfBoundsException: Index: 0 (/store/jagg/jaggery_acs.jag#42)
    at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
    at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
    at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
    at org.jaggeryjs.rhino.store.jagg.c1._c_anonymous_1(/store/jagg/jaggery_acs.jag:42)
    at org.jaggeryjs.rhino.store.jagg.c1.call(/store/jagg/jaggery_acs.jag)
    at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
    at org.jaggeryjs.rhino.store.jagg.c1._c_script_0(/store/jagg/jaggery_acs.jag:5)
    at org.jaggeryjs.rhino.store.jagg.c1.call(/store/jagg/jaggery_acs.jag)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
    at org.jaggeryjs.rhino.store.jagg.c1.call(/store/jagg/jaggery_acs.jag)
    at org.jaggeryjs.rhino.store.jagg.c1.exec(/store/jagg/jaggery_acs.jag)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
    ... 42 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 0
    at java.util.Collections$EmptyList.get(Collections.java:4454)
    at org.opensaml.xml.util.LazyList.get(LazyList.java:90)
    at org.opensaml.xml.util.ListView.get(IndexedXMLObjectChildrenList.java:312)
    at org.opensaml.xml.util.ListView.get(IndexedXMLObjectChildrenList.java:238)
    at org.wso2.carbon.hostobjects.sso.SAMLSSORelyingPartyObject.jsFunction_validateSAMLResponseSchema(SAMLSSORelyingPartyObject.java:574)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
    ... 54 more

以下是我正在使用的site.json配置示例:

"ssoConfiguration" : {
    "enabled" : "true",
    "issuer" : "wso2am-sp",
    "identityProviderURL" : "https://sps-hom.sample.com/affwebservices/public/saml2sso",
    "keyStorePassword" : "wso2carbon",
    "identityAlias" : "sps",
    "responseSigningEnabled":"true",
    "assertionSigningEnabled":"true",
    "keyStoreName" :"/opt/wso2am-2.0.0/repository/resources/security/wso2carbon.jks",
    "passive" : "true",
    "idpInit" : "true",
    "idpInitSSOURL" : "https://sps-hom.sample.com/affwebservices/public/saml2sso?SPID=wso2am-sp",
    "externalLogoutPage" : "https://sps-hom.sample.com/affwebservices/public/saml2sso?slo=true",
    "signRequests" : "true",
},

我可以看到第一跳中从SP到IdP的SAMLRequest,然后我可以看到从IdP到SP的SAMLResponse,但我不知道导致问题的原因以及如何解决它。

有人可以帮我理解发生了什么吗?

感谢。

0 个答案:

没有答案