Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duo script failed during login. #817

Closed
MohitMaliFtechiz opened this issue Feb 14, 2022 · 2 comments
Closed

Duo script failed during login. #817

MohitMaliFtechiz opened this issue Feb 14, 2022 · 2 comments
Assignees
Labels
comp-jans-auth-server Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality
Milestone

Comments

@MohitMaliFtechiz
Copy link

MohitMaliFtechiz commented Feb 14, 2022

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'
@MohitMaliFtechiz MohitMaliFtechiz added kind-bug Issue or PR is a bug in existing functionality comp-jans-auth-server Component affected by issue or PR labels Feb 14, 2022
@MohitMaliFtechiz MohitMaliFtechiz added this to the 1.0.0 milestone Feb 15, 2022
@MohitMaliFtechiz
Copy link
Author

duo.zip Full logs attached here.

@moabu moabu assigned maduvena and unassigned moabu Feb 24, 2022
@moabu moabu modified the milestones: 1.0.0, 1.0.1 Jun 15, 2022
@moabu moabu modified the milestones: 1.0.1, 1.0.2 Jul 8, 2022
@ossdhaval
Copy link
Contributor

Hi @MohitMaliFtechiz
I had faced this issue and after a discussion with @devrimyatar, these steps have been documented as a fix.

@devrimyatar
As mentioned on the chat, can't we make this lib as part of install so that we don't need these additional steps?

@moabu moabu modified the milestones: 1.0.2, 1.0.3 Aug 30, 2022
maduvena added a commit that referenced this issue Sep 12, 2022
…Is are deprecated + documentation minor fixes
maduvena added a commit that referenced this issue Sep 12, 2022
@maduvena maduvena mentioned this issue Sep 12, 2022
mo-auto pushed a commit that referenced this issue Sep 12, 2022
maduvena added a commit that referenced this issue Sep 12, 2022
moabu pushed a commit that referenced this issue Sep 12, 2022
maduvena added a commit that referenced this issue Sep 13, 2022
mo-auto pushed a commit that referenced this issue Sep 13, 2022
maduvena added a commit that referenced this issue Sep 26, 2022
mo-auto pushed a commit that referenced this issue Sep 26, 2022
maduvena added a commit that referenced this issue Sep 26, 2022
@maduvena maduvena mentioned this issue Sep 26, 2022
mo-auto pushed a commit that referenced this issue Sep 26, 2022
maduvena added a commit that referenced this issue Sep 28, 2022
yuriyz pushed a commit that referenced this issue Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-auth-server Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants