简体   繁体   中英

IBM MobileFirst server 7.1 PushNotification Subscriber ID(USERID) Not stored

I have an issue in IBM MobileFirst 7.1 Push Notification SubscriberID(USERID)

I have successfully deployed Push Notification sample app in MobileFirst server 7.1 Liberty profile

I configured WRKLGHT database for storing pushdevices and subscriber id

While Login process USERID is not stored in device table . In that device table USERID field was stored as NUL . As a result USERID not displayed in device tab Mobile first console.

GCM pushsenderkey and pushsenderid configured correctly in application-descriptor.xml file

In worklight.properties set the following two properties

wl.device.tracking.enabled=true
wl.device.enableAccessManagement=true

In application-descriptor.xml

<userIdentityRealms>PushAppRealm</userIdentityRealms>

I did the following configuration for authenticity in my authenticationConfig.xml

 <?xml version="1.0" encoding="UTF-8"?>
<tns:loginConfiguration xmlns:tns="http://www.worklight.com/auth/config"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
  COPYRIGHT LICENSE: This information contains sample code provided in source code form. You may copy, modify, and distribute
these sample programs in any form without payment to IBM® for the purposes of developing, using, marketing or distributing
application programs conforming to the application programming interface for the operating platform for which the sample code is written.
Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE.
IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
    -->


     <staticResources>
        <!--  
        <resource id="logUploadServlet" securityTest="LogUploadServlet">
            <urlPatterns>/apps/services/loguploader*</urlPatterns>
        </resource>
        -->
           <resource id="subscribeServlet" securityTest="SubscribeServlet">
              <urlPatterns>/subscribeSMS*;/receiveSMS*;/ussd*</urlPatterns>
           </resource>
       </staticResources>
    <!--  Sample security tests  
         Even if not used there will be some default webSecurityTest and           mobileSecurityTest 

         Attention: If you are adding an app authenticity realm to a security test, 
         you must also update the application-descriptor.xml. Please refer to the user documentation 
         on application authenticity for environment specific guidelines. -->
    <securityTests>
        <!-- 
        <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>
        -->
        <webSecurityTest name="PushApplication-web-securityTest">
            <testUser realm="PushAppRealm"/>
        </webSecurityTest>
        <mobileSecurityTest name="PushApplication-strong-mobile-securityTest">
            <testUser realm="PushAppRealm"/>
            <testDeviceId provisioningType="none"/>
        </mobileSecurityTest>
        <customSecurityTest name="SubscribeServlet">
            <test realm="wl_directUpdateRealm" step="1"/>
            <test isInternalUserID="true" realm="SubscribeServlet"/>
        </customSecurityTest>
    </securityTests>
    <realms>
        <realm loginModule="StrongDummy" name="SampleAppRealm">
            <className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
        </realm>
        <realm loginModule="rejectAll" name="SubscribeServlet">
            <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 -->
        <realm loginModule="PushAppLoginModule" name="PushAppRealm">


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


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


<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
        </loginModule>
        <loginModule name="requireLogin">


<className>com.worklight.core.auth.ext.SingleIdentityLoginModule</className>
        </loginModule>
        <loginModule name="rejectAll">


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


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


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





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


<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
        </loginModule> -->
    </loginModules>
</tns:loginConfiguration>

MobileFirst Console MobileFirst控制台

Device Database table 设备数据库表

This happened due to user error:

It works for me..I did a Mistake...Developed in one version deployed the app in another fix pack Version

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM