Skip to content

Duo script failed during login. #817

Closed
@MohitMaliFtechiz

Description

Describe the bug

duo script failed during login.

To Reproduce
Steps to reproduce the behavior:

  1. Go to jans-cli.
  2. Create a test client.
  3. Enable duo script.
  4. Change the Default acr to duo.
  5. Test oidc sso in private browsing mode.

Expected behavior

login should be performed.

Actual behavior*

jans-auth throws error.

Desktop (please complete the following information):

  • OS: Ubuntu20.04
  • Browser: chrome,
  • Version: janssen-server 1.0 Build date: 2022-02-10

Logs

2022-02-10 11:55:39,215 ERROR [Jans AuthScheduler_Worker-3]  [io.jans.service.PythonService] (PythonService.java:186) - Failed to load python file
org.python.core.PyException: ImportError: No module named duo_web
	at org.python.core.Py.ImportError(Py.java:329) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.core.imp.import_first(imp.java:1230) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.core.imp.import_module_level(imp.java:1361) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.core.imp.importName(imp.java:1528) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.core.ImportFunction.__call__(__builtin__.java:1285) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.core.PyObject.__call__(PyObject.java:433) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.core.__builtin__.__import__(__builtin__.java:1232) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.core.imp.importOne(imp.java:1547) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.pycode._pyx10.f$0(duo.py:20) ~[?:?]
	at org.python.pycode._pyx10.call_function(duo.py) ~[?:?]
	at org.python.core.PyTableCode.call(PyTableCode.java:173) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.core.PyCode.call(PyCode.java:18) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.core.Py.runCode(Py.java:1687) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:297) ~[jython-standalone-2.7.3.jar:2.7.3-SNAPSHOT]
	at io.jans.service.PythonService.loadPythonScript(PythonService.java:184) [jans-core-script-1.0.0-SNAPSHOT.jar:?]
	at io.jans.service.PythonService$Proxy$_$$_WeldClientProxy.loadPythonScript(Unknown Source) [jans-core-script-1.0.0-SNAPSHOT.jar:?]
	at io.jans.service.custom.script.CustomScriptManager.createExternalTypeFromStringWithPythonException(CustomScriptManager.java:410) [jans-core-script-1.0.0-SNAPSHOT.jar:?]
	at io.jans.service.custom.script.CustomScriptManager$Proxy$_$$_WeldSubclass.createExternalTypeFromStringWithPythonException(Unknown Source) [jans-core-script-1.0.0-SNAPSHOT.jar:?]
	at io.jans.service.custom.script.CustomScriptManager.createExternalType(CustomScriptManager.java:378) [jans-core-script-1.0.0-SNAPSHOT.jar:?]
	at io.jans.service.custom.script.CustomScriptManager.reloadCustomScriptConfigurations(CustomScriptManager.java:286) [jans-core-script-1.0.0-SNAPSHOT.jar:?]
	at io.jans.service.custom.script.CustomScriptManager.reloadImpl(CustomScriptManager.java:183) [jans-core-script-1.0.0-SNAPSHOT.jar:?]
	at io.jans.service.custom.script.CustomScriptManager.reload(CustomScriptManager.java:153) [jans-core-script-1.0.0-SNAPSHOT.jar:?]
	at io.jans.service.custom.script.CustomScriptManager.reloadTimerEvent(CustomScriptManager.java:129) [jans-core-script-1.0.0-SNAPSHOT.jar:?]
	at io.jans.service.custom.script.CustomScriptManager$Proxy$_$$_WeldSubclass.reloadTimerEvent(Unknown Source) [jans-core-script-1.0.0-SNAPSHOT.jar:?]
	at jdk.internal.reflect.GeneratedMethodAccessor124.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:168) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124) [jakarta.enterprise.cdi-api-2.0.2.jar:?]
	at org.jboss.weld.util.Observers.notify(Observers.java:166) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:177) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:159) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:632) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at org.jboss.weld.util.ForwardingBeanManager.fireEvent(ForwardingBeanManager.java:104) [weld-core-impl-3.1.8.Final.jar:3.1.8.Final]
	at io.jans.service.timer.TimerJob.execute(TimerJob.java:45) [jans-core-timer-weld-1.0.0-SNAPSHOT.jar:?]
	at io.jans.service.timer.JobExecutionDelegate.execute(JobExecutionDelegate.java:37) [jans-core-timer-weld-1.0.0-SNAPSHOT.jar:?]
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.2.jar:?]
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.2.jar:?]
2022-02-10 11:55:39,225 ERROR [Jans AuthScheduler_Worker-3]  [io.jans.service.custom.script.CustomScriptManager] (CustomScriptManager.java:380) - Failed to prepare external type 'io.jans.exception.PythonException: Failed to load python file 'java.io.ByteArrayInputStream@3a428f43'

Metadata

Assignees

Labels

comp-jans-auth-serverComponent affected by issue or PRkind-bugIssue or PR is a bug in existing functionality

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions