CN113591143A - 一种限制客户端IP读写HBase表的控制方法 - Google Patents

一种限制客户端IP读写HBase表的控制方法 Download PDF

Info

Publication number
CN113591143A
CN113591143A CN202110765975.3A CN202110765975A CN113591143A CN 113591143 A CN113591143 A CN 113591143A CN 202110765975 A CN202110765975 A CN 202110765975A CN 113591143 A CN113591143 A CN 113591143A
Authority
CN
China
Prior art keywords
hbase
region
regionserver
zookeeper
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202110765975.3A
Other languages
English (en)
Inventor
王守明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan XW Bank Co Ltd
Original Assignee
Sichuan XW Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan XW Bank Co Ltd filed Critical Sichuan XW Bank Co Ltd
Priority to CN202110765975.3A priority Critical patent/CN113591143A/zh
Publication of CN113591143A publication Critical patent/CN113591143A/zh
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

本发明公开了一种限制客户端IP读写HBase表的控制方法,属于大数据信息技术领域,解决了传统技术中维护成本高,过程复杂的问题,其包括:步骤A:保证HBase集群服务正常,同时HBaes依赖Zookeeper处于正常运行状态;步骤B:在HBase集群的配置文件hbase‑site.xml中找到标签为Zookeeper.znode.parent的HBase的根节点名称;步骤C:在Hbase集群中的根节点通过IP限制指令,使除目标IP以外的IP无权访问Hbase,实现了简化操作与维护过程、增强权限认证服务的实用性的技术效果。

Description

一种限制客户端IP读写HBase表的控制方法
技术领域
本发明属于大数据信息技术领域,具体涉及一种限制客户端IP读写HBase表的控制方法。
背景技术
HBase是一种构建在HDFS之上的分布式、面向列的开源存储系统,是Apache的Hadoop项目的子项目。HBase不同于一般的关系数据库,它是一个适合于非结构化数据存储的数据库。
随着大数据时代的到来,数据量日益剧增,传统的业务数据库已经不能满足人们的需求,HBase具有着极易的扩展性,能在PB级别的数据以及采用廉价PC存储的情况下,能在几十到百毫秒内返回数据,为处理海量数据提过了便利,然而也面临着众多的挑战,特别是在大数据时代,保证数据的安全性显得尤为重要,因此对Hbase数据的访问控制成为了一个很重要的需求。
HBase的权限管理大多数都是通过HBase自带的权限管理模块来进行权限约束,且权限控制实体是用户和用户组,类似关系型数据库,都提供了一种限制IP访问的方法,如通过使用命令GRANT ALL PRIVILEGES ON *.* TO 'root'@'IP地址' IDENTIFIED BY 'youpassword' WITH GRANT OPTION来实现;但HBase没有实现对客户端IP的限制。现有的技术方案也只有通过添加额外的Kerberos认证服务来实现,但Kerberos安装和维护成本极高,同时开发人员在连接HBase的代码中,需要先开发Kerberos认证程序,过程过于复杂。
发明内容
针对现有技术中维护成本高,过程复杂的问题,本发明提供一种限制客户端IP读写HBase表的控制方法,其目的在于:简化操作与维护过程、增强权限认证服务的实用性。
本发明采用的技术方案如下:
一种限制客户端IP读写HBase表的控制方法,包括以下步骤:
步骤A:保证HBase集群服务正常,同时HBaes以来Zookeeper处于正常运行状态;
步骤B:在HBase集群的配置文件hbase-site.xml中找到标签为zookeeper;
步骤C:在Hbase集群中的根节点通过IP限制指令,使除目标IP以外的IP无权访问Hbase
采用上述方案,无需添加额外的权限认证服务,操作和维护及其方便,实用性强,更易于推广。
所述步骤B的具体步骤为:
步骤B1:Client访问zookeeper中的meta-region-server节点,获取元数据存储所在的regionserver;
步骤B2:通过刚刚获取的地址访问对应的regionserver,拿到对应的表存储的regionserver;
步骤B3:在表所在的regionserver进行数据的读取
步骤B4:找到数据之后会先缓存到blockcache中,再将结果返回。
所述步骤C4的具体步骤为:
步骤C1:在Hbase集群的配置文件hbase-site.xml中找到标签为zookeeper.znode.parent的HBase的根节点名称。
步骤:C2:使用命令setAcl /hbase/meta-region-server ip:192.168.0.110:cdrwa,如果有多个IP可以使用英文逗号拼接,完成对IP的锁定。
采用上述方案,通过实现的权限控制,权限设置生效后,用户之前写的应用程序,如果客户端IP是合法的将无需修改代码。
所述步骤C1的具体步骤为:
步骤C11:Client访问zookeeper中的meta-region-server节点,获取元数据存储所在的regionserver;
步骤C12:通过刚刚获取的地址访问对应的regionserver,拿到对应的表存储的regionserver;
步骤C13:在表所在的regionserver进行数据的添加;
步骤C14:查找对应的region,在region中寻找列族,先向memstore中写入数据;
步骤C15:当memstore写入的值变多,触发溢写操作(flush),进行文件的溢写,成为一个StoreFile;
步骤C16:当溢写的文件过多时,触发文件的合并操作。
综上所述,由于采用了上述技术方案,本发明的有益效果是:
1. 无需添加额外的权限认证服务,操作和维护及其方便,实用性强,更易于推广;
2.通过实现的权限控制,权限设置生效后,用户之前写的应用程序,如果客户端IP是合法的将无需修改代码。
附图说明
本发明将通过例子并参照附图的方式说明,其中:
图1是本发明的一种实施方式的整体流程图。
具体实施方式
本说明书中公开的所有特征,或公开的所有方法或过程中的步骤,除了互相排斥的特征和/或步骤以外,均可以以任何方式组合。
下面结合图1对本发明作详细说明。
实施例一:
一种限制客户端IP读写HBase表的控制方法,包括以下步骤:
步骤A:保证HBase集群服务正常,同时HBaes以来Zookeeper处于正常运行状态;
步骤B:在HBase集群的配置文件hbase-site.xml中找到标签为zookeeper;
步骤C:在Hbase集群中的根节点通过IP限制指令,使除目标IP以外的IP无权访问Hbase
所述步骤B的具体步骤为:
步骤B1:Client访问zookeeper中的meta-region-server节点,获取元数据存储所在的regionserver;
步骤B2:通过刚刚获取的地址访问对应的regionserver,拿到对应的表存储的regionserver;
步骤B3:在表所在的regionserver进行数据的读取
步骤B4:找到数据之后会先缓存到blockcache中,再将结果返回。
所述步骤C4的具体步骤为:
步骤C1:在Hbase集群的配置文件hbase-site.xml中找到标签为zookeeper.znode.parent的HBase的根节点名称。
步骤:C2:使用命令setAcl /hbase/meta-region-server ip:192.168.0.110:cdrwa,如果有多个IP可以使用英文逗号拼接,完成对IP的锁定。
所述步骤C1的具体步骤为:
步骤C11:Client访问zookeeper中的meta-region-server节点,获取元数据存储所在的regionserver;
步骤C12:通过刚刚获取的地址访问对应的regionserver,拿到对应的表存储的regionserver;
步骤C13:在表所在的regionserver进行数据的添加;
步骤C14:查找对应的region,在region中寻找列族,先向memstore中写入数据;
步骤C15:当memstore写入的值变多,触发溢写操作(flush),进行文件的溢写,成为一个StoreFile;
步骤C16:当溢写的文件过多时,触发文件的合并操作。
在上述实施例一中,访问Hbase表,需要连接ZooKeeper中/hbase/meta-region-server节点,获取元数据的Region信息.本发明是通过设置/hbase/meta-region-server节点的ACL权限,来实现限制客户端IP来访问HBase表,其中ACL用于控制资源的访问权限,ZooKeeper实用ACL来控制其znode的访问;
Zookeeper的ACL分为三个维度,分别为scheme、id、permission,通常表示为scheme:id:permission,其中scheme代表授权策略,id代表用户,permission代表权限;
在实施例一种,通过步骤C2,setAcl /hbase/meta-region-server ip:192.168.0.110:cdrwa表示IP地址192.168.0.110客户端对/hbase/meta-region-serve有所有的权限;
以上所述实施例仅表达了本申请的具体实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请保护范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请技术方案构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。

Claims (4)

1.一种限制客户端IP读写HBase表的控制方法,其特征在于,包括以下步骤:
步骤A:保证HBase集群服务正常,同时HBaes依赖Zookeeper处于正常运行状态;
步骤B:在HBase集群的配置文件hbase-site.xml中找到标签为Zookeeper.znode.parent的HBase的根节点名称;
步骤C:在Hbase集群中的根节点通过IP限制指令,使除目标IP以外的IP无权访问Hbase。
2.根据权利要求1所述的一种限制客户端IP读写HBase表的控制方法,其特征在于,所述步骤B的具体步骤为:
步骤B1:Client访问zookeeper中的meta-region-server节点,获取元数据存储所在的regionserver;
步骤B2:通过刚刚获取的地址访问对应的regionserver,拿到对应的表存储的regionserver;
步骤B3:在表所在的regionserver进行数据的读取
步骤B4:找到数据之后会先缓存到blockcache中,再将结果返回。
3.根据权利要求1所述的一种限制客户端IP读写HBase表的控制方法,其特征在于,所述步骤C4的具体步骤为:
步骤C1:在Hbase集群的配置文件hbase-site.xml中找到标签为zookeeper.znode.parent的HBase的根节点名称;
步骤 C2:使用命令setAcl /hbase/meta-region-server ip:192.168.0.110:cdrwa,如果有多个IP可以使用英文逗号拼接,完成对IP的锁定。
4.根据权利要求1所述的一种限制客户端IP读写HBaes表的控制方法,其特征在于,所述步骤C1的具体步骤为:
步骤C11:Client访问zookeeper中的meta-region-server节点,获取元数据存储所在的regionserver;
步骤C12:通过刚刚获取的地址访问对应的regionserver,拿到对应的表存储的regionserver;
步骤C13:在表所在的regionserver进行数据的添加;
步骤C14:查找对应的region,在region中寻找列族,先向memstore中写入数据;
步骤C15:当memstore写入的值变多,触发溢写操作(flush),进行文件的溢写,成为一个StoreFile;
步骤C16:当溢写的文件过多时,触发文件的合并操作。
CN202110765975.3A 2021-07-07 2021-07-07 一种限制客户端IP读写HBase表的控制方法 Withdrawn CN113591143A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110765975.3A CN113591143A (zh) 2021-07-07 2021-07-07 一种限制客户端IP读写HBase表的控制方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110765975.3A CN113591143A (zh) 2021-07-07 2021-07-07 一种限制客户端IP读写HBase表的控制方法

Publications (1)

Publication Number Publication Date
CN113591143A true CN113591143A (zh) 2021-11-02

Family

ID=78246063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110765975.3A Withdrawn CN113591143A (zh) 2021-07-07 2021-07-07 一种限制客户端IP读写HBase表的控制方法

Country Status (1)

Country Link
CN (1) CN113591143A (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868370A (zh) * 2016-03-31 2016-08-17 南京烽火软件科技有限公司 读写分离的HBase入库装置及方法
CN106330836A (zh) * 2015-07-01 2017-01-11 北京京东尚科信息技术有限公司 一种服务端对客户端的访问控制方法
CN106326766A (zh) * 2016-08-16 2017-01-11 陈亮 一种HBase数据读取控制方法
CN108270718A (zh) * 2016-12-30 2018-07-10 北京观数科技有限公司 一种基于Hadoop集群的控制方法和系统
CN110287172A (zh) * 2019-07-01 2019-09-27 四川新网银行股份有限公司 一种格式化HBase数据的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106330836A (zh) * 2015-07-01 2017-01-11 北京京东尚科信息技术有限公司 一种服务端对客户端的访问控制方法
CN105868370A (zh) * 2016-03-31 2016-08-17 南京烽火软件科技有限公司 读写分离的HBase入库装置及方法
CN106326766A (zh) * 2016-08-16 2017-01-11 陈亮 一种HBase数据读取控制方法
CN108270718A (zh) * 2016-12-30 2018-07-10 北京观数科技有限公司 一种基于Hadoop集群的控制方法和系统
CN110287172A (zh) * 2019-07-01 2019-09-27 四川新网银行股份有限公司 一种格式化HBase数据的方法

Similar Documents

Publication Publication Date Title
US11625501B2 (en) Masking sensitive information in records of filtered accesses to unstructured data
CN109643242B (zh) 用于多租户hadoop集群的安全设计和架构
US10469501B2 (en) Multi-protocol access control lists
EP3539021B1 (en) Formation and manipulation of test data in a database system
US9081978B1 (en) Storing tokenized information in untrusted environments
US9767268B2 (en) Optimizing a compiled access control table in a content management system
US10650032B1 (en) Filtering pipeline optimizations for unstructured data
US20180145983A1 (en) Distributed data storage system using a common manifest for storing and accessing versions of an object
US20160098573A1 (en) Securing a Distributed File System
WO2008154032A1 (en) Secure hosted databases
US10664508B1 (en) Server-side filtering of unstructured data items at object storage services
WO2015013745A1 (en) Systems and methodologies for managing document access permissions
JP2014102822A (ja) 特定のデータ・ストアに安全にアクセスするためのプロセッサ実装方法、データ・ストアを安全にするためのコンピュータ・プログラムおよびコンピュータ・システム(データにアクセスするためのコンテキストベース・セキュリティ・スクリーニング)
CN113051268A (zh) 数据查询方法、数据查询装置、电子设备及存储介质
US20170154039A1 (en) Enabling a hadoop file system with posix compliance
US11934548B2 (en) Centralized access control for cloud relational database management system resources
CN114647825A (zh) 访问权限控制方法、装置、电子设备和计算机存储介质
US8396858B2 (en) Adding entries to an index based on use of the index
US9116911B2 (en) Remote file sharing based on content filtering
US10733316B2 (en) Pluggable database lockdown profile
US10142344B2 (en) Credential management system
US11500943B2 (en) Method and system for cached early-binding document search
US11500837B1 (en) Automating optimizations for items in a hierarchical data store
US20170270316A1 (en) Protecting search privacy using policy-based search terms
WO2023196304A1 (en) Row, column level security for data lakes and its uniform enforcement across analytic query engines

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20211102