wso2-extensions / identity-outbound-auth-totp

Apache License 2.0
3 stars 94 forks source link

enable TOTP fails #25

Open Boeckie opened 7 years ago

Boeckie commented 7 years ago

Dear,

After enabling TOTP in the "User Portal - My Profile" I see the following error:

[2017-06-26 18:03:29,128] ERROR {JAGGERY.gadgets.user_profile.controllers.my-profile.totp-init:jag} - org.mozilla.javascript.WrappedException: Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: Exception occurred while trying to invoke service method initTOTP (/portal/gadgets/user_profile/controllers/wsUtil.jag#27) at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)

After re-opening "My Profile", TOTP is not enabled.

Any idea what might be going on?

Similar issue is reported on https://wso2.org/jira/browse/ISCONNECT-60

Thanks, Bart

Shakila commented 7 years ago

Hi Bart,

Could you please try with the latest artifacts [1]? [1] https://store.wso2.com/store/assets/isconnector/details/ceb63613-f7c9-4512-a4f3-f3fe2391de0d

Thanks

fbuchmeier commented 6 years ago

Hi Shakila,

this happens to me as well with the latest version 2.0.9.

identity-server-2_1  | [2018-01-23 16:29:29,982]  INFO {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} -  'admin@carbon.super [-1234]' logged in at [2018-01-23 16:29:29,982+0000]
identity-server-2_1  | [2018-01-23 16:29:43,898] ERROR {JAGGERY.gadgets.user_profile.controllers.my-profile.totp-init:jag} -  org.mozilla.javascript.WrappedException: Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: Exception occurred while trying to invoke service method initTOTP (/portal/gadgets/user_profile/controllers/wsUtil.jag#27)
identity-server-2_1  |  at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
identity-server-2_1  |  at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
identity-server-2_1  |  at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
identity-server-2_1  |  at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
identity-server-2_1  |  at org.jaggeryjs.rhino.portal.gadgets.user_profile.controllers.c0._c_call_1(/portal/gadgets/user_profile/controllers/wsUtil.jag:27)
identity-server-2_1  |  at org.jaggeryjs.rhino.portal.gadgets.user_profile.controllers.c0.call(/portal/gadgets/user_profile/controllers/wsUtil.jag)
identity-server-2_1  |  at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
identity-server-2_1  |  at org.jaggeryjs.rhino.portal.gadgets.user_profile.controllers.c0._c_callWSReturnXML_4(/portal/gadgets/user_profile/controllers/wsUtil.jag:87)
identity-server-2_1  |  at org.jaggeryjs.rhino.portal.gadgets.user_profile.controllers.c0.call(/portal/gadgets/user_profile/controllers/wsUtil.jag)
identity-server-2_1  |  at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
identity-server-2_1  |  at org.jaggeryjs.rhino.portal.gadgets.user_profile.controllers.c0._c_callWSReturnJSON_5(/portal/gadgets/user_profile/controllers/wsUtil.jag:102)
identity-server-2_1  |  at org.jaggeryjs.rhino.portal.gadgets.user_profile.controllers.c0.call(/portal/gadgets/user_profile/controllers/wsUtil.jag)
identity-server-2_1  |  at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
identity-server-2_1  |  at org.jaggeryjs.rhino.portal.gadgets.user_profile.controllers.my_profile.c2._c_init_1(/portal/gadgets/user_profile/controllers/my-profile/totp-init.jag:41)

Can I be of any help to resolve this?

I'm using WSO2 IS 5.4.0, the TOTP 2.0.9 and did not install any user_profile changes from the "other_artifacts" since this is not required in 5.4.0 according to the documentation.

Thanks!

Flo.

fbuchmeier commented 6 years ago

Ok, my problem was related to not enabling the authenticator in the application-authentication.xml correctly.

After enabling it, adding the commons-codec-*.jar into a folder called patch001 instead of directly into repository/components/patches TOTP init now works.