4.4. クライアント証明書を使用した承認の設定
クライアント証明書認証を有効にすると、クライアント設定で Data Grid ユーザー認証情報を指定する必要がなくなります。つまり、ロールをクライアント証明書の Common Name (CN) フィールドに関連付ける必要があります。
前提条件
- クライアントに、公開証明書または証明書チェーンの一部 (通常は公開 CA 証明書) のいずれかが含まれる Java キーストアを提供します。
- クライアント証明書認証を実行するように Data Grid Server を設定します。
手順
- Data Grid Server 設定を開いて編集します。
-
セキュリティー承認設定で
common-name-role-mapper
を有効にします。 -
クライアント証明書から Common Name (
CN
) に、適切な権限を持つロールを割り当てます。 - 変更を設定に保存します。
注記
Data Grid は、証明書プリンシパルを抽出してクライアントのアイデンティティーを作成します。証明書内に存在する可能性のあるその他のサブジェクト代替名 (SAN) は現在無視されます。このため、以下の authorization.group-only-mapping
属性を false
に設定する必要があります。
クライアント証明書承認設定
XML
<infinispan> <cache-container name="certificate-authentication" statistics="true"> <security> <authorization group-only-mapping="false"> <!-- Declare a role mapper that associates the common name (CN) field in client certificate trust stores with authorization roles. --> <common-name-role-mapper/> <!-- In this example, if a client certificate contains `CN=Client1` then clients with matching certificates get ALL permissions. --> <role name="Client1" permissions="ALL"/> </authorization> </security> </cache-container> </infinispan>
JSON
{ "infinispan": { "cache-container": { "name": "certificate-authentication", "security": { "authorization": { "group-only-mapping": false, "common-name-role-mapper": null, "roles": { "Client1": { "role": { "permissions": "ALL" } } } } } } } }
YAML
infinispan: cacheContainer: name: "certificate-authentication" security: authorization: groupOnlyMapping: false commonNameRoleMapper: ~ roles: Client1: role: permissions: - "ALL"