最近,我将应用程序的weblogic从版本10.3.5升级到12.1.1 。但从那时起,我的应用程序的身份验证失败了。
我在WL控制台中使用WL10和WL12启用了身份验证调试,以比较和对比成功登录。
在 WL 10,成功中,似乎LDAP身份验证失败但继续通过领域适配器进行身份验证(提供领域适配器提交),如下所示:
####<2014-10-06 13:34:45.297 EDT> <Debug> <SecurityAtn> <OCServer1> <ExecuteThread: '56' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <> <1412616885297> <BEA-000000> <javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User administrator denied
at weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.login(LDAPAtnLoginModuleImpl.java:229)
….
####<2014-10-06 13:34:45.297 EDT> <Debug> <SecurityAtn> <OCServer1> <ExecuteThread: '56' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <> <1412616885297> <BEA-000000> <com.bea.common.security.internal.service.LoginModuleWrapper.commit>
####<2014-10-06 13:34:45.297 EDT> <Debug> <SecurityAtn> <OCServer1> <ExecuteThread: '56' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <> <1412616885297> <BEA-000000> <Realm Adapter Commit>
####<2014-10-06 13:34:45.297 EDT> <Debug> <SecurityAtn> <OCServer1> <ExecuteThread: '56' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <> <1412616885297> <BEA-000000> <Realm Adapter Principal Added>
vs WL 12,失败(给出Realm Adapter Abort),案例如下所示:
####<2014-10-06 14:51:38.397 EDT> <Debug> <SecurityAtn> <OCServer1> <ExecuteThread: '57' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <> <1412621498397> <BEA-000000> <javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User administrator denied
at weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.login(LDAPAtnLoginModuleImpl.java:229)
….
####<2014-10-06 14:51:38.397 EDT> <Debug> <SecurityAtn> <OCServer1> <ExecuteThread: '57' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <> <1412621498397> <BEA-000000> <com.bea.common.security.internal.service.LoginModuleWrapper.commit>
####<2014-10-06 14:51:38.398 EDT> <Debug> <SecurityAtn> <OCServer1> <ExecuteThread: '57' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <> <1412621498398> <BEA-000000> <Realm Adapter Abort>
####<2014-10-06 14:51:38.398 EDT> <Debug> <SecurityAtn> <OCServer1> <ExecuteThread: '57' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <> <1412621498398> <BEA-000000> <com.bea.common.security.internal.service.LoginModuleWrapper.commit delegated, returning false>
LDAP身份验证失败,使用Realm Adapter的后续操作也会失败。
我尝试使用 admin 用户登录,但我可以看到,匿名例外,我不知道这是什么意思。
我得到的例外是:
####<2014-10-06 14:53:38.829 EDT> <Error> <EMSServerLog> <OCServer1> <ExecuteThread: '119' for queue: 'EjbExecuteQueue'> <<anonymous>> <BEA1-00C90044E2189AE73037> <> <1412621618829> <BEA-000000> <<com..system.dataManager.security.SecurityUserAdminEJB_t45akl_Impl> ExecuteThread: '119' for queue: 'EjbExecuteQueue':
java.rmi.RemoteException: Error authenticating user; nested exception is:
java.lang.NullPointerException
at com..system.dataManager.security.SecurityUserAdminBean.authenticate(SecurityUserAdminBean.java:1453)
at com..system.dataManager.security.SecurityUserAdminBean.authenticatea(SecurityUserAdminBean.java:2304)
at com..system.dataManager.security.SecurityUserAdminBean.login(SecurityUserAdminBean.java:314)
at com..system.dataManager.security.SecurityUserAdminEJB_t45akl_EOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:32)
at com..system.dataManager.security.SecurityUserAdminEJB_t45akl_EOImpl.login(Unknown Source)
at com..system.dataManager.security.SecurityUserAdminEJB_t45akl_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:695)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:520)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:516)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:147)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:119)
Caused By: java.lang.NullPointerException
at weblogic.security.acl.DefaultUserInfoImpl.equalsCertificatesOnly(DefaultUserInfoImpl.java:218)
at weblogic.security.acl.DefaultUserInfoImpl.equalsInAllButName(DefaultUserInfoImpl.java:198)
at weblogic.security.acl.CachingRealm$CaseInsensitiveUserInfo.equals(CachingRealm.java:2036)
at weblogic.security.acl.TTLCache.findEntry(TTLCache.java:525)
at weblogic.security.acl.TTLCache.get(TTLCache.java:372)
at weblogic.security.acl.CachingRealm.authenticate(CachingRealm.java:805)
at com..system.dataManager.security.SecurityUserAdminBean.authenticate(SecurityUserAdminBean.java:1422)
at com..system.dataManager.security.SecurityUserAdminBean.authenticate(SecurityUserAdminBean.java:1442)
at com..system.dataManager.security.SecurityUserAdminBean.authenticatea(SecurityUserAdminBean.java:2304)
at com..system.dataManager.security.SecurityUserAdminBean.login(SecurityUserAdminBean.java:314)
at com..system.dataManager.security.SecurityUserAdminEJB_t45akl_EOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:32)
at com..system.dataManager.security.SecurityUserAdminEJB_t45akl_EOImpl.login(Unknown Source)
at com..system.dataManager.security.SecurityUserAdminEJB_t45akl_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:695)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:520)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:516)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:147)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:119)
其他人是否面临同样的问题?什么可能解决这个问题?