Search code examples
ibm-mobilefirstworklight-serverworklight-security

Server security configuration for WLClientLogReceiver


I have a Worklight app and I am trying to set up an adapter to capture client-side logs from it. (I have first tried to use Analytics, but it keeps crashing with PermGen out of memory error, perhaps I will have to look at it if this fails.) I followed the steps described in http://www-01.ibm.com/support/knowledgecenter/#!/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/devref/c_uploaded_client_log_data.html up to "Server security". I have no idea how to actually configure the server realm/security check/etc. for the log uploader servlet. Currently it returns this error (both on development and production server):

[ERROR   ] FWLSE0059E: Login into realm 'WLRemoteDisableNullLoginModule' failed. Cannot find application 'null'. [project Project]
Cannot find application 'null'
[ERROR   ] FWLSE0117E: Error code: 4, error description: AUTHENTICATION_ERROR, error message: An error occurred while performing authentication using loginModule WLRemoteDisableNullLoginModule, User Identity {wl_directUpdateRealm=null, wl_authenticityRealm=null, Project=(name:2, loginModule:ProjectLoginModule), wl_remoteDisableRealm=null, SampleAppRealm=null, wl_antiXSRFRealm=null, wl_deviceAutoProvisioningRealm=null, WorklightConsole=null, wl_deviceNoProvisioningRealm=null, myserver=(name:2, loginModule:ProjectLoginModule), wl_anonymousUserRealm=null}. [project Project] [project Project]
[ERROR   ] FWLSE0059E: Login into realm 'WLRemoteDisableNullLoginModule' failed. Cannot find application 'null'. [project Project]
Cannot find application 'null'
[ERROR   ] FWLSE0117E: Error code: 4, error description: AUTHENTICATION_ERROR, error message: An error occurred while performing authentication using loginModule WLRemoteDisableNullLoginModule, User Identity {wl_directUpdateRealm=null, wl_authenticityRealm=null, Project=(name:2, loginModule:ProjectLoginModule), wl_remoteDisableRealm=null, SampleAppRealm=null, wl_antiXSRFRealm=null, wl_deviceAutoProvisioningRealm=null, WorklightConsole=null, wl_deviceNoProvisioningRealm=null, myserver=(name:2, loginModule:ProjectLoginModule), wl_anonymousUserRealm=null}. [project Project] [project Project]
[ERROR   ] com.worklight.core.messages:Invoke procedure failed due to: null
[ERROR   ] com.worklight.core.messages:Invoke procedure failed due to: null

I tried uncommenting the customTests section in authenticationConfig.xml containing the wl_remoteDisableRealm, but to no avail.

How should this be configured?


Solution

  • I see from your comment you got it working. We did not want to duplicate documentation for authenticationConfig.xml and risk it getting out of sync on the "Server preparation for uploaded log data" KnowledgeCenter topic page in the "Server security" section. That said, we should have provided a link to the Worklight Security Framework topic page.

    There is nothing special or unique about the configuration for log receiver servlet in the context of security. The point being made in that section is that if you configure authenticationConfig.xml so that security issues challenges to the app that requires user interaction, you should

    • send logs only when you are sure your are already authenticated, or
    • change security constraints such that the log upload servlet URL authentication does not require user interaction

    If you leave these in place, the risk is that the end-user will see a random prompt for credentials when they do not expect it.

    The reason the "Server preparation for uploaded log data"