You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Craig Condit (JIRA)" <ji...@apache.org> on 2014/05/19 19:40:39 UTC
[jira] [Commented] (HIVE-7089) StorageBasedAuthorizationProvider
fails to allow non-admin users to create databases in writable directories
[ https://issues.apache.org/jira/browse/HIVE-7089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14002044#comment-14002044 ]
Craig Condit commented on HIVE-7089:
------------------------------------
This seems to be caused by StorageBassedAuthorizationProvider.authorize(Privilege[], Privilege[]), which is only called in a create database context. Unfortunately, the table is not passed in. Because of this WRITE permissions are checked on the Hive warehouse root, not the database root.
{noformat}
Path root = null;
try {
initWh();
root = wh.getWhRoot();
authorize(root, readRequiredPriv, writeRequiredPriv);
} catch (MetaException ex) {
throw hiveException(ex);
}
{noformat}
> StorageBasedAuthorizationProvider fails to allow non-admin users to create databases in writable directories
> ------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-7089
> URL: https://issues.apache.org/jira/browse/HIVE-7089
> Project: Hive
> Issue Type: Bug
> Affects Versions: 0.13.0
> Reporter: Craig Condit
>
> When attempting to create a database with a custom location and using
> hive.security.authorizationmanager=org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider, an AccessControlException is generated for the default warehouse location, not the location which was given in the create database command.
> {noformat}
> hive> create database test LOCATION '/user/ccondit/test';
> Authorization failed:java.security.AccessControlException: action WRITE not permitted on path hdfs://example.com:8020/apps/hive/warehouse for user ccondit. Use SHOW GRANT to get more details.
> 14/05/19 09:50:59 ERROR ql.Driver: Authorization failed:java.security.AccessControlException: action WRITE not permitted on path hdfs://example.com:8020/apps/hive/warehouse for user ccondit. Use SHOW GRANT to get more details.
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)