[WLS] Look Inside WebLogic Server Embedded LDAP with an LDAP Explorer

WebLogic Serverからグループを消す際の問題について、WebLogic Serverに関する社内メーリングリストに今日投稿がありました。グループ名に特殊文字が含まれていると、java.net.MalformedURLExceptionを吐いて、以下のように「エラーを解決してから再実行してください」とのメッセージが現れ、WebLogic Server管理コンソールでグループを削除できない、というものです(今回削除しようとしているグループ名はaa:bbと言うグループです)。

WebLogic Serverには組み込みLDAPサーバがあり、適度な大きさの環境(10000を下回るユーザー)のユーザーやグループを管理することができます。

Oracle® Fusion Middleware Understanding Security for Oracle WebLogic Server
Embedded LDAP Server
http://download.oracle.com/docs/cd/E17904_01/web.1111/e13710/realm_chap.htm#i1033574

利用者が増えるとか、もっと機能を使いたいという企業にとっては、OracleのEnterprise Directory Services製品をおすすめしています。

Oracle Identity Management
http://www.oracle.com/technetwork/middleware/id-mgmt/overview/index.html

Oracle Internet Directory
http://www.oracle.com/technetwork/middleware/id-mgmt/overview/index-082035.html

Oracle Directory Server Enterprise Edition
http://www.oracle.com/technetwork/middleware/id-mgmt/overview/index-085178.html

WebLogic Serverで複数の認証機構を構成することができますので、複数のディレクトリを同時に使うことができます。WebLogic Serverが組み込みLDAPサーバでグループ名に特殊文字を使うことをサポートしているかどうかは定かではありませんが、この場合、管理コンソールおよびWLSTの両方で同じ現象が発生しています。WLSTの出力は以下の通りです。
wls:/hotspot_domain/serverConfig/SecurityConfiguration/hotspot_domain/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator> cmo.removeGroup('aa:bb')

Traceback (innermost last):
File "<console>", line 1, in ?
weblogic.security.providers.authentication.LDAPAtnDelegateException: [Security:090296]invalid URL ldap:///ou=people,ou=myrealm,dc=hotspot_domain??sub?(&(objectclass=person)(wlsMemberOf=cn=aa:bb,ou=groups,ou=myrealm,dc=hotspot_domain))
at weblogic.security.providers.authentication.LDAPAtnGroupMembersNameList.advance(LDAPAtnGroupMembersNameList.java:254)
at weblogic.security.providers.authentication.LDAPAtnGroupMembersNameList.<init>(LDAPAtnGroupMembersNameList.java:119)
at weblogic.security.providers.authentication.LDAPAtnDelegate.listGroupMembers(LDAPAtnDelegate.java:1392)
at weblogic.security.providers.authentication.LDAPAtnDelegate.removeGroup(LDAPAtnDelegate.java:1989)
at weblogic.security.providers.authentication.DefaultAuthenticatorImpl.removeGroup(DefaultAuthenticatorImpl.java:242)
at weblogic.security.providers.authentication.DefaultAuthenticatorMBeanImpl.removeGroup(DefaultAuthenticatorMBeanImpl.java:407)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.management.jmx.modelmbean.WLSModelMBean.invoke(WLSModelMBean.java:437)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
at weblogic.management.mbeanservers.internal.JMXContextInterceptor.invoke(JMXContextInterceptor.java:263)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.invoke(SecurityInterceptor.java:444)
at weblogic.management.jmx.mbeanserver.WLSMBeanServer.invoke(WLSMBeanServer.java:323)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11$1.run(JMXConnectorSubjectForwarder.java:663)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11.run(JMXConnectorSubjectForwarder.java:661)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder.invoke(JMXConnectorSubjectForwarder.java:654)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
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:518)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: java.net.MalformedURLException
at netscape.ldap.LDAPUrl.readNextConstruct(LDAPUrl.java:651)
at netscape.ldap.LDAPUrl.parseUrl(LDAPUrl.java:277)
at netscape.ldap.LDAPUrl.<init>(LDAPUrl.java:114)
at weblogic.security.providers.authentication.LDAPAtnGroupMembersNameList.advance(LDAPAtnGroupMembersNameList.java:224)
... 41 more
実はやるべきことは非常に簡単で、":"は%3AのようにURLエンコードしなければならない、ということです。方法はそれだけではなくて、JXplorerのようなLDAPエクスプローラを使ってWebLogic Serverの組み込みLDAPに接続し、エントリを編集することもできます。

JXplorer
http://pegacat.com/jxplorer/

[訳注]マニュアルではOpenLDAPのLDAPブラウザを使用しています。
マニュアルの手順に従って、認証情報を変更して組み込みLDAPサーバの認証資格情報を変更し、管理サーバを再起動します。

Oracle® Fusion Middleware Securing Oracle WebLogic Server 11g Release 1 (10.3.4)
Viewing the Contents of the Embedded LDAP Server from an LDAP Browser
http://download.oracle.com/docs/cd/E17904_01/web.1111/e13707/ldap.htm#i1102166

今回はJXPlorerを構成して、ドキュメントの表記のように接続してみましょう。重要な入力項目を丸で囲みました。この例では、ドメイン名が”hotspot_domain”となっており、localhost、7001/tcpでリスニングしています。
cn=Admin(ユーザ名)は組み込みLDAPのAdministratorの固定識別子なので変更しませんが、このツールに入力できる項目がどのようなものかを知っておく必要があります。
接続できたなら、エントリを探索することができます。このケースの場合、グループを削除することができます。


原文はこちら。
http://blogs.oracle.com/jamesbayer/2011/02/look_inside_weblogic_server_em.html

0 件のコメント:

コメントを投稿