6.2.2. LDAP レルム


LDAP レルムは、OpenLDAP、Red Hat Directory Server、Apache Directory Server、Microsoft Active Directory などの LDAP サーバーに接続して、ユーザーを認証し、メンバーシップ情報を取得します。

注記

LDAP サーバーは、サーバーのタイプとデプロイメントに応じて、異なるエントリーレイアウトを持つことができます。このため、LDAP レルム設定は複雑です。すべてのポジションの設定の例を提供するために、本書では扱いません。

LDAP レルム設定

<security xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="urn:infinispan:server:10.1 https://infinispan.org/schemas/infinispan-server-10.1.xsd"
          xmlns="urn:infinispan:server:10.1">
   <security-realms>
      <security-realm name="default">
        <ldap-realm name="ldap" 1
                    url="ldap://my-ldap-server:10389" 2
                    principal="uid=admin,ou=People,dc=infinispan,dc=org" 3
                    credential="strongPassword"
                    connection-timeout="3000" read-timeout="30000" 4
                    connection-pooling="true" referral-mode="ignore"
                    page-size="30"
                    direct-verification="true"> 5
            <identity-mapping rdn-identifier="uid" 6
                              search-dn="ou=People,dc=infinispan,dc=org"> 7
               <attribute-mapping> 8
                  <attribute from="cn"
                             to="Roles"
                             filter="(&amp;(objectClass=groupOfNames)(member={1}))"
                             filter-dn="ou=Roles,dc=infinispan,dc=org"/>
               </attribute-mapping>
            </identity-mapping>
         </ldap-realm>
      </security-realm>
   </security-realms>
</security>

1
LDAP レルムに名前を付けます。
2
LDAP サーバー接続 URL を指定します。
3
LDAP サーバーに接続するためのプリンシパルおよび認証情報を指定します。
重要

LDAP 接続のプリンシパルには、LDAP クエリーを実行し、特定の属性にアクセスするために必要な権限が必要です。

4
必要に応じて、接続タイムアウトなどを指定して LDAP サーバー接続を調整します。
5
ユーザーの認証情報を検証します。Data Grid は設定済みの認証情報を使用して LDAP サーバーへの接続を試みます。または、パスワードを指定する user-password-mapper 要素を使用することもできます。
6
LDAP エントリーをアイデンティティーにマッピングします。rdn-identifier は、指定された識別子 (通常はユーザー名) をもとにユーザーエントリーを検索する LDAP 属性を指定します (例: uid または sAMAccountName 属性)。
7
ユーザーエントリーを含む LDAP サブツリーへの検索を制限する開始コンテキストを定義します。
8
ユーザーがメンバーとなっている全グループを取得します。通常、メンバーシップ情報を保存する方法は 2 つあります。
  • 通常、member 属性にクラス groupOfNames を持つグループエントリーの下。この場合は、前述の設定例にあるように、属性フィルターを使用できます。このフィルターは、提供されたフィルターに一致するエントリーを検索します。フィルターは、ユーザーの DN と等しい member 属性を持つグループを検索します。次に、フィルターは、from で指定されたグループエントリーの CN を抽出し、それをユーザーの Roles に追加します。
  • memberOf 属性のユーザーエントリー。この場合、以下のような属性参照を使用する必要があります。

    <attribute-reference reference="memberOf" from="cn" to="Roles" />

    この参照は、ユーザーエントリーからすべての memberOf 属性を取得し、from で指定された CN を抽出し、それらをユーザーの Roles に追加します。

サポート対象の認証メカニズム

LDAP レルムは、以下の認証メカニズムを直接サポートします。

  • SASL: PLAINDIGEST-*、および SCRAM-*
  • HTTP(REST): Basic および Digest

6.2.2.1. LDAP レルムプリンシパルの書き換え

GSSAPIGS2-KRB5Negotiate などの一部の SASL 認証メカニズムでは、LDAP サーバーの検索に使用する前に クリーンアップ する必要のあるユーザー名を提供します。

<security xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="urn:infinispan:server:10.1 https://infinispan.org/schemas/infinispan-server-10.1.xsd"
          xmlns="urn:infinispan:server:10.1">
   <security-realms>
      <security-realm name="default">
         <ldap-realm name="ldap"
                     url="ldap://${org.infinispan.test.host.address}:10389"
                     principal="uid=admin,ou=People,dc=infinispan,dc=org"
                     credential="strongPassword">
            <name-rewriter> 1
               <regex-principal-transformer name="domain-remover"
                                            pattern="(.*)@INFINISPAN\.ORG"
                                            replacement="$1"/>
            </name-rewriter>
            <identity-mapping rdn-identifier="uid"
                              search-dn="ou=People,dc=infinispan,dc=org">
               <attribute-mapping>
                  <attribute from="cn" to="Roles"
                             filter="(&amp;(objectClass=groupOfNames)(member={1}))"
                             filter-dn="ou=Roles,dc=infinispan,dc=org" />
               </attribute-mapping>
               <user-password-mapper from="userPassword" />
            </identity-mapping>
         </ldap-realm>
      </security-realm>
   </security-realms>
</security>
1
正規表現を使用してプリンシパルからユーザー名を抽出するリライトを定義します。
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.