Sam Su
Sam Su

Reputation: 6832

An error was encountered while processing the request from the application

We are blocking with a popup alert with error message in the question title

An error was encountered while processing the request from the application.

This error seems to appear since I deploy a new .war file to the MF runtime and then I roll-back everything (in the past two months the app is running very well and never stucks with this error) but it still remains.

What did I try:

1.the app is working fine in preview mode in my local PC;

2.in iPhone I just can change the MF server connectivity url to my local PC and it works fine, too (but with error when it connected with the production environment url);

3.all codes which has a possibility to make this error are roll-back and then I re-deploy the war file but still bad;

4.googled and get this page:http://www-01.ibm.com/support/docview.wss?uid=swg1PM93835 but in my case nothing changed in application-descriptor.xml

5.got the same error message with this guy (Worklight Authenticity, unknown challenge arrived, cannot process realm wl_deviceNoProvisioningRealm challenge) but what he does did not fix my error, too.

Tommat related error log:

Sep 07, 2015 8:17:41 PM com.worklight.core.auth.impl.LoginContext processRequest
SEVERE: FWLSE0059E: Login into realm 'wl_authenticityLoginModule' failed. Missing app authenticity configuration parameters. [project worklight]
com.worklight.gadgets.GadgetRuntimeException: Missing app authenticity configuration parameters
    at com.worklight.core.auth.ext.appauth.AuthenticityAuthenticatorImpl.processRequest(AuthenticityAuthenticatorImpl.java:24)
    at com.worklight.core.auth.ext.AuthenticityAuthenticator.processRequest(AuthenticityAuthenticator.java:79)
    at com.worklight.core.auth.impl.LoginContext.processRequest(LoginContext.java:209)
    at com.worklight.core.auth.impl.AuthenticationContext.checkAuthentication(AuthenticationContext.java:713)
    at com.worklight.core.auth.impl.AuthenticationContext.processRealms(AuthenticationContext.java:613)
    at com.worklight.core.auth.impl.AuthenticationContext.pushCurrentResource(AuthenticationContext.java:586)
    at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:75)
    at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:501)
    at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedure(DataAccessServiceImpl.java:155)
    at com.worklight.gadgets.serving.handler.BackendQueryHandler.getContent(BackendQueryHandler.java:95)
    at com.worklight.gadgets.serving.handler.BackendQueryHandler.doPost(BackendQueryHandler.java:56)
    at com.worklight.gadgets.serving.GadgetAPIServlet.doGetOrPost(GadgetAPIServlet.java:148)
    at com.worklight.gadgets.serving.GadgetAPIServlet.doPost(GadgetAPIServlet.java:108)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.worklight.core.auth.impl.AuthenticationFilter$1.execute(AuthenticationFilter.java:215)
    at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
    at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:220)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:271)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

Sep 07, 2015 8:17:41 PM com.worklight.core.auth.impl.LoginContext processRequest
SEVERE: FWLSE0117E: Error code: 4, error description: AUTHENTICATION_ERROR, error message: An error occurred while performing authentication using loginModule wl_authenticityLoginModule, User Identity {wl_directUpdateRealm=(name:null, loginModule:WLDirectUpdateNullLoginModule), SubscribeServlet=null, SingleStepAuthRealm=(name:1195, loginModule:AuthLoginModule), wl_authenticityRealm=null, wl_remoteDisableRealm=(name:null, loginModule:WLRemoteDisableNullLoginModule), SampleAppRealm=null, wl_antiXSRFRealm=(name:72v8umn1isngnia7hbccnhqs3u, loginModule:WLAntiXSRFLoginModule), wl_deviceAutoProvisioningRealm=null, wl_deviceNoProvisioningRealm=(name:BF8A1B93-0D28-4488-A2FB-226629FDA1C6, loginModule:WLDeviceNoProvisioningLoginModule), myserver=(name:1195, loginModule:AuthLoginModule), wl_anonymousUserRealm=(name:97a5962b-1262-4891-8d4a-43699388f91b, loginModule:WeakDummy)}. [project worklight] [project worklight]
Sep 07, 2015 8:17:41 PM com.worklight.core.auth.impl.LoginContext processRequest
SEVERE: FWLSE0059E: Login into realm 'wl_authenticityLoginModule' failed. Missing app authenticity configuration parameters. [project worklight]
com.worklight.gadgets.GadgetRuntimeException: Missing app authenticity configuration parameters
    at com.worklight.core.auth.ext.appauth.AuthenticityAuthenticatorImpl.processRequest(AuthenticityAuthenticatorImpl.java:24)
    at com.worklight.core.auth.ext.AuthenticityAuthenticator.processRequest(AuthenticityAuthenticator.java:79)
    at com.worklight.core.auth.impl.LoginContext.processRequest(LoginContext.java:209)
    at com.worklight.core.auth.impl.AuthenticationContext.checkAuthentication(AuthenticationContext.java:713)
    at com.worklight.core.auth.impl.AuthenticationContext.processRealms(AuthenticationContext.java:613)
    at com.worklight.core.auth.impl.AuthenticationContext.pushCurrentResource(AuthenticationContext.java:586)
    at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:75)
    at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:501)
    at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedure(DataAccessServiceImpl.java:155)
    at com.worklight.gadgets.serving.handler.BackendQueryHandler.getContent(BackendQueryHandler.java:95)
    at com.worklight.gadgets.serving.handler.BackendQueryHandler.doPost(BackendQueryHandler.java:56)
    at com.worklight.gadgets.serving.GadgetAPIServlet.doGetOrPost(GadgetAPIServlet.java:148)
    at com.worklight.gadgets.serving.GadgetAPIServlet.doPost(GadgetAPIServlet.java:108)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.worklight.core.auth.impl.AuthenticationFilter$1.execute(AuthenticationFilter.java:215)
    at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
    at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:220)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:271)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

Sep 07, 2015 8:17:41 PM com.worklight.core.auth.impl.LoginContext processRequest
SEVERE: FWLSE0117E: Error code: 4, error description: AUTHENTICATION_ERROR, error message: An error occurred while performing authentication using loginModule wl_authenticityLoginModule, User Identity {wl_directUpdateRealm=(name:null, loginModule:WLDirectUpdateNullLoginModule), SubscribeServlet=null, SingleStepAuthRealm=(name:1195, loginModule:AuthLoginModule), wl_authenticityRealm=null, wl_remoteDisableRealm=(name:null, loginModule:WLRemoteDisableNullLoginModule), SampleAppRealm=null, wl_antiXSRFRealm=(name:72v8umn1isngnia7hbccnhqs3u, loginModule:WLAntiXSRFLoginModule), wl_deviceAutoProvisioningRealm=null, wl_deviceNoProvisioningRealm=(name:BF8A1B93-0D28-4488-A2FB-226629FDA1C6, loginModule:WLDeviceNoProvisioningLoginModule), myserver=(name:1195, loginModule:AuthLoginModule), wl_anonymousUserRealm=(name:97a5962b-1262-4891-8d4a-43699388f91b, loginModule:WeakDummy)}. [project worklight] [project worklight]

some parts of The authenticationConfig.xml file (in fact nothing changed in this file since two months ago):

*** ***
    <customSecurityTest name="SingleStepAuthAdapter-securityTest">
        <test realm="wl_antiXSRFRealm" step="1"/>
        <test realm="wl_authenticityRealm" step="1"/>
        <test realm="wl_remoteDisableRealm" step="1"/>
        <test isInternalUserID="true" realm="SingleStepAuthRealm"  step="2"/>
    </customSecurityTest>   

</securityTests> 

<realms>
    <realm loginModule="AuthLoginModule" name="SingleStepAuthRealm">
        <className>com.worklight.integration.auth.AdapterAuthenticator</className>
        <parameter name="login-function" value="LoginHTTPAdapter.onAuthRequired"/>
        <parameter name="logout-function" value="LoginHTTPAdapter.onLogout"/>
    </realm>
    <realm name="SampleAppRealm" loginModule="StrongDummy">
        <className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
    </realm>
*** ***

Upvotes: 1

Views: 3137

Answers (2)

Sam Su
Sam Su

Reputation: 6832

according to the error log, remove wl_authenticityRealm from the authenticationConfig.xml makes it working alright.

Upvotes: 1

Idan Adar
Idan Adar

Reputation: 44516

The error message relates to the Application Authenticity Protection feature.
This failure will occur if the application fails to correctly respond to the authenticity challenge that is sent to it once it attempts to connect to the MobileFirst Server.

You must make sure that you properly configured the server and app by following the instructions provided in the following tutorial: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/authentication-security/application-authenticity-protection/

After you have followed the instructions, the updated .war file must be deployed to the server.

In a development environment this is irrelevant - Application Authenticity Protection is available only in remote servers (QA/UAT/Production, etc...) and not in the development server in Eclipse.

This is your only course of action. You must make sure that you have properly configured it, and then deploy the updated .war, .wlapp to the server and the app to the device.

Upvotes: 0

Related Questions