我的混合mobilfirst应用程序使用ldap auth。推送通知事件源使用相同的安全测试。
喜欢这个
<customSecurityTest name="LDAPSecurityTest">
<!--test realm="wl_directUpdateRealm" step="1"/-->
<test isInternalUserID="true" realm="LDAPRealm"/>
<test realm="wl_deviceNoProvisioningRealm" isInternalDeviceID="true"/>
</customSecurityTest>
<loginModule expirationInSeconds="-1" name="LDAPLoginModule">
<className>com.worklight.core.auth.ext.LdapLoginModule</className>
<parameter name="ldapProviderUrl" value="ldap://???????"/>
<parameter name="ldapTimeoutMs" value="2000"/>
<parameter name="ldapSecurityAuthentication" value="simple"/>
<parameter name="validationType" value="exists"/>
<parameter name="ldapSecurityPrincipalPattern" value="{username}"/>
</loginModule>
但是当使用此realm
时,客户端可以登录但移动第一个跟踪日志有一些错误。事件来源有时候没有订阅。如果订阅,当我发送一次通知时,我会发出多个通知
[4/7/16 14:40:47:836 EEST] 00000097 TaskThread 3<br/> com.worklight.core.tasks.TaskThread trigger Triggered task com.worklight.core.clustering.ClusterSynchronizationTask#e31d1bac
[4/7/16 14:40:47:836 EEST] 0000009a RssBrokerUtil 3 com.worklight.core.util.RssBrokerUtils beginTransaction Transaction begin : -1245152153 (new:true; completed:false; rollbackOnly:false)REQUIRED
[4/7/16 14:40:47:836 EEST] 0000009a ClusterSynchr 3 com.worklight.core.clustering.ClusterSynchronizationTask getStackTrace mark singleton as hosted ssoExpiredLoginContextsCleanupTask
[4/7/16 14:40:47:836 EEST] 0000009a ClusterSynchr 3 com.worklight.core.clustering.ClusterSynchronizationTask getStackTrace mark singleton as hosted PlatformUsageProcessingTask
[4/7/16 14:40:47:836 EEST] 0000009a ClusterSynchr 3 com.worklight.core.clustering.ClusterSynchronizationTask getStackTrace mark singleton as hosted notificationCleanupTask
[4/7/16 14:40:47:836 EEST] 0000009a RssBrokerUtil 3 com.worklight.core.util.RssBrokerUtils commitTransaction Transaction commit: -1245152153 (new:true; completed:false; rollbackOnly:false)
[4/7/16 14:40:48:257 EEST] 00000097 TaskThread 3 com.worklight.core.tasks.TaskThread trigger Triggered task ssoExpiredLoginContextsCleanupTask
[4/7/16 14:40:48:257 EEST] 000000c4 RssBrokerUtil 3 com.worklight.core.util.RssBrokerUtils beginTransaction Transaction begin : 740638396 (new:true; completed:false; rollbackOnly:false)REQUIRED
[4/7/16 14:40:48:257 EEST] 000000c4 RssBrokerUtil 3 com.worklight.core.util.RssBrokerUtils commitTransaction Transaction commit: 740638396 (new:true; completed:false; rollbackOnly:false)
[4/7/16 14:41:17:850 EEST] 00000097 TaskThread 3 com.worklight.core.tasks.TaskThread trigger Triggered task com.worklight.core.clustering.ClusterSynchronizationTask#e31d1bac
[4/7/16 14:41:17:850 EEST] 0000009a RssBrokerUtil 3 com.worklight.core.util.RssBrokerUtils beginTransaction Transaction begin : 849568747 (new:true; completed:false; rollbackOnly:false)REQUIRED
[4/7/16 14:41:17:850 EEST] 0000009a ClusterSynchr 3 com.worklight.core.clustering.ClusterSynchronizationTask getStackTrace mark singleton as hosted ssoExpiredLoginContextsCleanupTask
[4/7/16 14:41:17:850 EEST] 0000009a ClusterSynchr 3 com.worklight.core.clustering.ClusterSynchronizationTask getStackTrace mark singleton as hosted PlatformUsageProcessingTask
[4/7/16 14:41:17:850 EEST] 0000009a ClusterSynchr 3 com.worklight.core.clustering.ClusterSynchronizationTask getStackTrace mark singleton as hosted notificationCleanupTask
[4/7/16 14:41:17:850 EEST] 0000009a RssBrokerUtil 3 com.worklight.core.util.RssBrokerUtils commitTransaction Transaction commit: 849568747 (new:true; completed:false; rollbackOnly:false)
[4/7/16 14:41:18:272 EEST] 00000097 TaskThread 3 com.worklight.core.tasks.TaskThread trigger Triggered task ssoExpiredLoginContextsCleanupTask
[4/7/16 14:41:18:272 EEST] 000000c4 RssBrokerUtil 3 com.worklight.core.util.RssBrokerUtils beginTransaction Transaction begin : 1444634462 (new:true; completed:false; rollbackOnly:false)REQUIRED
[4/7/16 14:41:18:272 EEST] 000000c4 RssBrokerUtil 3 com.worklight.core.util.RssBrokerUtils commitTransaction Transaction commit: 1444634462 (new:true; completed:false; rollbackOnly:false)
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter checkIfMultipleSecurityDomainsDisabled com.worklight.disableMultipleSecurityDomains variable null. Assuming false
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter checkIfMultipleSecurityDomainsDisabled Value for disable MSD String: false
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter doFilter Multiple Security Domains not disabled.
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter pushWebsphereSecurityContext Triggering push websphere security context
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter pushWebsphereSecurityContext Triggered push websphere security context for app name by reflection: IBM_Worklight_project_runtime_XXXXWASND
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio > com.worklight.core.auth.impl.AuthenticationFilter doFilter ENTRY
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio > com.worklight.core.auth.impl.AuthenticationFilter isWaitingForSynchronization ENTRY
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio < com.worklight.core.auth.impl.AuthenticationFilter isWaitingForSynchronization returned false RETURN
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationContext AuthenticationContext Create authentication context [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f DistributedAt 1 com.worklight.core.session.DistributedAttributeStoreHandlerImpl cstor DistributedAttributeStoreHandlerImpl [ tenant ID = tenant client ID = 33818efe303305971103cffce61e45eca1182075 consumer ID = authorization_server_realm_data session ID = null sessionExpiryPeriod = -1 clientExpiryPeriod = -1] [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f HTTPSessionAt 1 com.worklight.core.session.HTTPSessionAttributeStoreManager get tenantId = tenant consumerId = authorization_server_realm_data clientId = 33818efe303305971103cffce61e45eca1182075 [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f HTTPSessionAt 1 com.worklight.core.session.HTTPSessionAttributeStoreManager get key = tenant/33818efe303305971103cffce61e45eca1182075/authorization_server_realm_data value = null [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f DistributedAt 1 com.worklight.core.session.DistributedAttributeStoreHandlerImpl cstor savedMap = null [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter doFilter Phase 1 - pass to the auth context. (POST)/XXXX/apps/services/api/XXXX/iphone/init [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter getProtectedResource Resource version is 1.0 [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationDAO findProtectedResourceByPath Seeking protected resource for path=/apps/services/api/XXXX/iphone/init, version=1.0 [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationDAO findProtectedResourceByPath Could no found a resource version null for path /apps/services/api/XXXX/iphone/init [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationDAO findProtectedResourceByPath Could no found a resource version null for path /apps/services/api/XXXX/iphone/init [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationDAO findProtectedResourceByPath Could no found a resource version null for path /apps/services/api/XXXX/iphone/init [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationDAO findProtectedResourceByPath Could no found a resource version null for path /apps/services/api/XXXX/iphone/init [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationDAO findProtectedResourceByPath Could no found a resource version 1.0 for path /apps/services/api/XXXX/iphone/init [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationDAO findProtectedResourceByPath Could no found a resource version 1.0 for path /apps/services/api/XXXX/iphone/init [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationDAO findProtectedResourceByPath Found protected resource with: XXXX:iphone:1.0:api [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter getProtectedResource Request to protected resource (XXXX:iphone:1.0:api): http://xxxxxxxxx/apps/services/api/XXXX/iphone/init [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter doFilter Phase 2 - checking access to the resource (id:XXXX:iphone:1.0:api; pathPatternsDelimited:/apps/services/api/XXXX/iphone/*; securityTest:[LDAPRealm step=1 type=USER_AUTH, wl_deviceNoProvisioningRealm step=1 type=DEVICE_AUTH]; isStatic:false) [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationContext processRealms Autheticating realm: LDAPRealm with step:1 for resource: XXXX:iphone:1.0:api [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationContext checkAuthentication Start the authentication for realm LDAPRealm [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f LoginContext 1 com.worklight.core.auth.impl.LoginContext processRequest Passing the request to the authenticator com.worklight.core.auth.ext.FormBasedAuthenticator [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationContext checkAuthentication Client interaction required. [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter doFilter WLAuthenticationException caught, return the response to the client. Exception:
com.worklight.server.auth.api.WorkLightAuthenticationException
at com.worklight.core.auth.impl.AuthenticationContext.checkAuthentication(AuthenticationContext.java:752)
at com.worklight.core.auth.impl.AuthenticationContext.processRealms(AuthenticationContext.java:613)
at com.worklight.core.auth.impl.AuthenticationContext.pushCurrentResource(AuthenticationContext.java:586)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:75)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:220)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:928)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:909)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
[project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f Authenticatio 1 com.worklight.core.auth.impl.AuthenticationFilter doFilter request execution finished - cleanup the thread context [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f DistributedAt 1 com.worklight.core.session.DistributedAttributeStoreHandlerImpl deleteAll All attributes were deleted [project XXXX]
[4/7/16 14:41:29:974 EEST] 0000014f DistributedAt 1 com.worklight.core.session.DistributedAttributeStoreHandlerImpl set attribute = LDAPLoginModule attributeData = AttributeData [data=com.worklight.authorization.endpoint.authorization.LoginContextStore$RealmAttributeValue@94b6b727, expiryTime=-1, keepAcrossSessions=false] forceCommit = false [project XXXX]
........