Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

15.3.3. 外部 LDAP プロバイダーの設定 (手動による方法)

ovirt-engine-extension-aaa-ldap 拡張機能は LDAP プロトコルを使用してディレクトリーサーバーにアクセスし、完全にカスタマイズ可能です。ユーザーポータルまたは管理ポータル機能へのシングルサインオンを有効にしない限り、Kerberos 認証は必要ありません。
前のセクションの対話型セットアップ方法でユースケースがカバーされていない場合は、設定ファイルを手動で変更して LDAP サーバーを接続できます。次の手順では、一般的な詳細を使用します。具体的な値は、設定によって異なります。

手順15.3 外部 LDAP プロバイダーの設定 (手動による方法)

  1. Red Hat Virtualization Manager で、LDAP 拡張パッケージをインストールします。
    # yum install ovirt-engine-extension-aaa-ldap
  2. LDAP 設定テンプレートファイルを /etc/ovirt-engine ディレクトリーにコピーします。テンプレートファイルは、アクティブなディレクトリー(ad)およびその他のディレクトリータイプ(単純な)で利用できます。この例では、単純な設定テンプレートを使用しています。
    # cp -r /usr/share/ovirt-engine-extension-aaa-ldap/examples/simple/. /etc/ovirt-engine
  3. 管理ポータルおよびユーザーポータルのログインページでユーザーに表示するプロファイル名に一致するように、設定ファイルの名前を変更します。
    # mv /etc/ovirt-engine/aaa/profile1.properties /etc/ovirt-engine/aaa/example.properties
    # mv /etc/ovirt-engine/extensions.d/profile1-authn.properties /etc/ovirt-engine/extensions.d/example-authn.properties
    # mv /etc/ovirt-engine/extensions.d/profile1-authz.properties /etc/ovirt-engine/extensions.d/example-authz.properties
  4. LDAP サーバーの種類のコメントを解除し、ドメインとパスワードのフィールドを更新して、LDAP プロパティー設定ファイルを編集します。
    #  vi /etc/ovirt-engine/aaa/example.properties

    例15.1 プロファイルの例: LDAP サーバーセクション

    # Select one
    #
    include = <openldap.properties>
    #include = <389ds.properties>
    #include = <rhds.properties>
    #include = <ipa.properties>
    #include = <iplanet.properties>
    #include = <rfc2307-389ds.properties>
    #include = <rfc2307-rhds.properties>
    #include = <rfc2307-openldap.properties>
    #include = <rfc2307-edir.properties>
    #include = <rfc2307-generic.properties>
    
    # Server
    #
    vars.server = ldap1.company.com
    
    # Search user and its password.
    #
    vars.user = uid=search,cn=users,cn=accounts,dc=company,dc=com
    vars.password = 123456
    
    pool.default.serverset.single.server = ${global:vars.server}
    pool.default.auth.simple.bindDN = ${global:vars.user}
    pool.default.auth.simple.password = ${global:vars.password}
    
    TLS または SSL プロトコルを使用して LDAP サーバーと対話するには、LDAP サーバーのルート CA 証明書を取得し、それを使用して公開鍵ストアファイルを作成します。次の行のコメントを解除し、公開キーストアファイルへのフルパスとファイルにアクセスするためのパスワードを指定します。
    注記
    パブリックキーストアファイルの作成方法の詳細は、「Manager と LDAP サーバー間の SSL または TLS 接続の設定」 を参照してください。

    例15.2 プロファイルの例: キーストアセクション

    # Create keystore, import certificate chain and uncomment
    # if using tls.
    pool.default.ssl.startTLS = true
    pool.default.ssl.truststore.file = /full/path/to/myrootca.jks
    pool.default.ssl.truststore.password = password
  5. 認証設定ファイルを確認します。管理ポータルおよびユーザーポータルのログインページでユーザーに表示されるプロファイル名は、ovirt.engine.aaa.authn.profile.name によって定義されます。設定プロファイルの場所は、LDAP 設定ファイルの場所と一致する必要があります。すべてのフィールドをデフォルトのままにすることができます。
    # vi /etc/ovirt-engine/extensions.d/example-authn.properties

    例15.3 認証設定ファイルの例

    ovirt.engine.extension.name = example-authn
    ovirt.engine.extension.bindings.method = jbossmodule
    ovirt.engine.extension.binding.jbossmodule.module = org.ovirt.engine-extensions.aaa.ldap
    ovirt.engine.extension.binding.jbossmodule.class = org.ovirt.engineextensions.aaa.ldap.AuthnExtension
    ovirt.engine.extension.provides = org.ovirt.engine.api.extensions.aaa.Authn
    ovirt.engine.aaa.authn.profile.name = example
    ovirt.engine.aaa.authn.authz.plugin = example-authz
    config.profile.file.1 = ../aaa/example.properties
  6. 許可設定ファイルを確認してください。設定プロファイルの場所は、LDAP 設定ファイルの場所と一致する必要があります。すべてのフィールドをデフォルトのままにすることができます。
    # vi /etc/ovirt-engine/extensions.d/example-authz.properties

    例15.4 許可設定ファイルの例

    ovirt.engine.extension.name = example-authz
    ovirt.engine.extension.bindings.method = jbossmodule
    ovirt.engine.extension.binding.jbossmodule.module = org.ovirt.engine-extensions.aaa.ldap
    ovirt.engine.extension.binding.jbossmodule.class = org.ovirt.engineextensions.aaa.ldap.AuthzExtension
    ovirt.engine.extension.provides = org.ovirt.engine.api.extensions.aaa.Authz
    config.profile.file.1 = ../aaa/example.properties
  7. 設定プロファイルの所有権および権限が適切であることを確認してください。
    # chown ovirt:ovirt /etc/ovirt-engine/aaa/example.properties
    # chmod 600 /etc/ovirt-engine/aaa/example.properties
  8. エンジンサービスを再起動します。
    # systemctl restart ovirt-engine.service
  9. 作成した example プロファイルは、管理ポータルおよびユーザーポータルのログインページで利用できるようになりました。LDAP サーバーのユーザーアカウントに適切なパーミッションを付与するには、たとえば、ユーザーポータルにログインするには、「管理ポータルからのユーザータスクの管理」 を参照してください。
注記
詳細は、/usr/share/doc/ovirt-engine-extension-aaa-ldap-version の LDAP 認証および承認拡張 README ファイルを参照してください。