15.4. シングルサインオンのための LDAP と Kerberos の設定
ovirt-engine-extension-aaa-misc および ovirt-engine-extension-aaa-ldap) と、Apache モジュールを 1 つ (mod_auth_kerb) 設定する必要があります。Keberos を必要としないシングルサインオンを設定することは可能ですが、本ガイドの対象範囲外となっています。
注記
- 既存のキー配布センター (KDC) サーバーは Kerberos 5 の MIT バージョンを使用すること。
- KDC サーバーの管理者権限があること。
- Red Hat Virtualization Manager およびユーザーのマシンに Kerberos クライアントがインストール済みであること。
- Kerberos のサービスプリンシパルおよび
keytabファイルの作成にkadminユーティリティーが使用されること。
KDC サーバー
- Red Hat Virtualization Manager 上の Apache サービス用のサービスプリンシパルと
keytabファイルを作成します。
Red Hat Virtualization Manager
- 認証および承認拡張機能のパッケージと Apache Kerberos 認証モジュールをインストールします。
- 拡張ファイルを設定します。
手順15.4 Apache サービス用の Kerberos の設定
- KDC サーバーで、
kadminユーティリティーを使用して Red Hat Virtualization Manager 上の Apache サービス用のサービスプリンシパルを作成します。サービスプリンシパルとは、Apache サービス用の KDC に対するリファレンス ID です。# kadmin kadmin> addprinc -randkey HTTP/fqdn-of-rhevm@REALM.COM
- Apache サービス用に
keytabファイルを作成します。keytabファイルが共有秘密鍵を保管します。kadmin> ktadd -k /tmp/http.keytab HTTP/fqdn-of-rhevm@REALM.COM
kadmin> quit
- KDC サーバーから Red Hat Virtualization Manager に
keytabファイルをコピーします。# scp /tmp/http.keytab root@rhevm.example.com:/etc/httpd
手順15.5 ユーザーポータルまたは管理ポータルへのシングルサインオンの設定
- Red Hat Virtualization Manager で、keytab の所有権とパーミッションを適切に設定します。
# chown apache /etc/httpd/http.keytab
# chmod 400 /etc/httpd/http.keytab
- 認証拡張機能のパッケージ、LDAP 拡張機能のパッケージ、および
mod_auth_kerb認証モジュールをインストールします。# yum install ovirt-engine-extension-aaa-misc ovirt-engine-extension-aaa-ldap mod_auth_kerb
- SSO 設定テンプレートファイルを
/etc/ovirt-engineディレクトリーにコピーします。テンプレートファイルは、Active Directory 用 (ad-sso) およびその他のディレクトリータイプ用 (simple-sso) に提供されています。以下の例では、シンプル SSO 設定テンプレートを使用しています。# cp -r /usr/share/ovirt-engine-extension-aaa-ldap/examples/simple-sso/. /etc/ovirt-engine
- Apache が SSO 設定ファイルを使用するために、
/etc/httpd/conf.dディレクトリーのシンボリックリンクを作成します。# ln -s /etc/ovirt-engine/aaa/ovirt-sso.conf /etc/httpd/conf.d
- Apache が Kerberos を認証に使用するように、認証メソッドファイルを編集します。
# vi /etc/ovirt-engine/aaa/ovirt-sso.conf
例15.5 認証メソッドファイルの例
<LocationMatch ^(/ovirt-engine/(webadmin|userportal|api)|/api)> RewriteEngine on RewriteCond %{LA-U:REMOTE_USER} ^(.*)$ RewriteRule ^(.*)$ - [L,P,E=REMOTE_USER:%1] RequestHeader set X-Remote-User %{REMOTE_USER}s AuthType Kerberos AuthName "Kerberos Login" Krb5Keytab /etc/httpd/http.keytab KrbAuthRealms REALM.COM Require valid-user </LocationMatch> - 管理ポータルおよびユーザーポータルのログインページで表示されるプロファイル名と一致するように設定ファイルの名前を変更します。
# 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
- LDAP プロパティー設定ファイルを編集して、LDAP サーバーのタイプの箇所をコメント解除し、ドメインとパスワードのフィールドを更新します。
# vi /etc/ovirt-engine/aaa/example.properties
例15.6 プロファイル例: 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.7 プロファイル例: キーストアのセクション
# Create keystore, import certificate chain and uncomment # if using ssl/tls. pool.default.ssl.startTLS = true pool.default.ssl.truststore.file = /full/path/to/myrootca.jks pool.default.ssl.truststore.password = password
- 認証設定ファイルを確認します。プロファイル名は、管理ポータルおよびユーザーポータルのログインページでユーザーに表示されるプロファイル名は、
ovirt.engine.aaa.authn.profile.nameで定義されます。設定プロファイルの場所は、LDAP 設定ファイルの場所と一致する必要があります。全フィールドをデフォルトのままにすることも可能です。# vi /etc/ovirt-engine/extensions.d/example-http-authn.properties
例15.8 認証設定ファイルの例
ovirt.engine.extension.name = example-http-authn ovirt.engine.extension.bindings.method = jbossmodule ovirt.engine.extension.binding.jbossmodule.module = org.ovirt.engine-extensions.aaa.misc 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-http ovirt.engine.aaa.authn.authz.plugin = example-authz ovirt.engine.aaa.authn.mapping.plugin = example-http-mapping config.artifact.name = HEADER config.artifact.arg = X-Remote-User
- 承認設定ファイルを確認します。設定プロファイルの場所は、LDAP 設定ファイルの場所と一致する必要があります。
# vi /etc/ovirt-engine/extensions.d/example-authz.properties
例15.9 承認設定ファイルの例
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
- 設定プロファイルの所有権とパーミッションを適切に設定します。
# chown ovirt:ovirt /etc/ovirt-engine/aaa/example.properties
# chmod 600 /etc/ovirt-engine/aaa/example.properties
- Apache サービスと engine サービスを再起動します。
# service httpd restart
# service ovirt-engine restart

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.