我试图关注the tutorial at this url,教程非常直接,但我无法得到正确的结果。
下面的是我的authenticationConfig.xml
<securityTests>
<customSecurityTest name="custom-mobilesecurityTest">
<test realm="wl_antiXSRFRealm" step="1"/>
<test realm="wl_authenticityRealm" step="2"/>
<test realm="HeaderAuthRealm" isInternalUserID="true" step="3"/>
</customSecurityTest>
</securityTests>
但是控制台中出现的App Authentication始终是“Access Disabled”,我无法启用它。我在这里错过了什么吗?
答案 0 :(得分:5)
如果你提到你实际做了什么会更有帮助,因为配置authenticationConfig.xml
只是几个步骤中的一步。
另请注意,对于真正工作的App真实性而不使用虚拟实现,您必须使用 IBM Worklight的Consumer版本(即,成为付费客户并安装正确版本的Worklight Studio和Worklight Server。)
我相信对于你的问题,你还没有完成下面的第2步。
启用应用验证真品的步骤:
配置具有wl_authenticityRealm
领域的安全测试:
<customSecurityTest name="customTests"> <test realm="wl_antiXSRFRealm" step="1"/> <test realm="wl_authenticityRealm" step="1"/> <test realm="wl_remoteDisableRealm" step="1"/> <test realm="wl_anonymousUserRealm" isInternalUserID="true" step="1"/> <test realm="wl_deviceNoProvisioningRealm" isInternalDeviceID="true" step="2"/> </customSecurityTest>
^幻灯片9
将此securityTest
放在application-descriptor.xml
中的环境中,例如:
<android version="1.0" securityTest="customTests">
对于Android,请生成公共签名密钥:
<android version="1.0" securityTest="customTests"> <worklightSettings include="true"/> <security> <encryptWebResources enabled="false"/> <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/> <publicSigningKey>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBdfdsfdsfiQKBgQCPCbaCfAfnAqQ12/S5LLfA4cBz/3INyLRPhFGSVFztdWNzPhrna1xDc8/3V1sUIW2odfdfddfdfffdR2n3dAnNMVydfdfdfv68gmU5qVCN4LxSKKRAj7VVbhBxBIEt5MbY+c0o7NZ2Pgu/moJee8Wgu8veZ1TJntYn+cWCYuI/JSnA9nsskwhSdPHK32edsfsdfdfQIDAQAB</publicSigningKey> </security> </android>
^幻灯片10-13
对于iOS,请放置应用bundleId
:
<iphone bundleId="com.worklight.test" version="1.0" securityTest="customTests">
^幻灯片10-13
现在,应在Worklight Console中为您启用App Authenticity下拉列表。