第2章 サーバーおよびインターフェイスの保護
2.1. ブロックの構築
2.1.1. インターフェイスおよびソケットバインディング
JBoss EAP は、Web アプリケーションと管理インターフェイスの両方の通信に、ホストのインターフェイス (inet-address、nic など) とポートを利用します。これらのインターフェイスとポートは、JBoss EAP 設定ファイル (standalone.xml
、domain.xml
、host.xml
など) の インターフェイス と socket-binding-groups 設定を通じて定義および設定されます。
インターフェイス と socket-binding-group を定義および設定する方法の詳細は、設定ガイドのソケットバインディングセクション を参照してください。
例: インターフェイス
<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:127.0.0.1}"/> </interface> </interfaces>
例: ソケットバインディンググループ
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}"> <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/> <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/> <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/> <socket-binding name="http" port="${jboss.http.port:8080}"/> <socket-binding name="https" port="${jboss.https.port:8443}"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> <outbound-socket-binding name="mail-smtp"> <remote-destination host="localhost" port="25"/> </outbound-socket-binding> </socket-binding-group>
2.1.2. セキュリティーレルム
JBoss EAP は、セキュリティーレルムを使用して、管理インターフェイスで使用できる認証および承認メカニズム (ローカル、LDAP、プロパティーなど) を定義します。セキュリティーレルムの背景情報の詳細は、Red Hat JBoss Enterprise Application Platform セキュリティーアーキテクチャーガイド の セキュリティーレルム セクションを参照してください。
例: セキュリティーレルム
<security-realms> <security-realm name="ManagementRealm"> <authentication> <local default-user="$local" skip-group-loading="true"/> <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/> </authentication> <authorization map-groups-to-roles="false"> <properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/> </authorization> </security-realm> <security-realm name="ApplicationRealm"> <authentication> <local default-user="$local" allowed-users="*" skip-group-loading="true"/> <properties path="application-users.properties" relative-to="jboss.server.config.dir"/> </authentication> <authorization> <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/> </authorization> </security-realm> </security-realms>
JBoss EAP では、既存のセキュリティーレルムの更新に加え、新しいセキュリティーレルムの作成も可能になります。管理コンソールで新しいセキュリティーレルムを作成したり、管理 CLI から以下のコマンドを呼び出すこともできます。
/core-service=management/security-realm=NEW-REALM-NAME:add()
新しいセキュリティーレルムを作成し、認証または認可にプロパティーファイルを使用する場合は、新しいセキュリティードメイン専用の新しいプロパティーファイルを作成する必要があります。JBoss EAP は、他のセキュリティードメインによって使用される既存のファイルを再利用せず、設定ファイルが存在しない場合には、設定に指定された新しいファイルを自動的に作成します。
2.1.3. 管理インターフェイスのセキュア化にセキュリティーレルムとソケットバインディングを使用する
デフォルトでは、JBoss EAP は管理インターフェイスに接続するための http-interface を定義します。このインターフェイスは、JBoss EAP 設定の <management-interfaces> セクションで定義されます。
<management-interfaces> <http-interface security-realm="ManagementRealm" http-upgrade-enabled="true"> <socket-binding http="management-http"/> </http-interface> </management-interfaces>
インターフェイスが security-realm と socket-binding を指定していることに注意してください。指定されたセキュリティーレルムとソケットバインディングの設定を更新すると、管理インターフェイスをさまざまな方法でセキュリティー保護できます。セキュリティーレルムとソケットバインディングを介してこれらの各インターフェイスをセキュリティー保護できることに加えて、これらのインターフェイスの両方を完全に無効にすることもできます。また、これらのインターフェイスのユーザーは、さまざまなロールとアクセス権を持つように設定できます。このガイドには、セキュリティー監査、セキュアなパスワード、JBoss EAP 内の他のサブシステムと重複する JMX など、JBoss EAP のセキュリティーに関連するトピックもいくつかあります。