sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasad Mujumdar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SENTRY-470) When the parameter of hive.sentry.server is uppercase string, the command "use default" will cause an error in Hive Server2 side
Date Sun, 05 Oct 2014 06:24:34 GMT

    [ https://issues.apache.org/jira/browse/SENTRY-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14159450#comment-14159450
] 

Prasad Mujumdar commented on SENTRY-470:
----------------------------------------

+1
Looks fine to me.

> When the parameter of hive.sentry.server is uppercase string, the command "use default"
will cause an error in Hive Server2 side
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SENTRY-470
>                 URL: https://issues.apache.org/jira/browse/SENTRY-470
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: guoquanshen
>            Assignee: guoquanshen
>             Fix For: 1.5.0
>
>         Attachments: SENTRY-470.patch
>
>
> The command "use default" will cause an error in Hive Server2 side,but the user has some
privileges on tables in the default database:   
> jdbc:hive2://localhost:10000> use default; 
> Error:  Error  while  compiling  statement:  FAILED:  SemanticException  No  valid  privileges

> (state=42000,code=40000)
> Cause of the problem: 
> When grant privileges, everything are converted to lower case before store to database.

> {code}
> mSentryPrivilege.setServerName(toNULLCol(safeTrimLower(privilege.getServerName())));
> {code} 
> While when match the privileges with the server name when authorizing, it doesn’t do
the 
> same conversion:
> {code} 
> filters.append("&& serverName == \"" + serverName + "\"");
> {code} 
> By default, the server name was: HS2 which is upper case. This caused the corresponding

> privileges not matched for “use database”. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message