5.4.2. Remoting サブシステムの設定
概要
JBoss Remoting には、ワーカースレッドプール、1 つ以上のコネクター、および一連のローカルおよびリモート接続 URI の 3 つのトップレベル設定可能な要素があります。このトピックでは、設定可能な各項目の説明、各項目の設定方法についての CLI コマンドの例、および完全に設定されたサブシステムの XML の例を紹介します。この設定はサーバーにのみ適用されます。独自のアプリケーションにカスタムコネクターを使用しない限り、ほとんどのユーザーは Remoting サブシステムをまったく設定する必要はありません。EJB などの Remoting クライアントとして動作するアプリケーションには、特定のコネクターに接続するための個別の設定が必要です。
CLI コマンドの適合
CLI コマンドは、デフォルト のプロファイルの設定時に管理対象ドメインに対して式化されます。別のプロファイルを設定するには、その名前を置き換えます。スタンドアロンサーバーの場合は、コマンドの /profile=default 部分を省略します。
Remoting サブシステム外の設定
remoting サブシステム以外の設定側面がいくつかあります。
- ネットワークインターフェース
remotingサブシステムによって使用されるネットワークインターフェースは、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サブシステムによって使用されるデフォルトの socket-binding は 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 プロバイダーなどの Remoting を使用する JBoss EAP 6 コンポーネントは、デフォルトでセキュアなインターフェースを要求します。
ワーカースレッドプール
ワーカースレッドプールは、Remoting コネクターを介して提供される作業の処理に使用できるスレッドのグループです。これは単一の要素 < ;worker-thread-pool> で、複数の属性を取ります。ネットワークタイムアウトの取得、スレッドの不足、またはメモリー使用量の制限が必要な場合には、これらの属性をチューニングします。特定の推奨事項は、特定の状況によって異なります。詳細は Red Hat グローバルサポートサービスまでお問い合わせください。
| 属性 | 説明 | CLI コマンド |
|---|---|---|
| read-threads |
リモーティングワーカーに対して作成する読み取りスレッドの数。デフォルトは
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 設定要素です。複数のコネクターを設定できます。それぞれは複数のサブ要素を持つ & lt;connector > 要素といくつかの属性で構成されます。デフォルトのコネクターは、JBoss EAP 6 の複数のサブシステムによって使用されます。カスタムコネクターの要素や属性の設定はアプリケーションに依存するため、詳細は Red Hat グローバルサポートサービスにお問い合わせください。
| 属性 | 説明 | CLI コマンド |
|---|---|---|
| socket-binding | このコネクターに使用するソケットバインディングの名前。 | /profile=default/subsystem=remoting/connector=remoting-connector/:write-attribute(name=socket-binding,value=remoting)
|
| authentication-provider |
このコネクターで使用するJASPIC(Java Authentication Service Provider Interface for Containers)モジュール。モジュールはクラスパスにある必要があります。
| /profile=default/subsystem=remoting/connector=remoting-connector/:write-attribute(name=authentication-provider,value=myProvider)
|
| security-realm |
オプション。アプリケーションのユーザー、パスワード、およびロールが含まれるセキュリティーレルム。EJB または Web アプリケーションはセキュリティーレルムに対して認証できます。
ApplicationRealm はデフォルトの JBoss EAP 6 インストールで利用できます。
| /profile=default/subsystem=remoting/connector=remoting-connector/:write-attribute(name=security-realm,value=ApplicationRealm)
|
| 属性 | 説明 | CLI コマンド |
|---|---|---|
| sasl |
SASL(Simple Authentication and Security Layer)認証メカニズムの組み込み要素
| 該当なし
|
| properties |
1 つ以上の <
;property> 要素が含まれ、それぞれ name 属性と任意の value 属性が含まれます。
| /profile=default/subsystem=remoting/connector=remoting-connector/property=myProp/:add(value=myPropValue)
|
送信接続
3 種類のアウトバウンド接続を指定することができます。
- URI への送信接続。
- ローカルアウトバウンド接続: ソケットなどのローカルリソースに接続します。
- リモートアウトバウンド接続: リモートリソースに接続し、セキュリティーレルムを使用して認証します。
outbound-connections> 要素に囲まれて います。これらの各接続タイプは outbound-socket-binding-ref 属性を取ります。outbound-connection は uri 属性を取ります。リモートアウトバウンド接続は、承認に使用する任意の username および security-realm 属性を取ります。
| 属性 | 説明 | CLI コマンド |
|---|---|---|
| outbound-connection | 汎用アウトバウンド接続。 | /profile=default/subsystem=remoting/outbound-connection=my-connection/:add(uri=http://my-connection)
|
| local-outbound-connection | 暗黙的な local:// URI スキームを使用した送信接続。 | /profile=default/subsystem=remoting/local-outbound-connection=my-connection/:add(outbound-socket-binding-ref=remoting2)
|
| remote-outbound-connection |
セキュリティーレルムで basic/digest 認証を使用した remote:// URI スキームの送信接続。
| /profile=default/subsystem=remoting/remote-outbound-connection=my-connection/:add(outbound-socket-binding-ref=remoting,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 Quality of 保護値のリストである
value 属性が含まれます。
|
/profile=default/subsystem=remoting/connector=remoting-connector/security=sasl:write-attribute(name=qop,value=["auth"])
|
| strength | value 属性が含まれます。これは SASL 暗号強度の値のリストで優先順で表されます。
|
/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 |
ゼロ以上の要素が含まれるローカリング要素。それぞれが単一の
値 を取ります。
|
/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)
|
例5.10 設定例
<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 およびマルチキャストの自動検出