GluuFederation / oxAuth

OAuth 2.0 server and client; OpenID Connect Provider (OP) & UMA Authorization Server (AS)
https://gluu.org/docs/ce
MIT License
424 stars 150 forks source link

Authentication failed on Twilio authn script #1835

Closed MohitMaliFtechiz closed 1 year ago

MohitMaliFtechiz commented 1 year ago

!!!Note Unless you are Gluu staff, please first review and open an issue on https://support.gluu.org before opening an issue here. Thanks!

Describe the issue

Authentication failed on Twilio authn script

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to configuration
  2. Go to person auth script
  3. Select twilio and provide sid token and number
  4. Activate the script
  5. Go to Manage authentication
  6. Select twilio as default authenticatin method
  7. Test the login in conginto window

Expected behavior

User must login via twilio sms code

Actual behavior

User failed to authenticate

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

oxauth.log

2023-05-22 11:10:34,869 INFO [qtp915416632-21] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:244) - TwilioSMS. Prepare for Step 1 2023-05-22 11:10:49,148 INFO [qtp915416632-22] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:244) - ============================================== 2023-05-22 11:10:49,148 INFO [qtp915416632-22] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:244) - ====TWILIO SMS AUTHENCATION=================== 2023-05-22 11:10:49,148 INFO [qtp915416632-22] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:244) - ============================================== 2023-05-22 11:10:49,156 INFO [qtp915416632-22] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:244) - TwilioSMS. form_response_passcode: None 2023-05-22 11:10:49,156 INFO [qtp915416632-22] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:244) - ============================================== 2023-05-22 11:10:49,156 INFO [qtp915416632-22] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:244) - =TWILIO SMS STEP 1 | Password Authentication== 2023-05-22 11:10:49,156 INFO [qtp915416632-22] [org.gluu.service.PythonService$PythonLoggerOutputStream] (PythonService.java:244) - ============================================== 2023-05-22 11:10:49,299 ERROR [qtp915416632-22] [org.gluu.oxauth.service.external.ExternalAuthenticationService] (ExternalAuthenticationService.java:216) - Authenticate com.twilio.exception.ApiException: Authenticate at com.twilio.rest.api.v2010.account.MessageCreator.create(MessageCreator.java:416) ~[twilio-7.17.0.jar:?] at com.twilio.rest.api.v2010.account.MessageCreator.create(MessageCreator.java:25) ~[twilio-7.17.0.jar:?] at com.twilio.base.Creator.create(Creator.java:45) ~[twilio-7.17.0.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:208) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyObject.__call__(PyObject.java:461) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyObject.__call__(PyObject.java:465) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyMethod.__call__(PyMethod.java:126) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.pycode._pyx19.authenticate$9(twilio_sms.py:217) ~[?:?] at org.python.pycode._pyx19.call_function(twilio_sms.py) ~[?:?] at org.python.core.PyTableCode.call(PyTableCode.java:173) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyBaseCode.call(PyBaseCode.java:306) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyBaseCode.call(PyBaseCode.java:197) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyFunction.__call__(PyFunction.java:485) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyMethod.__call__(PyMethod.java:228) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyMethod.__call__(PyMethod.java:218) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyMethod.__call__(PyMethod.java:213) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyObject._jcallexc(PyObject.java:3565) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.core.PyObject._jcall(PyObject.java:3598) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT] at org.python.proxies.__main__$PersonAuthentication$21.authenticate(Unknown Source) ~[?:?] at org.gluu.oxauth.service.external.ExternalAuthenticationService.executeExternalAuthenticate(ExternalAuthenticationService.java:212) ~[classes/:?] at org.gluu.oxauth.service.external.ExternalAuthenticationService$Proxy$_$$_WeldClientProxy.executeExternalAuthenticate(Unknown Source) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.userAuthenticationInteractive(Authenticator.java:323) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.authenticateImpl(Authenticator.java:206) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.authenticate(Authenticator.java:128) ~[classes/:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.apache.el.parser.AstValue.invoke(AstValue.java:246) ~[org.mortbay.jasper.apache-el-9.0.52.jar:9.0.52] at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:266) ~[org.mortbay.jasper.apache-el-9.0.52.jar:9.0.52] at org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40) ~[weld-web-3.1.9.Final.jar:3.1.9.Final] at org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) ~[weld-web-3.1.9.Final.jar:3.1.9.Final] at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:65) ~[jakarta.faces-2.3.18.jar:2.3.18] at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:66) ~[jakarta.faces-2.3.18.jar:2.3.18] at com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:82) ~[jakarta.faces-2.3.18.jar:2.3.18] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:71) ~[jakarta.faces-2.3.18.jar:2.3.18] at javax.faces.component.UICommand.broadcast(UICommand.java:222) ~[jakarta.faces-2.3.18.jar:2.3.18] at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:847) ~[jakarta.faces-2.3.18.jar:2.3.18] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1396) ~[jakarta.faces-2.3.18.jar:2.3.18] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:58) ~[jakarta.faces-2.3.18.jar:2.3.18] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76) ~[jakarta.faces-2.3.18.jar:2.3.18] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177) ~[jakarta.faces-2.3.18.jar:2.3.18] at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707) ~[jakarta.faces-2.3.18.jar:2.3.18] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:451) ~[jakarta.faces-2.3.18.jar:2.3.18] at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1419) ~[?:?] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) ~[?:?] at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665) ~[?:?] at org.gluu.oxauth.audit.debug.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:67) ~[classes/:?] at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210) ~[?:?] at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) ~[?:?] at org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:170) ~[websocket-servlet-10.0.15.jar:10.0.15] at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) ~[?:?] at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) ~[?:?] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527) ~[?:?] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131) ~[?:?] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578) ~[?:?] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) ~[?:?] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223) ~[?:?] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570) ~[?:?] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) ~[?:?] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384) ~[?:?] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) ~[?:?] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484) ~[?:?] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1543) ~[?:?] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) ~[?:?] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306) ~[?:?] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) ~[?:?] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:192) ~[?:?] at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:51) ~[?:?] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) ~[?:?] at org.eclipse.jetty.server.Server.handle(Server.java:563) ~[?:?] at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505) ~[?:?] at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762) ~[?:?] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497) ~[?:?] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282) ~[?:?] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314) ~[?:?] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) ~[?:?] at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) ~[?:?] at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:416) ~[?:?] at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:385) ~[?:?] at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:272) ~[?:?] at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:140) ~[?:?] at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411) ~[?:?] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969) ~[?:?] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194) ~[?:?] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149) ~[?:?] at java.lang.Thread.run(Thread.java:829) ~[?:?]

MohitMaliFtechiz commented 1 year ago

issue is fixed. it was expired credentials issue which was causing twilio to failed. closing this issue