Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Sentry access grants on hdfs uri

Sentry access grants on hdfs uri

Explorer

I have few questions on granting access prvilege on hdfs uri as part of sentry integration (hive,hdfs).

 

1) Is it possible to grant read only privilege on hdfs uri? ( when i do grant select on hdfs uri it is giving all privilege (*) on the uri). 

 

2) If i want to give full permission for a hive db on the hdfs uri do i need to specify  * at the end so that all the underlying tables will also have that permission ( grant all on uri 'hdfs://namespace/production/test_db/* to role ...) or is it ok if i grant only on the db path ( grant all on uri 'hdfs://namespace/production/test_db to role ... ), so that tables created under will also inherit this privileges?

 

1 REPLY 1
Highlighted

Re: Sentry access grants on hdfs uri

Contributor

Hi,

 

1.) I think there is Jira SENTRY-862 open for that, but currently the ALL privilege is the only possibility.

They say there: "We support only "all" on URI by design. I do not remember exactly what were the various reasons. But, mainly because we do not deal with explicit select/insert to uri from hive sql."

To better put in scope, the URI grants were mostly needed because of LOAD DATA statements, and that statement also needs to write that path (move the files away from that location too).

 

2.) If you use managed tables, you can easily give permission just for the DB, and you do not need to specify the wildcard (*). If you use external tables, you also need to give permissions for the URI too, and you also do not need to specify the wildcard (*), because it will be applied to all sub-paths starting from that.

 

Hope this helps,

 

Cheers

Miklos Szurap

Customer Operations Engineer, Cloudera