メッセージング・エンジンに接続するユーザーの許可
認証されたユーザーに、メッセージの送受信や表示を行うためにメッセージング・リソース (キューまたはトピック) にアクセスするための十分な許可があるかどうかを検証する必要があります。
手順
- server.xml ファイルで wasJmsSecurity-1.0 フィーチャーを使用可能にします。
<featureManager> <feature>wasJmsServer-1.0</feature> <feature>wasJmsClient-2.0</feature> <feature>wasJmsSecurity-1.0</feature> </featureManager>
- server.xml ファイル内に <messagingSecurity> エレメントを
構成して、各ユーザーのロールおよび許可を定義します。これによって、ユーザーがメッセージング・リソース
に対して実行できるアクションが特定されます。 宛先に対する 許可は <messagingSecurity> エレメントで定義できます。 以下にサンプル構成を示します。
上記の構成では、 ユーザー user1 および user3 と グループ Developers は、 QUEUE1 で SEND アクションおよび BROWSE アクション を実行できます。さらに、TopicSpace1 内の Sports/Cricket トピックで ALL (すべての) アクションを 実行できます。 同様に、ユーザー user5 および user6 と グループ Testers は、キュー QUEUE1 で BROWSE アクション を実行でき、TopicSpace1 内のすべてのトピックで RECEIVE アクション を実行できます。<messagingEngine> <queue id="QUEUE1"/> <topicSpace id="TopicSpace1"/> <messagingSecurity> <role name="developer"> <queuePermission queueRef="QUEUE1"> <action>SEND</action> <action>BROWSE</action> </queuePermission> <topicPermission topicSpaceRef="TopicSpace1" topicName="Sports/Cricket"> <action>ALL</action> </topicPermission> <user name="user1" /> <user name="user3" /> <group name="Developers" /> </role> <role name="tester"> <queuePermission queueRef="QUEUE1"> <action>BROWSE</action> </queuePermission> <topicPermission topicSpaceRef="TopicSpace1"> <action>RECEIVE</action> </topicPermission> <user name="user5" /> <user name="user6" /> <group name="Testers" /> </role> </messagingSecurity> </messagingEngine>
- オプション: メッセージング・エンジンに接続する場合は、
createConnection 呼び出しにユーザー名とパスワードを指定します。 構文は次のとおりです。認証されたユーザーとしてメッセージング・エンジンに接続し、 管理者によって宣言された許可権限に基づいた操作を実行します。
[createConnection(userName, password)]


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=twlp_msg_sec_authorize
ファイル名: twlp_msg_sec_authorize.html