• Hbase-10-权限管理


    授权范围:

    名称 描述
    Superuser 超级账号可以进行任何操作,运行HBase服务的账号默认是 Superuser。也可以通过在hbase-site.xml中配置hbase.superuser的值可以添加超级账号。
    Global Global Scope拥有集群所有table的Admin权限。
    Namespace 在Namespace Scope进行相关权限控制。
    Table 在Table Scope进行相关权限控制。
    ColumnFamily 在ColumnFamily Scope进行相关权限控制。
    Cell 在Cell Scope进行相关权限控制。

    Grant 授权

    Grant users specific rights.
    Syntax: grant <user or @group>, <permissions> [, <table> [, <column family> [, <column qualifier>]]]
    Syntax: grant <user or @group>, <permissions>, <@namespace>
    
    permissions is either zero or more letters from the set "RWXCA".
    READ('R'), WRITE('W'), EXEC('X'), CREATE('C'), ADMIN('A')
    
    Note: Groups and users are granted access in the same way, but groups are prefixed with an '@'
          character. Tables and namespaces are specified the same way, but namespaces are
          prefixed with an '@' character.
    
    For example:
    
        hbase> grant 'bobsmith', 'RWXCA'
        hbase> grant '@admins', 'RWXCA'
        hbase> grant 'bobsmith', 'RWXCA', '@ns1'
        hbase> grant 'bobsmith', 'RW', 't1', 'f1', 'col1'
        hbase> grant 'bobsmith', 'RW', 'ns1:t1', 'f1', 'col1'
    

    我们可以从RWXCA组,其中给予零个或多个特权给用户

    • R - 代表读取权限
    • W - 代表写权限
    • X - 代表执行权限
    • C - 代表创建权限
    • A - 代表管理权限

    revoke 删除权限

    revoke命令用于撤销用户访问表的权限。它的语法如下:

    hbase:002:0> help "revoke"
    Revoke a user's access rights.
    Syntax: revoke <user or @group> [, <table> [, <column family> [, <column qualifier>]]]
    Syntax: revoke <user or @group>, <@namespace>
    
    Note: Groups and users access are revoked in the same way, but groups are prefixed with an '@'
          character. Tables and namespaces are specified the same way, but namespaces are
          prefixed with an '@' character.
    
    For example:
    
        hbase> revoke 'bobsmith'
        hbase> revoke '@admins'
        hbase> revoke 'bobsmith', '@ns1'
        hbase> revoke 'bobsmith', 't1', 'f1', 'col1'
        hbase> revoke 'bobsmith', 'ns1:t1', 'f1', 'col1'
    

    user_permission 查询权限

    hbase:001:0> help "user_permission"
    Show all permissions for the particular user.
    Syntax : user_permission <table>
    
    Note: A namespace must always precede with '@' character.
    
    For example:
    
        hbase> user_permission
        hbase> user_permission '@ns1'
        hbase> user_permission '@.*'
        hbase> user_permission '@^[a-c].*'
        hbase> user_permission 'table1'
        hbase> user_permission 'namespace1:table1'
        hbase> user_permission '.*'
        hbase> user_permission '^[A-C].*'
    
    不要小瞧女程序员
  • 相关阅读:
    基于NPOI的报表引擎——ExcelReport
    XML数据源快速开发框架——XmlFramwork
    SqlExcel使用文档及源码
    第三篇:属性_第二节:控件属性在页面及源码中的表示方式
    第三篇:属性_第一节:控件属性与属性的持久化
    第二篇:呈现内容_第四节:个性化自定义控件
    第二篇:呈现内容_第三节:CompositeControl呈现
    Web用户控件开发--星型评分控件
    iOS 统计Xcode整个工程的代码行数
    iOS开发中的火星坐标系及各种坐标系转换算法
  • 原文地址:https://www.cnblogs.com/shix0909/p/15049616.html
Copyright © 2020-2023  润新知