By: Jay Kumar user 27 Jan 2018 at 1:59 a.m. CST

2 Responses
Jay Kumar gravatar
Hi Gluu Team, We have established the trust relation between our moodle application as SP and Gluu as IDP successfully. We have generated metadata for onboarding JumpCloud IdP on Gluu setup to integrated this in our application service provider. After that when we have reestablished the trust relation between our moodle application as SP and Gluu as IDP but we got error Failed to authenticate. Kindly suggest us what could be the reason for the flowing error log. 2018-01-27 07:38:58,256 ERROR [qtp212628335-12] [org.xdi.oxauth.service.external.ExternalAuthenticationService] (ExternalAuthenticationService.java:218) - Illegal base64url string. java.lang.IllegalArgumentException: Illegal base64url string. at org.xdi.oxauth.model.util.Base64Util.removePadding(Base64Util.java:50) ~[oxauth-model-3.1.2.Final.jar:?] at org.xdi.oxauth.model.util.Base64Util.base64urldecode(Base64Util.java:31) ~[oxauth-model-3.1.2.Final.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112] at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186) ~[jython-2.7.0.jar:?] at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204) ~[jython-2.7.0.jar:?] at org.python.core.PyObject.__call__(PyObject.java:461) ~[jython-2.7.0.jar:?] at org.python.core.PyObject.__call__(PyObject.java:465) ~[jython-2.7.0.jar:?] at org.python.pycode._pyx6.prepareForStep$10(<iostream>:252) ~[?:?] at org.python.pycode._pyx6.call_function(<iostream>) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[jython-2.7.0.jar:?] at org.python.core.PyBaseCode.call(PyBaseCode.java:307) ~[jython-2.7.0.jar:?] at org.python.core.PyBaseCode.call(PyBaseCode.java:198) ~[jython-2.7.0.jar:?] at org.python.core.PyFunction.__call__(PyFunction.java:482) ~[jython-2.7.0.jar:?] at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237) ~[jython-2.7.0.jar:?] at org.python.core.PyMethod.__call__(PyMethod.java:228) ~[jython-2.7.0.jar:?] at org.python.core.PyMethod.__call__(PyMethod.java:218) ~[jython-2.7.0.jar:?] at org.python.core.PyMethod.__call__(PyMethod.java:213) ~[jython-2.7.0.jar:?] at org.python.core.PyObject._jcallexc(PyObject.java:3626) ~[jython-2.7.0.jar:?] at org.python.core.PyObject._jcall(PyObject.java:3658) ~[jython-2.7.0.jar:?] at org.python.proxies.__builtin__$PersonAuthentication$6.prepareForStep(Unknown Source) ~[?:?] at org.xdi.oxauth.service.external.ExternalAuthenticationService.executeExternalPrepareForStep(ExternalAuthenticationService.java:216) [classes/:?] at org.xdi.oxauth.service.external.ExternalAuthenticationService$Proxy$_$$_WeldClientProxy.executeExternalPrepareForStep(Unknown Source) [classes/:?] at org.xdi.oxauth.auth.Authenticator.prepareAuthenticationForStepImpl(Authenticator.java:607) [classes/:?] at org.xdi.oxauth.auth.Authenticator.prepareAuthenticationForStep(Authenticator.java:499) [classes/:?] at sun.reflect.GeneratedMethodAccessor280.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112] at org.apache.el.parser.AstValue.invoke(AstValue.java:247) [org.mortbay.jasper.apache-el-8.0.33.jar:8.0.33] at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267) [org.mortbay.jasper.apache-el-8.0.33.jar:8.0.33] at org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40) [weld-web-3.0.0.Final.jar:3.0.0.Final] at org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) [weld-web-3.0.0.Final.jar:3.0.0.Final] at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.2.14.jar:2.2.14] at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87) [jsf-api-2.2.14.jar:2.2] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.2.14.jar:2.2.14] at javax.faces.component.UIViewAction.broadcast(UIViewAction.java:562) [jsf-api-2.2.14.jar:2.2] at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790) [jsf-api-2.2.14.jar:2.2] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282) [jsf-api-2.2.14.jar:2.2] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.2.14.jar:2.2.14] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.2.14.jar:2.2.14] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) [jsf-impl-2.2.14.jar:2.2.14] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658) [jsf-api-2.2.14.jar:2.2] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1772) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226) [rewrite-servlet-3.4.1.Final.jar:3.4.1.Final] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) [jetty-security-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:199) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:74) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.ocpsoft.rewrite.servlet.impl.HttpRewriteResultHandler.handleResult(HttpRewriteResultHandler.java:42) [rewrite-servlet-3.4.1.Final.jar:3.4.1.Final] at org.ocpsoft.rewrite.servlet.RewriteFilter.rewrite(RewriteFilter.java:297) [rewrite-servlet-3.4.1.Final.jar:3.4.1.Final] at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:198) [rewrite-servlet-3.4.1.Final.jar:3.4.1.Final] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.xdi.oxauth.audit.debug.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:55) [classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [jetty-security-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.Server.handle(Server.java:534) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [jetty-io-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) [jetty-io-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [jetty-io-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [jetty-util-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [jetty-util-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [jetty-util-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [jetty-util-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [jetty-util-9.3.15.v20161220.jar:9.3.15.v20161220] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112] 2018-01-27 07:39:08,162 INFO [qtp212628335-12] [org.xdi.service.PythonService$PythonLoggerOutputStream] (PythonService.java:209) - Passport-saml: Prepare for Step 1 method call 2018-01-27 07:39:08,162 INFO [qtp212628335-12] [org.xdi.service.PythonService$PythonLoggerOutputStream] (PythonService.java:209) - Passport-saml: session {auth_step: 1, acr: passport_saml, remote_ip: 182.156.245.130, 172.23.65.80, scope: openid profile email user_name, acr_values: passport_saml, response_type: code id_token, redirect_uri: https://dev-sso.taoconnect.org/identity/authentication/authcode, nonce: 21069f5e-77c4-485b-9148-2cfdf8b4f7e3, client_id: @!4A98.6F1A.7766.A7DF!0001!78A3.454F!0008!674F.BE95} 2018-01-27 07:39:08,163 INFO [qtp212628335-12] [org.xdi.service.PythonService$PythonLoggerOutputStream] (PythonService.java:209) - Passport-saml: old state is none 2018-01-27 07:39:09,783 INFO [qtp212628335-17] [org.xdi.service.PythonService$PythonLoggerOutputStream] (PythonService.java:209) - Passport-saml: Basic Authentication

By William Lowe user 27 Jan 2018 at 7:52 a.m. CST

William Lowe gravatar
Jay, You should use the moodle openid connect plugin. We just set it up ourselves. Seems to be working fine. My colleague Ganesh might be able to add a few tips about getting it configured properly. When possible, always use openid connect > saml.

By William Lowe user 29 Jan 2018 at 4:10 p.m. CST

William Lowe gravatar
Jay, - [OIDC Moodle SSO docs](https://gluu.org/docs/ce/integration/saas/moodle/) - In case you want to continue using SAML, I found this [SAML Moodle SSO tutorial](https://medium.com/nothing-but-the-objectivetruth/sso-with-gluu-and-moodle-using-saml2-0-b25ad50780a9). Thanks, Will