- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Setting a permission in hive databases.
- Labels:
-
Apache Hive
Created 08-19-2016 06:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have 10 applications. Each application has its own databases in hive. Here i want to enable permissions, only the application users can access this application and other users cannot access this application. Like this we want to set permissions to other folders
Can someone help us how we can set a permission's in application wise.
Created 08-19-2016 06:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can do by as below.
1) Create the user at OS level and assign the group and owner to user.
2) Grant all permission to that user only in Hive as below.
Need to login with root use set role admin;
#hive
hive>set role admin; (admin role should have insert update and delete , which ever you want to give)
Hive>use database;
Hive>grant all on table table_name to role os_user_name with grant option;
By this "os_user_name" only can able to access, other wont able to see the tables.
It has worked me at Hive permission level at USER.
Created 08-19-2016 12:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a link to the Hive authorization documentation. This should be helpful for you: https://cwiki.apache.org/confluence/display/Hive/SQL+Standard+Based+Hive+Authorization
You can also do this with Ranger. Here is a tutorial: http://hortonworks.com/hadoop-tutorial/manage-security-policy-hive-hbase-knox-ranger/
Created 08-21-2016 08:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Narasimha Gunturu
if you have different different application then you can set the permission on database level or hive level.
For database level permission you can use following link:-
And you can use ranger to control the persmission.
Created 08-21-2016 09:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Young and Zkfs,
Thanks for your valuable reply. It is very helpful.
