I am using MobileFirst Server MFPF 7.1, IF20151114-1616
WLClientLogReceiver adapter has the following settings. I tried changing the securityTest value to "LogUploadServlet", I still receive the same error below.
var imagesrc = [ someurl, someurl, ... ];
$(document).ready(function(){
var arr = new Array();
function loadimage() {
for (i = 0; i < imagesrc.length; i++) {
arr[i] = new Image();
$(arr[i]).attr('src', imagesrc[i]);
$(arr[i]).attr('alt', 'thumbnail' + i);
$(arr[i]).hide().appendTo($('.thumbnail').eq(i)).fadeIn(300);
}
}
loadimage();
$('.thumbnail img').load(function(){
var par = $(this).parent();
var row = par.parent();
var indexrow = row.index('.thumbrow');
var thumbindex = par.index('.thumb') + 3*indexrow;
//^ this calculates which loading.gif div to fade out
$('.loader').eq(thumbindex).fadeOut(200);
$(this).addClass("thumbimage");
});
});
To enable security that protects the loguploader servlet, I followed the instruction given in the IBM document on step one.
Server preparation for uploaded log data - Security
Configuration in my aunthenticationConfig.xml
Under staticResources
<procedure name="log" securityTest="wl_unprotected" audit="true" />
Under securityTests
<resource id="logUploadServlet" securityTest="LogUploadServlet">
<urlPatterns>/apps/services/loguploader*</urlPatterns>
</resource>
Under realms
<customSecurityTest name="LogUploadServlet">
<test realm="wl_anonymousUserRealm" step="1"/>
<test realm="LogUploadServlet" isInternalUserID="true"/>
</customSecurityTest>
Deployed the updated WAR file and adapter in server. I am receiving the below error while client send logs to server by calling send() method.
[2/12/16 14:14:28:768 CST] 0000014d LoginContext W com.worklight.core.auth.impl.LoginContext invokeLoginModule FWLSE0239W: Authentication failure in realm 'LogUploadServlet': Please check the credentials [project usbusiness] [2/12/16 14:14:28:933 CST] 000000d1 LoginContext W com.worklight.core.auth.impl.LoginContext invokeLoginModule FWLSE0239W: Authentication failure in realm 'LogUploadServlet': Please check the credentials [project usbusiness] [2/12/16 14:14:30:542 CST] 000000de SystemOut
Not sure what i a missing in this.
答案 0 :(得分:1)
不要在评论部分留下未回答的问题:
问题在于我为logUploadServlet设置的领域com.worklight.core.auth.ext.HeaderAuthenticator。删除并使安全性为isInternalUserID =“true”后,其工作正常。