Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Ranger to desensitize columns in Hive using custom UDF in Kerberos environment

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

How to use Ranger to desensitize columns in Hive in Kerberos environment, many novices are not very clear about this, in order to help you solve this problem, the following small series will explain in detail for everyone, people who have this need can learn, I hope you can gain something.

Here's how to configure Hive column desensitization using custom UDFs in Ranger.

test environment

1. Redhat 7.6

2.CDP DC7.0.3

3. Cluster Kerberos enabled

4. Operation with root user

Desensitization using custom UDFs

2.1 Grant permissions on tables to users

1. Create a policy in Ranger and grant select permission to the test user on t1 table under ranger_test library

2. Query t1 table with test user

Currently user ranger_user1 has select permissions on table t1

2.2 Granting UDF permissions to users

1. Upload the jar package of custom UDF to the server and upload it to HDFS. The role of this custom UDF function is to convert the numbers 1-9 according to a-j.

2. Creating UDF Functions with hive Users

3. Testing the use of UDF functions

4. Log in to Hive with test user and use UDF function, prompt no permissions

5. Create a policy granting test users permission to use the UDF function

6. Verify again with test user, success with UDF function

2.3 Configure column desensitization using custom UDFs

1. Configure desensitization policies to desensitize phone columns using custom UDFs

2. Use ranger_user1 to view the t1 table

As can be seen from the above figure, custom UDF desensitization succeeded.

1. For any UDF function available, you can configure it in a custom way when configuring a desensitization policy, and then specify users/user groups to desensitize.

2. Before creating a desensitization policy, you need to ensure that the corresponding user/user group already has permissions on tables and UDF functions, otherwise the desensitization policy will not grant users/user groups permissions on tables and UDF functions by default.

3. When configuring desensitization policy, select Custom and fill in the UDF function usage mode in the input box, for example: function_name(arg)

Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report