authenticationConfig.xml 中未找到 IBM Mobile First 平台 v7.1 自定义安全测试

IBM Mobile First platform v7.1 custom security test is not found in authenticationConfig.xml

我一直在尝试按照本网站上的教程进行操作: Tutorials

我 运行 在尝试为适配器程序设置一个简单的基于表单的身份验证时遇到了麻烦。 当我尝试推动我的适配器时:

MacBook-Pro-Savid:AuthAdapter bruser$ mfp push
Preparing for push...
Verifying Server Configuration...
Runtime 'HelloWorldPrject' will be used to push the project into.
Pushing to Server...
Deploying 
/Users/bruser/javad_test_folder/HelloWorldPrject/bin/AuthAdapter.adapter... 
Error: Failed to deploy 
/Users/bruser/javad_test_folder/HelloWorldPrject/bin/AuthAdapter.adapter. 
Reason: failed to push adapter: Required security test 'AuthSecurity' for 
resource proc:AuthAdapter.getSecretData' wasn't found in 
authenticationConfig.xml: HTTP 200 - OK.
adapter found here: 
/Users/bruser/javad_test_folder/HelloWorldPrject/bin/AuthAdapter.adapter has 
been build but deployment failed.
Error: Push has failed here

我的/server/conf/authenticationConfig.xml:

    <!-- Licensed Materials - Property of IBM
         5725-I43 (C) Copyright IBM Corp. 2006, 2013. All Rights Reserved.
         US Government Users Restricted Rights - Use, duplication or
         disclosure restricted by GSA ADP Schedule Contract with IBM Corp. -->

 <staticResources>
 <!--
        <resource id="logUploadServlet" securityTest="LogUploadServlet">
        <urlPatterns>/apps/services/loguploader*</urlPatterns>
    </resource>
    -->
    <resource id="subscribeServlet" securityTest="SubscribeServlet">
        <urlPatterns>/subscribeSMS*;/receiveSMS*;/ussd*</urlPatterns>
    </resource>

</staticResources>

 <securityTests>

     <customSecurityTest name="AuthSecurity">
         <test realm="SampleAppRealm" isInternalUserID="true"/>
     </customSecurityTest>
    <!--
    <mobileSecurityTest name="mobileTests">
        <testAppAuthenticity/>
        <testDeviceId provisioningType="none" />
        <testUser realm="myMobileLoginForm" />
        <testDirectUpdate mode="perSession" />
    </mobileSecurityTest>

    <webSecurityTest name="webTests">
        <testUser realm="myWebLoginForm"/>
    </webSecurityTest>

    <customSecurityTest name="customTests">
        <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>

    <customSecurityTest name="LogUploadServlet">
        <test realm="wl_anonymousUserRealm" step="1"/>
        <test realm="LogUploadServlet" isInternalUserID="true"/>
    </customSecurityTest>
    -->
</securityTests>

<realms>
    <realm name="SampleAppRealm" loginModule="StrongDummy">
        <className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
    </realm>

    <realm name="SubscribeServlet" loginModule="rejectAll">
        <className>com.worklight.core.auth.ext.HeaderAuthenticator</className>
    </realm>

    <!-- For client logger -->
    <!-- <realm name="LogUploadServlet" loginModule="StrongDummy">
        <className>com.worklight.core.auth.ext.HeaderAuthenticator</className>
    </realm -->

    <!-- For websphere -->
    <!-- realm name="WASLTPARealm" loginModule="WASLTPAModule">
        <className>com.worklight.core.auth.ext.WebSphereFormBasedAuthenticator</className>
        <parameter name="login-page" value="/login.html"/>
        <parameter name="error-page" value="/loginError.html"/>
    </realm -->

    <!-- For User Certificate Authentication -->
    <!-- realm name="wl_userCertificateAuthRealm" loginModule="WLUserCertificateLoginModule">
        <className>com.worklight.core.auth.ext.UserCertificateAuthenticator</className>
        <parameter name="dependent-user-auth-realm" value="WASLTPARealm" />
        <parameter name="pki-bridge-class" value="com.worklight.core.auth.ext.UserCertificateEmbeddedPKI" />
        <parameter name="embedded-pki-bridge-ca-p12-file-path" value="/opt/ssl_ca/ca.p12"/>
        <parameter name="embedded-pki-bridge-ca-p12-password" value="capassword" />
    </realm -->

    <!-- For Trusteer Fraud Detection -->
    <!-- Requires acquiring Trusteer SDK -->
    <!-- realm name="wl_basicTrusteerFraudDetectionRealm" loginModule="trusteerFraudDetectionLogin">
        <className>com.worklight.core.auth.ext.TrusteerAuthenticator</className>
        <parameter name="rooted-device" value="block"/>
        <parameter name="device-with-malware" value="block"/>
        <parameter name="rooted-hiders" value="block"/>
        <parameter name="unsecured-wifi" value="alert"/>
        <parameter name="outdated-configuration" value="alert"/>
    </realm -->

    <!-- For enabling custom authentication -->
    <!-- The className shouldn't be changed, it is part of the framework  -->
    <!--  <realm name="customAuthRealm" loginModule="customAuthLoginModule">
        <className>com.worklight.core.auth.ext.CustomIdentityAuthenticator</className>
        <parameter name="providerUrl" value="http://localhost:3000"/>
    </realm> -->

</realms>

<loginModules>
    <loginModule name="StrongDummy" expirationInSeconds="3600">
        <className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
    </loginModule>

    <loginModule name="requireLogin" expirationInSeconds="3600">
        <className>com.worklight.core.auth.ext.SingleIdentityLoginModule</className>
    </loginModule>

    <loginModule name="rejectAll" expirationInSeconds="3600">
        <className>com.worklight.core.auth.ext.RejectingLoginModule</className>
    </loginModule>

    <!-- Required for Trusteer - wl_basicTrusteerFraudDetectionRealm -->
    <!-- loginModule name="trusteerFraudDetectionLogin" expirationInSeconds="300">
        <className>com.worklight.core.auth.ext.TrusteerLoginModule</className>
    </loginModule-->

    <!-- For websphere -->
    <!-- loginModule name="WASLTPAModule" expirationInSeconds="3600">
        <className>com.worklight.core.auth.ext.WebSphereLoginModule</className>
    </loginModule -->

    <!-- Login module for User Certificate Authentication -->
    <!-- <loginModule name="WLUserCertificateLoginModule" expirationInSeconds="3600">
        <className>com.worklight.core.auth.ext.UserCertificateLoginModule</className>
    </loginModule> -->


    <!-- For enabling SSO with no-provisioning device authentication -->
    <!-- <loginModule name="MySSO" ssoDeviceLoginModule="WLDeviceNoProvisioningLoginModule" expirationInSeconds="3600">
        <className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
    </loginModule> -->


    <!-- For enabling SSO with auto-provisioning device authentication -->
    <!-- <loginModule name="MySSO" ssoDeviceLoginModule="WLDeviceAutoProvisioningLoginModule" expirationInSeconds="3600">
        <className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
    </loginModule> -->

    <!-- For enabling custom authentication -->
    <!-- The className shouldn't be changed, it is part of the framework  -->
    <!-- <loginModule name="customAuthLoginModule" expirationInSeconds="3600">
        <className>com.worklight.core.auth.ext.CustomIdentityLoginModule</className>
    </loginModule> -->
</loginModules>

<!--staticResources>
    <resource id="mobileFirstConsole" securityTest="SubscribeServlet">
        <urlPatterns>/console*</urlPatterns>
    </resource>
</staticResources-->

根据这个错误

原因:推送适配器失败:需要安全测试 'AuthSecurity' 找不到资源 proc:AuthAdapter.getSecretData' authenticationConfig.xml:

它正在寻找 'AuthSecurity' 测试,但在作为部署在服务器上的运行时 WAR 的一部分 authenticationConfig.xml 中找不到。

程序名称="getSecretData" securityTest="AuthSecurityTest"

这意味着您需要从服务器中提取 WAR 并仔细检查它是否确实存在于 authenticationConfig.xml 中,根据异常

看起来它不存在]

https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/authentication-security/form-based-authentication/