2016-05-17 54 views
1

我正在使用IBM MobileFirst studio插件7.0,並按照以下文檔:Link to documentation瞭解如何配置直接更新。我試圖理解這些作品是如何協同工作的,但我無法理解這個概念。IBM MobileFirst直接更新和安全性

使用隨本教程一起提供的代碼示例,我看到「mobileSecurityTest」被註釋掉,並且「customSecurityTest」元素也被註釋掉了。

我注意到的另一件事是,在該應用程序-descriptor.xml中,添加的環境沒有安全測試?

  1. 應用程序如何知道應用程序級應用程序使用哪種securityTest?
  2. 安全測試是否需要放在環境中,特別是直接更新?
  3. 直接更新運行樣品和以下的應用

任何建議表示讚賞當指令沒有得到觸發。

+0

你可以發佈你的應用程序描述符和你的驗證配置嗎? –

回答

2
  1. 指定要在應用程序的應用程序描述符中使用的安全測試。

在我的應用程序描述我有一個iPhone應用程序與customSecurityTest:

<iphone bundleId="com.PhoneUp" version="1.0" securityTest="customSecurityTests"> 
    <worklightSettings include="false"/> 
    <security> 
     <encryptWebResources enabled="false"/> 
     <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/> 
    </security> 
</iphone> 

在我的驗證的配置,我有:

<customSecurityTest name="customSecurityTests"> 
    <test realm="wl_antiXSRFRealm" step="1"/> 
    <test realm="wl_authenticityRealm" step="1"/> 
    <test realm="wl_remoteDisableRealm" step="1"/> 
    <test realm="wl_directUpdateRealm" mode="perSession" step="1"/> 
    <test realm="wl_anonymousUserRealm" isInternalUserID="true" step="1"/> 
    <test realm="wl_deviceNoProvisioningRealm" isInternalDeviceID="true" step="2"/> 
</customSecurityTest> 

現在是保護我的應用程序的安全測試有一個映射到我的authentication-config中的安全測試(服務器上的安全文件)

  1. 沒有安全測試不需要放在應用程序上觸發直接更新。
    只有當用戶試圖「登錄」到該領域時,纔可以觸發直接更新。

    WL.Client.login("wl_directUpdateRealm", {onSuccess:..., onFailure:...}); 
    

    直接更新是一個領域,你可以閱讀更多關於該here

  2. 來自here的示例項目沒有註釋的安全測試或保護應用程序的安全測試。您將不得不取消註釋並在您的應用描述符中添加安全測試,如第一個答案中所述。

+0

謝謝你的幫助非常大。請注意,您提供的這些代碼片段在樣本中沒有反映出來,並且可能非常混亂 – Spindoctor