11.8.8. 管理インターフェースのセキュリティーレルムの設定

管理インターフェースはセキュリティーレルムを使用して JBoss EAP 6 の認証および設定メカニズムへのアクセスを制御します。セキュリティーレルムは Unix グループと似ている、ユーザーの認証に使用できるユーザーとパスワードのデータベースです。
デフォルトの管理レルム

デフォルトでは、管理インターフェースは ManagementRealm セキュリティーレルムを使用するよう設定されています。ManagementRealm はユーザーとパスワードの組み合わせを mgmt-users.properties ファイルに格納します。

例11.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 というセキュリティーレルムを作成し、関連するプロパティーファイルのディレクトリーを設定します。

例11.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)
既存のセキュリティードメインを用いたセキュリティーレルム認証の設定

セキュリティードメインを使用して管理インターフェースに対して認証を行うには、以下の手順に従います。

最初にセキュリティーレルムを作成します。次に、そのセキュリティーレルムを管理インターフェースの security-realm 属性の値として指定します。

例11.20 HTTP 管理インターフェースに使用するセキュリティーレルムの指定

/host=master/core-service=management/management-interface=http-interface/:write-attribute(name=security-realm,value=TestRealm)