14.4. 단일 사용 승인(SSO)을 위해 LDAP 및 Kerberos 설정
ovirt-engine-extension-aaa-misc 및 ovirt-engine-extension-aaa-ldap라는 두 개의 확장파일과 mod_auth_kerb라는 한 개의 Apache 모듈을 설정해야 합니다. Kerberos 없이 SSO 설정이 가능하지만 이 문서에서는 다루지 않습니다.
참고
- 기존 KDC (Key Distribution Center) 서버는 Kerberos 5의 MIT 버전을 사용합니다.
- KDC 서버의 관리자 권한이 있어야 합니다.
- Red Hat Virtualization Manager 및 사용자 시스템에 Kerberos 클라이언트가 설치되어 있어야 합니다.
kadmin유틸리티를 사용하여 Kerberos 서비스 사용자 및keytab파일을 생성합니다.
KDC 서버
- Red Hat Virtualization Manager에서 Apache 서비스의
keytab파일 및 서비스 사용자를 생성합니다.
Red Hat Virtualization Manager
- 인증 확장 패키지 및 Apache Kerberos 인증 모듈을 설치합니다.
- 확장 파일을 설정합니다.
절차 14.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
절차 14.5. 사용자 포털 또는 관리 포털에 단일 사용 승인 (SSO) 설정
- 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
- SSO 설정 파일을 사용하기 위해 Apache의
/etc/httpd/conf.d디렉토리에 대한 심볼릭 링크를 생성합니다:# ln -s /etc/ovirt-engine/aaa/ovirt-sso.conf /etc/httpd/conf.d
- Kerberos 인증을 사용하기 위해 Apache의 인증 방식 파일을 편집합니다:
# vi /etc/ovirt-engine/aaa/ovirt-sso.conf
예 14.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
예 14.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}LDAP 서버와 통신하는 TLS 또는 SSL 프로토콜을 사용하려면 LDAP 서버의 root CA 인증서를 취득하고 이를 사용하여 공개 keystore 파일을 생성합니다. 다음 행을 주석 해제 처리하고 공개 keystore 파일로의 완전 경로 및 파일에 액세스하기 위한 암호를 지정합니다.참고
공개 keystore 생성에 대한 보다 자세한 내용은 D.2절. “Manager 및 LDAP 서버 간의 SSL 또는 TLS 연결 설정”에서 참조하십시오.예 14.7. 프로파일 예: keystore 부분
# 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
예 14.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
예 14.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.