Identity Manager は Java Message Service (JMS) を使用して、PasswordSync サーブレットからパスワードの変更の通知を受信できます。配信の保証に加えて、JMS はメッセージを複数のシステムに配信できます。
このアダプタの詳細については、『Sun Identity Manager 8.1 Resources Reference 』を参照してください。
この節ではサンプルのシナリオを使用して、Sun JMS サーバーを使用する PasswordSync の設定手順について説明します。
説明する内容は次のとおりです。
JMS サーバーを使用する PasswordSync の設定で一般的な (単純な) 例は、ユーザーが Windows 上で自身のパスワードを変更できるようにして、Identity Manager で新しいパスワードを取得し、Sun Directory Server 上で新しいパスワードを使用してユーザーアカウントを更新するというものです。
このシナリオで構成された環境は次のとおりです。
Windows Server 2003 Enterprise Edition ? Active Directory
Sun JavaTM System Identity Manager 6.0 2005Q4M3
Suse Linux 10.0 上で稼働する MySQL
Suse Linux 10.0 上で稼働する Tomcat 5.0.28
SUSE Linux 10.0 上で稼働する Sun Java System Message Queue 3.6 SP3 2005Q4
SUSE Linux 10.0 上で稼働する Sun Java System Directory Server 5.2 SP4
Java 1.5 (Java 5.0)
JMS と JNDI を有効にするために、次のファイルが Tomcat の common/lib ディレクトリにコピーされています。
jms.jar (Sun Message Queue から)
fscontext.jar (Sun Message Queue から)
imq.jar (Sun Message Queue から)
jndi.jar (Java JDK から)
ここでは、次の管理オブジェクトの作成および格納手順について説明します。 この手順はシナリオ例が正しく機能するために必要です。
接続ファクトリオブジェクト
デスティネーションオブジェクト
LDAP ディレクトリまたはファイルに管理オブジェクトを格納できます。ファイルを使用している場合、ファイルのすべてのインスタンスが同じである必要があります。
手順については、次を参照してください。
この節の手順では、Sun Message Queue がインストール済みであると想定しています。必要なツールは、Message Queue インストールメディアの bin/ ディレクトリにあります。
これらの管理オブジェクトの作成には、Message Queue 管理 GUI (imqadmin) またはコマンド行ツール (imqobjmgr) を使用できます。以下の手順ではコマンド行ツールを使用します。
PasswordSync と JMS リスナーは、LDAP ディレクトリに格納されている管理オブジェクトを使用するように設定できます。図 11–14 は、この処理を示しています。PasswordSync サーブレットと JMS リスナーアダプタはどちらも、メッセージを送受信するために、LDAP ディレクトリから接続ファクトリとデスティネーション設定を取得する必要があります。
この節では、Message Queue コマンド行ツール (imqobjmgr) を使用して、LDAP ディレクトリに管理オブジェクトを格納する方法を説明します。
Message Queue コマンド行ツール (imqobjmgr) を開き、「接続ファクトリオブジェクトの格納」のコマンドを入力して、接続ファクトリオブジェクトを格納します。
#> ./imqobjmgr add -l "cn=mytestFactory" -j "java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory" -j "java.naming.provider.url=ldap://gwenig.coopsrc.com:389/ou=sunmq,dc=coopsrc,dc=com" -j "java.naming.security.principal=cn=directory manager" -j "java.naming.security.credentials=password" -j "java.naming.security.authentication=simple" -t qf -o "imqAddressList=mq://gwenig.coopsrc.com:7676/jms" Adding a Queue Connection Factory object with the following attributes: imqAckOnAcknowledge [Message Service Acknowledgement of Client Acknowledgements] ... imqSetJMSXUserID [Enable JMSXUserID Message Property] false Using the following lookup name: cn=mytestFactory The object’s read-only state: false To the object store specified by: java.naming.factory.initial com.sun.jndi.ldap.LdapCtxFactory java.naming.provider.url ldap://gwenig.coopsrc.com:389/ou=sunmq,dc=coopsrc,dc=com java.naming.security.authentication simple java.naming.security.credentials netscape java.naming.security.principal cn=directory manager Object successfully added. |
「接続ファクトリオブジェクトの格納」では、imqAddressList によって JMS サーバー/ブローカのホスト名 (gwenig.coopsrc.com)、ポート (7676)、およびアクセス方法 (jms) を定義しています。
Message Queue コマンド行ツール (imqobjmgr) で、「デスティネーションオブジェクトの格納」のコマンドを入力して、デスティネーションオブジェクトを格納します。
#> ./imqobjmgr add -l "cn=mytestDestination" -j "java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory" -j "java.naming.provider.url=ldap://gwenig.coopsrc.com:389/ou=sunmq,dc=coopsrc,dc=com" -j "java.naming.security.principal=cn=directory manager" -j "java.naming.security.credentials=password" -j "java.naming.security.authentication=simple" -t q -o "imqDestinationName=mytestDestination" Adding a Queue object with the following attributes: imqDestinationDescription [Destination Description] A Description for the Destination Object imqDestinationName [Destination Name] mytestDestination Using the following lookup name: cn=mytestDestination The object’s read-only state: false To the object store specified by: java.naming.factory.initial com.sun.jndi.ldap.LdapCtxFactory java.naming.provider.url ldap://gwenig.coopsrc.com:389/ ou=sunmq,dc=coopsrc,dc=com java.naming.security.authentication simple java.naming.security.credentials netscape java.naming.security.principal cn=directory manager Object successfully added. |
ldapsearch または LDAP ブラウザを使用して、新たに作成したオブジェクトをチェックできます。
LDAP サーバーに管理オブジェクトを格納することについての節はこれで終了です。次の節 (管理オブジェクトをファイルに格納する方法) を省略して、「このシナリオに対する JMS リスナーアダプタの設定」の節に進みます。
PasswordSync と JMS リスナーは、ファイルに格納されている管理オブジェクトを使用するように設定できます。管理オブジェクトを LDAP サーバーに格納 (「LDAP ディレクトリへの管理オブジェクトの格納」) していない場合は、この節の手順に従います。
Message Queue コマンド行ツール (imqobjmgr) を開き、「接続ファクトリオブジェクトの格納」のコマンドを入力して、接続ファクトリオブジェクトを格納し、ルックアップ名を指定します。
#> ./imqobjmgr add -l "mytestFactory" -j "java.naming.factory.initial= com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:///home/gael/tmp" -t qf -o "imqAddressList=mq://gwenig.coopsrc.com:7676/jms" Adding a Queue Connection Factory object with the following attributes: imqAckOnAcknowledge [Message Service Acknowledgement of Client Acknowledgements] ... imqSetJMSXUserID [Enable JMSXUserID Message Property] false Using the following lookup name: mytestFactory The object’s read-only state: false To the object store specified by: java.naming.factory.initial com.sun.jndi.fscontext.RefFSContextFactory java.naming.provider.url file:///home/gael/tmp Object successfully added. To specify a destination: #> ./imqobjmgr add -l "mytestQueue" -j "java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:///home/gael/tmp" -t q -o "imqDestinationName=myTestQueue" Adding a Queue object with the following attributes: imqDestinationDescription [Destination Description] A Description for the Destination Object imqDestinationName [Destination Name] myTestQueue Using the following lookup name: mytestQueue The object’s read-only state: false To the object store specified by: java.naming.factory.initial com.sun.jndi.fscontext.RefFSContextFactory java.naming.provider.url file:///home/gael/tmp Object successfully added. |
Sun Message Queue ブローカでは、デフォルトでキューデスティネーションの自動作成が有効になっています (config.properties を参照。 ただし、imq.autocreate.queue のデフォルト値は true)。
キューデスティネーションが自動的に作成されない場合は、「ブローカでのデスティネーションの作成」に示すコマンドを使用して、ブローカ上でデスティネーションオブジェクトを作成する必要があります。このとき、myTestQueue がデスティネーションを表します。
name (Queue name): #> cd /opt/sun/mq/bin #>./imqcmd create dst -t q -n mytestQueue Username: <admin> Password: <admin> Creating a destination with the following attributes: Destination Name mytestQueue Destination Type Queue On the broker specified by: ------------------------- Host Primary Port ------------------------- localhost 7676 Successfully created the destination. |
ディレクトリまたはファイルに管理オブジェクトを格納できます。
ディレクトリの場合: ディレクトリを使用すると、接続ファクトリオブジェクトとデスティネーションオブジェクトを一元的に格納することができます。
ディレクトリを使用する場合、これらの管理オブジェクトはディレクトリエントリとして格納されます。
Identity Manager PasswordSync サーブレットと Identity Manager サーバーが同一のマシンに置かれていない場合は、それぞれから .bindings ファイルにアクセスできる必要があります。管理オブジェクトの作成をそれぞれのマシンでもう一度繰り返しても、.bindings ファイルを各マシンの適切な場所にコピーしてもかまいません。
ファイルの場合: Identity Manager PasswordSync サーブレットと Identity Manager サーバーの両方が、同一のサーバー上で実行されている (つまり、ディレクトリが使用可能でない) 場合は、ファイルに管理オブジェクトを格納できます。
ファイルを使用する場合、両方の管理オブジェクトは java.naming.provider.url に対して指定したディレクトリ (たとえば、Windows では file:///c:/temp、UNIX では file:///tmp ) 以下に、単一のファイル (Windows と UNIX のどちらでも .bindings ファイル) に格納されます。
アプリケーションサーバーで JMS リスナーアダプタを設定します。「JMS リスナーアダプタの追加と設定」の手順に従います。
次に、同期のために JMS リスナーを設定します。Active Sync は、JMS を使用する場合は必要ですが、直接接続の場合は使用されません。
管理者インタフェースで、メニューから「リソース」をクリックします。
「リソースリスト」で、「JMS リスナー」チェックボックスを選択します。
「リソースアクション」リストで、「同期ポリシーの編集」を選択します。
JMS リスナーリソースの「同期ポリシーの編集」ページが表示されます (図 11–15)。
「共通設定」の「プロキシ管理者」で、pwsyncadmin を選択します。(この管理者は、空のフォームと関連付けられています。
「共通設定」の「処理規則」で、リストから「Synchronize User Password」を選択します。デフォルトのユーザーパスワード同期ワークフローは、JMS リスナーアダプタから送られてくる個々のリクエストを受け取って、ChangeUserPassword ビューアをチェックアウトしてから、ChangeUserPassword ビューアに再度チェックインします。
「ログファイルパス」ボックスで、アクティブログとアーカイブされるログのファイルを作成するディレクトリへのパスを指定します。
デバッグ目的であれば、「ログレベル」を 4 に設定し、詳細なログを生成します。
「保存」をクリックします。