android - "Authenticity check failed" error on server -
i migrate 5.0.0.3 worklight application deployed on 5.0.0.3 worklight server worklight studio 5.0.6 , deployment done on ipas.
deployment successful on ipas , try execute android application tablet.
i have issues authentication:
in application descriptor, protected android application in application-descriptor.xml securitytest.
i defined realms, securitytest , loginmodules in authenticationconfig.xml. use formbasedauthenticator , nonvalidatingloginmodule.
all work challengehandler except when challengehandler.submitsuccess(). here, on server console have following error:
com.worklight.core.auth.ext.authenticityloginmodule login fwlse0127e: authenticity check failed.
securitytest use is: customercentricclientapp-strong-mobile-securitytest. here authenticationconfig.xml file:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<securitytests> <websecuritytest name="customercentricclientapp-web-securitytest"> <testuser realm="pushclientapprealm"/> </websecuritytest> <mobilesecuritytest name="customercentricclientapp-strong-mobile-securitytest"> <testappauthenticity/> <testuser realm="pushclientapprealm"/> <testdeviceid provisioningtype="none"/> </mobilesecuritytest> </securitytests> <realms> <realm loginmodule="pushappclientloginmodule" name="pushclientapprealm"> <classname>com.worklight.core.auth.ext.formbasedauthenticator</classname> </realm> <realm loginmodule="requirelogin" name="worklightconsole"> <classname>com.worklight.core.auth.ext.formbasedauthenticator</classname> <onloginurl>/console</onloginurl> </realm> </realms> <loginmodules> <loginmodule name="pushappclientloginmodule"> <classname>com.worklight.core.auth.ext.nonvalidatingloginmodule</classname> </loginmodule> <loginmodule name="requirelogin"> <classname>com.worklight.core.auth.ext.singleidentityloginmodule</classname> </loginmodule> </loginmodules>
here extract of application-descriptor:
<android securitytest="customercentricclientapp-strong-mobile-securitytest" version="1.0"> <worklightsettings include="true"/> <pushsender key="xxx" senderid="xx"/> <security> <encryptwebresources enabled="false"/> <testwebresourceschecksum enabled="false" ignorefileextensions="png, jpg, jpeg, gif, mp4, mp3"/> <publicsigningkey>migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqcsw8rocroak0pely5dpyn0wkg2cava7ub8ksfdjbwofowia7aad1hlcjjpcrznffq8nqeq7jjahpuovmkxvvcrfj7shj3jzp0yavh0lte8dsq0masxwfyehmje9l/kiy5kwm6sdk+4oxcdj2j2u+mbivr9+msdtaqiofpp+pbteqidaqab</publicsigningkey> </security> </android>
make sure <testappauthenticity/>
part of custom securitytest.
in addition adding authenticity test above, need also:
- specify public signing key in application-descriptor.xml (add using "extract public signing key" in android environment's context menu)
- sign , export .apk (i assume we're talking android here) using same keystore used generating public signing key above
note relevant in consumer or enterprise editions of worklight, authenticity feature exist. if not case, suggest removing securitytest.
Comments
Post a Comment