第2章 Admin Console の設定
2.1. セキュリティ
Admin Console は、JAAS セキュリティドメイン
jmx-console
を使いセキュリティーを確保しています。Enterprise Application Platformが zip アーカイブを使いインストールされた場合、このセキュリティドメインにはユーザーアカウントがありません。デフォルトのユーザー名/パスワードをもとにした攻撃の可能性をなくすためです。Enterprise Application Platformがグラフィックインストーラーを使いインストールされた場合、JAASセキュリティドメインおよびユーザーアカウントはインストールプロセスの一部として作成されます。JAASセキュリティドメイン名がインストール時に変更された場合でも、これらのユーザーは同じ場所に保存されます。
2.1.1. 認証
認証とは、ユーザーをシステムに認識させるプロセスのことです。Admin Console は
jmx-console
および jboss-web
ドメイン経由でユーザーに割り当てられた権限やロールとユーザー名/パスワード認証を使います。
2.1.2. 認証の有効化
Enterprise Application Platformはデフォルトで有効になった状態のセキュリティドメイン上にて認証を提供しています。この認証が有効かを確認するには、すでに無効になっている認証を再度有効化するか、以下の手順に従ってください。Enterprise Application Platformのセキュリティドメインと認証に関する詳細情報は、『セキュリティガイド』を参照してください。
手順2.1 認証の有効化
JMXコンソールで認証の有効化
以下のweb.xml
ファイル以下の部分JBOSS_HOME/server/PROFILE/deploy/jmx-console.war/WEB-INF/web.xml
にて
security-constraint
がアンコメントされているよう確認してください。<security-constraint> <web-resource-collection> <web-resource-name>HtmlAdaptor</web-resource-name> <description> An example security config that only allows users with the role JBossAdmin to access the HTML JMX console web application </description> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>JBossAdmin</role-name> </auth-constraint> </security-constraint>
JMXコンソールでセキュリティドメインを有効化
以下のjboss-web.xml
ファイル以下の部分が含まれるようにしてください。JBOSS_HOME/server/PROFILE/deploy/jmx-console.war/WEB-INF/jboss-web.xml
にて
<jboss-web> <!-- Uncomment the security-domain to enable security. You will need to edit the htmladaptor login configuration to setup the login modules used to authentication users. --> <security-domain>java:/jaas/jmx-console</security-domain> </jboss-web>
Admin Console で認証を有効化
以下のweb.xml
ファイル以下の部分JBOSS_HOME/server/PROFILE/deploy/management/console-mgr.sar/web-console.war/WEB-INF/web.xml
security-constraint
がアンコメントされているよう確認してください。<security-constraint> <web-resource-collection> <web-resource-name>HtmlAdaptor</web-resource-name> <description> An example security config that only allows users with the role JBossAdmin to access the HTML JMX console web application </description> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>JBossAdmin</role-name> </auth-constraint> </security-constraint>
Admin Console でセキュリティドメインを有効化
以下のjboss-web.xml
ファイル以下の部分が含まれるようにしてください。JBOSS_HOME/server/PROFILE/deploy/management/console-mgr.sar/web.console.war/WEB-INF/jboss-web.xml
<jboss-web> <!-- Uncomment the security-domain to enable security. You will need to edit the htmladaptor login configuration to setup the login modules used to authentication users. --> <security-domain>java:/jaas/jmx-console</security-domain> </jboss-web>
2.1.3. 認証の無効化
セキュアな社内のマシンにインストールを行う開発環境で利用する場合は認証を無効にすることができます。
警告
外部との接触があるインストールにおいて認証を無効にしないでください。
手順2.2 認証の無効化
JMXコンソールでのセキュリティ制限を無効する方法
以下のweb.xml
ファイルJBOSS_HOME/server/PROFILE/deploy/jmx-console.war/WEB-INF/web.xml
にて
security-constraint
の部分をコメントアウトします。<security-constraint> <web-resource-collection> <web-resource-name>HtmlAdaptor</web-resource-name> <description> An example security config that only allows users with the role JBossAdmin to access the HTML JMX console web application </description> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>JBossAdmin</role-name> </auth-constraint> </security-constraint>
JMXコンソールでセキュリティドメインを無効する方法
以下のjboss-web.xml
ファイル以下の部分を削除してください。JBOSS_HOME/server/PROFILE/deploy/jmx-console.war/WEB-INF/jboss-web.xml
にて
<jboss-web> <!-- Uncomment the security-domain to enable security. You will need to edit the htmladaptor login configuration to setup the login modules used to authentication users. --> <security-domain>java:/jaas/jmx-console</security-domain> </jboss-web>
Admin Consoleでセキュリティ制限を無効にする方法
以下のweb.xml
ファイルJBOSS_HOME/server/PROFILE/deploy/management/console-mgr.sar/web-console.war/WEB-INF/web.xml
security-constraint
の部分をコメントアウトします。<security-constraint> <web-resource-collection> <web-resource-name>HtmlAdaptor</web-resource-name> <description> An example security config that only allows users with the role JBossAdmin to access the HTML JMX console web application </description> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>JBossAdmin</role-name> </auth-constraint> </security-constraint>
Admin Console 向けにセキュリティドメインを無効にする方法
以下のjboss-web.xml
ファイル以下の部分を削除してください。JBOSS_HOME/server/PROFILE/deploy/management/console-mgr.sar/web.console.war/WEB-INF/jboss-web.xml
<jboss-web> <!-- Uncomment the security-domain to enable security. You will need to edit the htmladaptor login configuration to setup the login modules used to authentication users. --> <security-domain>java:/jaas/jmx-console</security-domain> </jboss-web>
2.1.4. ユーザーとロール
Enterprise Application Platformはロールを使いAdmin Consoleへのアクセスを許可および制限します。特に、Admin Consoleのユーザーに割り当てられるロールは、この手順で説明されている通り、
JBossAdmin
や HttpInvoker
ロールです。
手順2.3 ユーザの作成
この手順で、ユーザーを作成してから、ユーザーにAdmin ConsoleやHTTP呼び出しへのアクセス権限を割り当てます。
jmx-console JAAS セキュリティドメインでユーザーを作成する方法
JBOSS_HOME/server/PROFILE/conf/props/
ディレクトリのjmx-console-users.properties
ファイルを編集します。ユーザ名とパスワードの作成
username = passwordペアを作成します。重要
コメント付きのadmin=admin
(ユーザー名とパスワード) がユーザー名/パスワードの定義構文例です。ユーザーアカウントにはこれを使わないようにしてください。
web-console JAAS セキュリティドメインでユーザーを作成する方法
JBOSS_HOME/server/PROFILE/deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/
ディレクトリのweb-console-users.properties
ファイルを編集します。ユーザ名とパスワードの追加
username = passwordペアを追加します。重要
コメント付きのadmin=admin
(ユーザー名とパスワード) がユーザー名/パスワードの定義構文例です。ユーザーアカウントにはこれを使わないようにしてください。
ユーザー権限の授与
JBOSS_HOME/server/PROFILE/deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/
ディレクトリのweb-console-roles.properties
ファイルを編集します。- フォームのユーザーにエントリーを作成します。
username=JBossAdmin,HttpInvoker
- JBossAdmin
- Web-Consoleへアクセスできるユーザー権限を割り当てます。
- HttpInvoker
- HTTP Invokerへアクセスできるユーザー権限を割り当てます。