了解 sentry-provider.ini 文件语法
Understanding sentry-provider.ini file syntax
哨兵-provider.ini
[groups]
# Assigns each Hadoop group to its set of roles
engineer = engineer_role
ops = ops_role
dev_ops = engineer_role, ops_role
hbase_admin = hbase_admin_role
[roles]
# The following grants all access to source_code.
# "collection = source_code" can also be used as syntactic
# sugar for "collection = source_code->action=*"
engineer_role = collection = source_code->action=*
# The following imply more restricted access.
ops_role = collection = hive_logs->action=Query
dev_ops_role = collection = hbase_logs->action=Query
#give hbase_admin_role the ability to create/delete/modify the hbase_logs collection
#as well as to update the config for the hbase_logs collection, called hbase_logs_config.
hbase_admin_role = collection=admin->action=*, collection=hbase_logs->action=*, config=hbase_logs_config->action=*
我不明白这里使用的语法是什么,它的含义是什么?
这些群体和角色价值从何而来?
为什么一行有两个=符号?
谢谢!
Sentry 依赖于底层身份验证框架来可靠地识别请求用户,即 Kerberos 或 LDAP。这告诉您用户属于哪个 组。
哨兵配置然后定义角色。这是一种间接级别,可让您 share/re-use 跨多个组的权限集。
可以将组分配给一个角色,从而为这些组中的用户提供与该角色关联的权限。
权限 定义在(通常)Hive tables 或 Solr 集合上。这可以在几个级别上完成(服务器、数据库 and/or table 在 Hive 的情况下,或收集在 Solr 的情况下)。
所以下面一行:
engineer_role = collection = source_code->action=*
应该解释为:工程师角色有一个权限,即:对于"source_code"集合,允许所有操作。
与组信息放在一起时:
[groups]
engineer = engineer_role
[roles]
engineer_role = collection = source_code->action=*
这意味着 "engineer" 组中的任何用户(由您的身份验证框架确定)属于 "engineer_role" 角色,因此可以对 "source_code" 集合执行任何操作在 Solr.
Cloudera文档(CDH 5.8)中有更详细的示例:
哨兵-provider.ini
[groups]
# Assigns each Hadoop group to its set of roles
engineer = engineer_role
ops = ops_role
dev_ops = engineer_role, ops_role
hbase_admin = hbase_admin_role
[roles]
# The following grants all access to source_code.
# "collection = source_code" can also be used as syntactic
# sugar for "collection = source_code->action=*"
engineer_role = collection = source_code->action=*
# The following imply more restricted access.
ops_role = collection = hive_logs->action=Query
dev_ops_role = collection = hbase_logs->action=Query
#give hbase_admin_role the ability to create/delete/modify the hbase_logs collection
#as well as to update the config for the hbase_logs collection, called hbase_logs_config.
hbase_admin_role = collection=admin->action=*, collection=hbase_logs->action=*, config=hbase_logs_config->action=*
我不明白这里使用的语法是什么,它的含义是什么? 这些群体和角色价值从何而来? 为什么一行有两个=符号?
谢谢!
Sentry 依赖于底层身份验证框架来可靠地识别请求用户,即 Kerberos 或 LDAP。这告诉您用户属于哪个 组。
哨兵配置然后定义角色。这是一种间接级别,可让您 share/re-use 跨多个组的权限集。
可以将组分配给一个角色,从而为这些组中的用户提供与该角色关联的权限。
权限 定义在(通常)Hive tables 或 Solr 集合上。这可以在几个级别上完成(服务器、数据库 and/or table 在 Hive 的情况下,或收集在 Solr 的情况下)。
所以下面一行:
engineer_role = collection = source_code->action=*
应该解释为:工程师角色有一个权限,即:对于"source_code"集合,允许所有操作。
与组信息放在一起时:
[groups]
engineer = engineer_role
[roles]
engineer_role = collection = source_code->action=*
这意味着 "engineer" 组中的任何用户(由您的身份验证框架确定)属于 "engineer_role" 角色,因此可以对 "source_code" 集合执行任何操作在 Solr.
Cloudera文档(CDH 5.8)中有更详细的示例: