We are developing a hybrid application on Worklight, and we need to implement the app authenticity. We are using Worklight Enterprise edition 6.2.0.1 with IBM app centre. However, We are seeing the following error on the server log when we launch the app on Android (iOs the same too, but will provide Android log).
[1/19/15 15:25:05:388 EST] 00000254 WLNewAuthenti E com.worklight.core.auth.ext.appauth.WLNewAuthenticityScheme isInvalidAndroidParams FWLSE0260E: Missing or empty packageName for android authenticity check, cannot test authenticity. If App Authentication is not set to 'Disabled' or 'Enabled, servicing' in Worklight Console the request will fail. [project MobileApp] [1/19/15 15:25:05:388 EST] 00000254 WLNewAuthenti E com.worklight.core.auth.ext.appauth.WLNewAuthenticityScheme isInvalidAndroidParams FWLSE0260E: Missing or empty publicsigningkey for android authenticity check, cannot test authenticity. If App Authentication is not set to 'Disabled' or 'Enabled, servicing' in Worklight Console the request will fail. [project MobileBanking].
The security test on authenticationConfig.xml is :
<securityTests>
<mobileSecurityTest name="MobileAppTestMobile">
<testAppAuthenticity/>
<testDeviceId provisioningType="auto" />
<testUser realm="MobileAppRealm" />
<testDirectUpdate mode="perSession" />
</mobileSecurityTest>
<webSecurityTest name="MobileAppTest">
<testUser realm="MobileAppRealm" />
</webSecurityTest>
<customSecurityTest name="SubscribeServlet">
<test realm="SubscribeServlet" isInternalUserID="true"/>
</customSecurityTest>
</securityTests>
The application-descriptor.xml:
<iphone bundleId="ca.company.MobileApp" securityTest="MobileAppTestMobile" version="1.0">
<worklightSettings include="false"/>
<security>
<encryptWebResources enabled="true"/>
<testWebResourcesChecksum enabled="true" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
</security>
</iphone>
<android securityTest="MobileAppTestMobile" version="1.0">
<worklightSettings include="false"/>
<security>
<encryptWebResources enabled="true"/>
<testWebResourcesChecksum enabled="true" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
<publicSigningKey>"We have added our public signing key here by extracting it from our keystore file"</publicSigningKey>
</security>
</android>
We have deployed all the app from scratch after updating the WAR file. The worklight console shows the three values for the authenticity "Disable - Enabled, servicing - Enabled , Blocking"
When we put "Enabled, Blocking" or "Enabled , servicing" we are getting the error log on the server that shared at the top of the post. On the app screen we are getting an error " an error was encountered while processing the request from the application".
Please advise. Thank you