10.7.8. 管理インターフェースのセキュリティーレルムの設定
管理インターフェースはセキュリティーレルムを使用して JBoss Enterprise Application Platform の認証および設定メカニズムへのアクセスを制御します。 本トピックでは、セキュリティーレルムの読み込みと設定について説明します。以下に記載するコマンドには管理 CLI を使用します。
セキュリティーレルムの設定の読み込み
以下の例は、ManagementRealm
セキュリティーレルムのデフォルト設定を示しています。mgmt-users.properties
というファイルを使用して設定情報を保管します。
例10.18 デフォルトの ManagementRealm
/host=master/core-service=management/security-realm=ManagementRealm/:read-resource(recursive=true,proxies=false,include-runtime=false,include-defaults=true)
{
"outcome" => "success",
"result" => {
"authorization" => undefined,
"server-identity" => undefined,
"authentication" => {"properties" => {
"path" => "mgmt-users.properties",
"plain-text" => false,
"relative-to" => "jboss.domain.config.dir"
}}
}
}
セキュリティーレルムの書き込み
以下のコマンドは TestRealm
というセキュリティーレルムを作成し、関連プロパティーファイルの名前とディレクトリを設定します。
例10.19 セキュリティーレルムの書き込み
/host=master/core-service=management/security-realm=TestRealm/:add
/host=master/core-service=management/security-realm=TestRealm/authentication=properties/:add(path=TestUsers.properties, relative-to=jboss.domain.config.dir)
管理インターフェースへのセキュリティーレルムの適用
セキュリティーレルムを追加したら、その名前を管理インターフェースへの参照として指定します。
例10.20 管理インターフェースへのセキュリティーレルムの追加
host=master/core-service=management/management-interface=http-interface/:write-attribute(name=security-realm,value=TestRealm)