WSO2 EMM error in retrieving access token by password grant type

356 views Asked by At

today I am punished with problems in WSO2 EMM. First I have downgrade my Windows Phone to Windows 8.1.

I am in the enrolment step two. (https://docs.wso2.com/display/EMM220/Registering+a+Windows+Device+Using+the+QR+Code?preview=/53124696/53286463/4-BYOD-Register.png)

I entered the user [email protected] and the password. Then I was redirected to the Page before (with manually enter the discovery server address -> https://docs.wso2.com/display/EMM220/Registering+a+Windows+Device+Using+the+QR+Code?preview=/53124696/53286462/Windows_auto_discovery_fails.png)

The Stdout logs tell me:

2016-12-23T09:30:27.102858360Z [2016-12-23 09:30:27,097]  WARN {org.owasp.csrfguard.log.JavaLogger} -  potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:193.200.138.72, method:POST, uri:/EnrollmentServer/Discovery.svc, error:required token is missing from the request)
2016-12-23T09:31:04.550916506Z [2016-12-23 09:31:04,550] ERROR {/app/modules/oauth/token-handler-utils.js} -  {/app/modules/oauth/token-handler-utils.js} Error in retrieving access token by password grant type - getTokenPairAndScopesByPasswordGrantType(a, b, c, d)
2016-12-23T09:31:04.569858262Z [2016-12-23 09:31:04,552] ERROR {org.jaggeryjs.jaggery.core.manager.WebAppManager} -  org.mozilla.javascript.JavaScriptException: Error: {/app/modules/oauth/token-handlers.js} Could not set up token pair by password grant type. Error in token retrieval - setupTokenPairByPasswordGrantType(x, y) (/emm-web-agent/app/modules/oauth/token-handlers.js#59)
2016-12-23T09:31:04.569924438Z org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.JavaScriptException: Error: {/app/modules/oauth/token-handlers.js} Could not set up token pair by password grant type. Error in token retrieval - setupTokenPairByPasswordGrantType(x, y) (/emm-web-agent/app/modules/oauth/token-handlers.js#59)
2016-12-23T09:31:04.569939090Z  at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571)
2016-12-23T09:31:04.569950294Z  at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
2016-12-23T09:31:04.569960418Z  at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:588)
2016-12-23T09:31:04.569970546Z  at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508)
2016-12-23T09:31:04.569980120Z  at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
2016-12-23T09:31:04.569989714Z  at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
2016-12-23T09:31:04.569999170Z  at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
2016-12-23T09:31:04.570008962Z  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
2016-12-23T09:31:04.570018588Z  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
2016-12-23T09:31:04.570028072Z  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)
2016-12-23T09:31:04.570037658Z  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
2016-12-23T09:31:04.570050954Z  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:377)
2016-12-23T09:31:04.570101376Z  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
2016-12-23T09:31:04.570123074Z  at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
2016-12-23T09:31:04.570141798Z  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
2016-12-23T09:31:04.570160646Z  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
2016-12-23T09:31:04.570179138Z  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
2016-12-23T09:31:04.570195772Z  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
2016-12-23T09:31:04.570214620Z  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
2016-12-23T09:31:04.570234380Z  at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
2016-12-23T09:31:04.570265180Z  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
2016-12-23T09:31:04.570290090Z  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
2016-12-23T09:31:04.570331922Z  at org.wso2.carbon.ui.filters.cache.URLBasedCachePreventionFilter.doFilter(URLBasedCachePreventionFilter.java:57)
2016-12-23T09:31:04.570352596Z  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
2016-12-23T09:31:04.570372684Z  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
2016-12-23T09:31:04.570387446Z  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
2016-12-23T09:31:04.570396782Z  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
2016-12-23T09:31:04.570504794Z  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
2016-12-23T09:31:04.570517796Z  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
2016-12-23T09:31:04.570541300Z  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
2016-12-23T09:31:04.570558280Z  at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:59)
2016-12-23T09:31:04.570572840Z  at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
2016-12-23T09:31:04.570587714Z  at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
2016-12-23T09:31:04.570602664Z  at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
2016-12-23T09:31:04.570617204Z  at org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve.invoke(WebappAuthenticationValve.java:45)
2016-12-23T09:31:04.570632290Z  at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
2016-12-23T09:31:04.570664667Z  at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
2016-12-23T09:31:04.570687064Z  at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
2016-12-23T09:31:04.570703167Z  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
2016-12-23T09:31:04.570718014Z  at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
2016-12-23T09:31:04.570732954Z  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
2016-12-23T09:31:04.570747690Z  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
2016-12-23T09:31:04.570762287Z  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082)
2016-12-23T09:31:04.570782654Z  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623)
2016-12-23T09:31:04.570819422Z  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1756)
2016-12-23T09:31:04.570837834Z  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1715)
2016-12-23T09:31:04.570863232Z  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2016-12-23T09:31:04.570878402Z  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2016-12-23T09:31:04.570887432Z  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
2016-12-23T09:31:04.570897226Z  at java.lang.Thread.run(Thread.java:745)
2016-12-23T09:31:04.570908304Z Caused by: org.mozilla.javascript.JavaScriptException: Error: {/app/modules/oauth/token-handlers.js} Could not set up token pair by password grant type. Error in token retrieval - setupTokenPairByPasswordGrantType(x, y) (/emm-web-agent/app/modules/oauth/token-handlers.js#59)
2016-12-23T09:31:04.570919702Z  at org.jaggeryjs.rhino.emm_web_agent.app.modules.oauth.c1._c_anonymous_2(/emm-web-agent/app/modules/oauth/token-handlers.js:59)
2016-12-23T09:31:04.570952927Z  at org.jaggeryjs.rhino.emm_web_agent.app.modules.oauth.c1.call(/emm-web-agent/app/modules/oauth/token-handlers.js)
2016-12-23T09:31:04.570982854Z  at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
2016-12-23T09:31:04.571014082Z  at org.jaggeryjs.rhino.emm_web_agent.app.modules.enrollments.windows.c0._c_script_0(/emm-web-agent/app/modules/enrollments/windows/agent-controller.jag:52)
2016-12-23T09:31:04.571031634Z  at org.jaggeryjs.rhino.emm_web_agent.app.modules.enrollments.windows.c0.call(/emm-web-agent/app/modules/enrollments/windows/agent-controller.jag)
2016-12-23T09:31:04.571050160Z  at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
2016-12-23T09:31:04.571066660Z  at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
2016-12-23T09:31:04.571077604Z  at org.jaggeryjs.rhino.emm_web_agent.app.modules.enrollments.windows.c0.call(/emm-web-agent/app/modules/enrollments/windows/agent-controller.jag)
2016-12-23T09:31:04.571128797Z  at org.jaggeryjs.rhino.emm_web_agent.app.modules.enrollments.windows.c0.exec(/emm-web-agent/app/modules/enrollments/windows/agent-controller.jag)
2016-12-23T09:31:04.571146017Z  at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
2016-12-23T09:31:04.571161567Z  ... 49 more

What I do wrong?

WSO2MDM_VERSION 2.2.0, FROM ubuntu:16.04 (Docker)

Any idea?

Regards!

0

There are 0 answers