18.4.4.4. リモーティングサブシステムを設定する
概要
JBoss Remoting には、3 つのトップレベルの設定可能な要素があります。ワーカースレッドプール、1 つ以上のコネクター、および一連のローカルおよびリモート接続 URI です。このトピックでは、設定可能な各項目の説明、各項目を設定する方法の CLI コマンドの例、および完全に設定されたサブシステムの XML の例を示します。この設定はサーバーにのみ適用されます。独自のアプリケーションにカスタムコネクターを使用する場合を除き、Remoting のサブシステムの設定は必要でないことがほとんどです。EJB などの、リモーティングクライアントとして動作するアプリケーションには特定のコネクターに接続するための別の設定が必要になります。
CLI コマンドの適応
CLI コマンドは、デフォルト のプロファイルを設定するときに、管理対象ドメイン用に作成されます。別のプロファイルを設定するには、その名前に置き換えます。スタンドアロンサーバーの場合、コマンドの /profile=default 部分を省略します。
リモーティングサブシステム外の設定
リモーティング サブシステムの外部にあるいくつかの設定の側面があります。
- ネットワークインターフェース
リモーティングサブシステムで使用されるネットワークインターフェイスは、domain/configuration/domain.xmlまたはstandalone/configuration/standalone.xmlで定義されているパブリックインターフェイスです。Copy to Clipboard Copied! Toggle word wrap Toggle overflow パブリックインターフェイスのホストごとの定義は、domain.xmlまたはstandalone.xmlと同じディレクトリーのhost.xmlで定義されます。このインターフェイスは、他のいくつかのサブシステムでも使用されます。変更するときは注意してください。Copy to Clipboard Copied! Toggle word wrap Toggle overflow - socket-binding
remotingサブシステムによって使用されるデフォルトのソケットバインディングは TCP ポート 4447 にバインドされます。これを変更する必要がある場合の詳細は、ソケットバインディングとソケットバインディンググループに関するドキュメントを参照してください。ソケットバインディングおよびソケットバインディンググループに関する情報は、JBoss EAP の 『管理および設定ガイド』 の 『ソケットバインディンググループ』 の章にあります。 https://access.redhat.com/documentation/ja-jp/red_hat_jboss_enterprise_application_platform/?version=6.4- EJB の リモーティングコネクター参照
- EJB サブシステムにはリモートメソッド呼び出しに対するリモーティングコネクターへの参照が含まれています。デフォルト設定は次のとおりです。
<remote connector-ref="remoting-connector" thread-pool-name="default"/>
<remote connector-ref="remoting-connector" thread-pool-name="default"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - セキュアなトランスポート設定
- リモーティングトランスポートはクライアントの要求があれば StartTLS を使用してセキュアな接続 (HTTPS、Secure Servlet など) を使用します。セキュアな接続とセキュアでない接続の両方で同じソケットバインディング (ネットワークポート) が使用されるため、サーバー側に追加の設定をする必要はありません。クライアントは必要に応じてセキュアなトランスポートまたはセキュアでないトランスポートを要求します。EJB、ORB、JMS プロバイダーなどのリモーティングを使用する JBoss EAP 6 のコンポーネントはデフォルトでセキュアなインターフェイスを使用します。
ワーカースレッドプール
ワーカースレッドプールは、Remoting コネクターを介して入ってくる作業を処理するために使用できるスレッドのグループです。これは単一の要素 <worker-thread-pool> であり、いくつかの属性を取ります。ネットワークタイムアウトが発生した場合、スレッドが不足した場合、またはメモリー使用量を制限する必要がある場合は、これらの属性を調整してください。具体的な推奨事項は、特定の状況によって異なります。詳細は Red Hat グローバルサポートサービスまでお問い合わせください。
| 属性 | 説明 | CLI コマンド |
|---|---|---|
| 読み取りスレッド |
リモーティングワーカーに対して作成する読み取りスレッドの数。デフォルトは
1です。
| /profile=default/subsystem=remoting/:write-attribute(name=worker-read-threads,value=1)
|
| write-threads |
リモーティングワーカーに作成する書き込みスレッドの数。デフォルトは
1です。
| /profile=default/subsystem=remoting/:write-attribute(name=worker-write-threads,value=1)
|
| task-keepalive |
コアでないリモーティングワーカーのタスクスレッドにキープアライブを使用する期間 (ミリ秒単位)。デフォルトは
60 です。
| /profile=default/subsystem=remoting/:write-attribute(name=worker-task-keepalive,value=60)
|
| task-max-threads |
リモーティングワーカーのタスクスレッドプールに対するスレッドの最大数。デフォルトは
16 です。
| /profile=default/subsystem=remoting/:write-attribute(name=worker-task-max-threads,value=16)
|
| task-core-threads |
リモーティングワーカーのタスクスレッドプールに対するコアスレッドの数。デフォルトは
4 です。
| /profile=default/subsystem=remoting/:write-attribute(name=worker-task-core-threads,value=4)
|
| task-limit |
許可するリモーティングワーカータスクの最大数。 この数を超えるリモーティングワーカータスクは拒否されます。デフォルトは
16384 です。
| /profile=default/subsystem=remoting/:write-attribute(name=worker-task-limit,value=16384)
|
コネクター
コネクターは主な Remoting 設定要素です。複数のコネクターを設定できます。それぞれは、いくつかのサブ要素といくつかの可能な属性を持つ要素 <connector> 要素で設定されています。デフォルトのコネクターは複数の JBoss EAP 6 サブシステムによって使用されます。カスタムコネクターの要素や属性の設定はアプリケーションによって異なるため、詳細は Red Hat グローバルサポートサービスまでご連絡ください。
| 属性 | 説明 | CLI コマンド |
|---|---|---|
| socket-binding | このコネクターに使用するソケットバインディングの名前。 | /profile = default/subsystem = remoteing/connectedor = remoteing-connector/:write-attribute (name = socket-binding、value = remoteing)
|
| authentication-provider |
このコネクターで使用するコンテナー用 Java 認証サービスプロバイダーインターフェイス (JASPIC) モジュール。モジュールはクラスパスに含まれている必要があります。
| /profile = default/subsystem = remoteing/connectedor = remoteing-connector/:write-attribute (name = authentication-provider、value = myProvider)
|
| security-realm |
任意。アプリケーションのユーザー、パスワード、およびロールを含むセキュリティーレルム。EJB または Web アプリケーションは、セキュリティーレルムに対して認証できます。
ApplicationRealm は、デフォルトの JBoss EAP 6 インストールで使用できます。
| /profile = default/subsystem = remoteing/connectedor = remoteing-connector/:write-attribute (name = security-realm、value = ApplicationRealm)
|
| 属性 | 説明 | CLI コマンド |
|---|---|---|
| sasl |
Simple Authentication and Security Layer (SASL) 認証メカニズムの囲み要素
| 該当なし
|
| properties |
1 つ以上の
<property> 要素が含まれ、それぞれに name 属性とオプションの value 属性があります。
| /profile = default/subsystem = remoteing/connectedor = remoteing-connector/property = myProp/:add (value = myPropValue)
|
送信接続
3 つのタイプのアウトバウンド接続を指定することができます。
- STF へのアウトバウンド接続
- ソケットなどのローカルリソースに接続するローカルアウトバウンド接続
- リモートリソースに接続し、セキュリティーレルムを使用して認証を行うリモートアウトバウンド接続
<outbound-connections> 要素で囲まれています。これらの各接続タイプは、outbound-socket-binding-ref 属性を取ります。アウトバウンド接続は uri 属性を取ります。リモートアウトバウンド接続は、オプションの ユーザー名 と セキュリティーレルム 属性を使用して承認に使用します。
| 属性 | 説明 | CLI コマンド |
|---|---|---|
| outbound-connection | 一般的なアウトバウンド接続。 | /profile = default/subsystem = remoting/outbound-connection = my-connection/:add (uri = http://my-connection)
|
| local-outbound-connection | 暗黙の local://URI スキームを使用したアウトバウンド接続。 | /profile = default/subsystem = remoteing/local-outbound-connection = my-connection/:add (outbound-socket-binding-ref = remoteing2)
|
| remote-outbound-connection |
セキュリティーレルムで基本/ダイジェスト認証を使用する、remote://URI スキームのアウトバウンド接続。
| /profile = default/subsystem = remoteing/remote-outbound-connection = my-connection/:add (outbound-socket-binding-ref = remoteing、username = myUser、security-realm = ApplicationRealm)
|
SASL 要素
SASL 子要素を定義する前に、最初の SASL 要素を作成する必要があります。以下のコマンドを使用します。
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl:add
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl:add
| 属性 | 説明 | CLI コマンド |
|---|---|---|
| include-mechanisms |
SASL メカニズムのリストである
value 属性が含まれています。
|
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl:write-attribute(name=include-mechanisms,value=["DIGEST","PLAIN","GSSAPI"])
|
| qop |
優先度の高い順に、SASL の保護品質値のリストである
value 属性が含まれています。
|
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl:write-attribute(name=qop,value=["auth"])
|
| strength |
優先度の高い順に、SASL 暗号強度値のリストである
value 属性が含まれています。
|
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl:write-attribute(name=strength,value=["medium"])
|
| reuse-session |
ブール値である
value 属性が含まれています。true の場合、セッションの再利用を試みます。
|
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl:write-attribute(name=reuse-session,value=false)
|
| server-auth |
ブール値である
value 属性が含まれています。true の場合、サーバーはクライアントに対して認証を行います。
|
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl:write-attribute(name=server-auth,value=false)
|
| policy |
以下の要素を 0 個以上含む囲み要素。それぞれが単一の
値 を取ります。
|
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl/sasl-policy=policy:add
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl/sasl-policy=policy:write-attribute(name=forward-secrecy,value=true)
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl/sasl-policy=policy:write-attribute(name=no-active,value=false)
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl/sasl-policy=policy:write-attribute(name=no-anonymous,value=false)
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl/sasl-policy=policy:write-attribute(name=no-dictionary,value=true)
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl/sasl-policy=policy:write-attribute(name=no-plain-text,value=false)
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl/sasl-policy=policy:write-attribute(name=pass-credentials,value=true)
|
| properties |
1 つ以上の
<property> 要素が含まれ、それぞれに name 属性とオプションの value 属性があります。
|
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl/property=myprop:add(value=1)
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl/property=myprop2:add(value=2)
|
例18.38 設定例
<subsystem xmlns="urn:jboss:domain:remoting:1.1">
<connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:remoting:1.1">
<connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
</subsystem>
まだ文書化されていない設定の側面
- JNDI およびマルチキャスト自動検出