Kudu

[Kudu] Apache Ranger로 권한 제어

Sencia 2021. 4. 13. 18:29
반응형

공식 doc: docs.cloudera.com/runtime/7.2.1/administering-kudu/topics/kudu-security-configuring-kudu-integration-with-apache-ranger.html

 

Configuring Kudu's integration with Apache Ranger

Apache Ranger has wider adoption and provides a more comprehensive security features (such as attribute based access control, audit, etc) than Sentry. This topic provides information to configure Kudu with Apache Ranger. note Ranger is often configured wit

docs.cloudera.com

 

  • 보통 Kerberos와 같이 사용
  • Cloudera manager 7.2.1  

절차

  1. 소스에서 Kudu를 빌드 한 후 kudu-subprocess.jar를 빌드 디렉토리 (예 : build / release / bin)에서 찾습니다. 
    해당 경로는 Kudu가 Ranger 서버와 통신하는 데 사용할 Ranger 클라이언트를 포함하는 Ranger 하위 프로세스를 포함하는 JAR 파일의 경로입니다.
  2.  kudu table list도구를 사용하여 Ranger와 호환되지 않는 클러스터에서 마침표 (.)로 시작하거나 끝나는 이름 인 테이블 이름을 찾습니다. 또한 권한은 대소 문자를 구분하지 않으므로 대소 문자 만 다른 두 개의 테이블 이름이 없는지 확인하십시오.요구 사항을 준수하지 않는 테이블의 경우 kudu table rename_table도구를 사용 하여 테이블 이름을 바꿉니다.
  3. Ranger 클라이언트 ranger-kudu-security.xml구성 파일을 만들고이 파일이 포함 된 디렉터리를 기록해 둡니다.

<property>
  <name>ranger.plugin.kudu.policy.cache.dir</name>
  <value>policycache</value>
  <description>Directory where Ranger policies are cached after successful retrieval from the Ranger service</description>
</property>
<property>
  <name>ranger.plugin.kudu.service.name</name>
  <value>kudu</value>
  <description>Name of the Ranger service repository storing policies for this Kudu cluster</description>
</property>
<property>
  <name>ranger.plugin.kudu.policy.rest.url</name>
  <value>http://host:port</value>
  <description>Ranger Admin URL</description>
</property>
<property>
  <name>ranger.plugin.kudu.policy.source.impl</name>
  <value>org.apache.ranger.admin.client.RangerAdminRESTClient</value>
  <description>Ranger client implementation to retrieve policies from the Ranger service</description>
</property>
<property>
  <name>ranger.plugin.kudu.policy.rest.ssl.config.file</name>
  <value>ranger-kudu-policymgr-ssl.xml</value>
  <description>Path to the file containing SSL details to connect Ranger Admin</description>
</property>
<property>
  <name>ranger.plugin.kudu.policy.pollIntervalMs</name>
  <value>30000</value>
  <description>Ranger client policy polling interval</description>
</property>

   4. Ranger Admin에 대해 SSL이 활성화된 ranger-kudu-policymgr-ssl.xml을 다음 구성을 사용하여 Ranger 클라이언트 구성 디렉토리에 추가합니다. 

<property>
  <name>xasecure.policymgr.clientssl.keystore</name>
  <value>[/path/to/keystore].jks</value>
  <description>Java keystore files</description>
</property>
<property>
  <name>xasecure.policymgr.clientssl.keystore.credential.file</name>
  <value>jceks://file/[path/to/credentials].jceks</value>
  <description>Java keystore credential file</description>
</property>
<property>
  <name>xasecure.policymgr.clientssl.truststore</name>
  <value>[/path/to/truststore].jks</value>
  <description>Java truststore file</description>
</property>
<property>
  <name>xasecure.policymgr.clientssl.truststore.credential.file</name>
  <value>jceks://file/[path/to/credentials].jceks</value>
  <description>Java truststore credential file</description>
</property>

   5. Kudu master에 아래와 같이 설정합니다. 

# The path to directory containing Ranger client configuration. This example
# assumes the path is '/kudu/ranger-config'.
--ranger_config_path=/kudu/ranger-config

# The path where the Java binary was installed. This example assumes
# '$JAVA_HOME=/usr/local'
--ranger_java_path=/usr/local/bin/java

# The path to the JAR file containing the Ranger subprocess. This example
# assumes '$KUDU_HOME=/kudu'
--ranger_jar_path=/kudu/build/release/bin/kudu-subprocess.jar

# This example ACL setup allows the 'impala' user to access all data stored in
# Kudu, assuming Impala will authorize requests on its own. The 'kudu' user is
# also granted access to all Kudu data, which may facilitate testing and
# debugging (such as running the 'kudu cluster ksck' tool).
--trusted_user_acl=impala,kudu

   6. tablet에서 아래와 같이 설정합니다. 

--tserver_enforce_access_control=true

   7. Ranger Admin 웹 UI를 통해 다음 구성으로 Kudu 서비스 저장소를 추가합니다.

# This example setup configures the Kudu service user as a privileged user to be
# able to retrieve authorization policies stored in Ranger.

<property>
  <name>policy.download.auth.users</name>
  <value>kudu</value>
</property>
반응형