CDH| 安全之Sentry权限管理

Sentry概述

cdh版本的hadoop在对数据安全上的处理通常采用Kerberos+Sentry的结构。

kerberos主要负责平台用户的权限管理,sentry则负责数据的权限管理。

Sentry是什么

Apache Sentry是Cloudera公司发布的一个Hadoop开源组件,它提供了细粒度级、基于角色的授权以及多租户的管理模式。

Sentry提供了对Hadoop集群上经过身份验证的用户和应用程序的数据控制和强制执行精确级别权限的功能。Sentry目前可以与Apache Hive,Hive Metastore / HCatalog,Apache Solr,Impala和HDFS(仅限于Hive表数据)一起使用。

Sentry旨在成为Hadoop组件的可插拔授权引擎。它允许自定义授权规则以验证用户或应用程序对Hadoop资源的访问请求。Sentry是高度模块化的,可以支持Hadoop中各种数据模型的授权。
                            

组成:

  

 

[root@hadoop101 software]# mysql -uroot -p123456
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 478
Server version: 5.6.24 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> create database sentry DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.00 sec)

成功完成Sentry的服务添加

SentryHive集成使用

1 Hive的配置中需要配置以下参数

设置sentry.hive.testing.mode 为true

关闭Hive的用户模拟功能

原文地址:https://www.cnblogs.com/shengyang17/p/12741625.html