0

我一直在努力遵循本网站上的教程中找到: TutorialsIBM移动率先平台v7.1的自定义安全测试不authenticationConfig.xml

我遇到了麻烦试图建立一个简单的表格基于身份验证到适配器过程。 当我试图把我的适配器:

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--> 

+0

保护authAdapter与“webTests”而不是“AuthSecurity”,然后再试一次。 –

回答

0

按照这个错误

原因:未能推适配器:必需的安全测试“AuthSecurity”的 资源PROC:AuthSecurity‘测试未发现:AuthAdapter.getSecretData”

它正在寻找的不是在 authenticationConfig.xml发现’在authenticationConfig.xml中,它是部署在服务器上的运行时WAR的一部分。

过程名称=“getSecretData” securityTest =“AuthSecurityTest”

这意味着你需要,如果它实际上是在看起来authenticationConfig.xml存在提取来自服务器的WAR双重校验喜欢它不存在基于异常

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