forked from apache/hive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HIVE-7673 : Authorization api: missing privilege objects in create ta…
…ble/view (Thejas Nair, reviewed by Jason Dere) git-svn-id: https://svn.apache.org/repos/asf/hive/trunk@1620949 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
Thejas Nair
committed
Aug 27, 2014
1 parent
c0cfefe
commit b71adbd
Showing
200 changed files
with
1,108 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string") | |
TBLPROPERTIES ("hbase.table.name" = "hbase_table_0") | ||
PREHOOK: type: CREATETABLE | ||
PREHOOK: Output: database:hbasedb | ||
PREHOOK: Output: hbaseDB@hbaseDB.hbase_table_0 | ||
PREHOOK: Output: hbaseDB@hbase_table_0 | ||
POSTHOOK: query: -- EXCLUDE_HADOOP_MAJOR_VERSIONS(0.20, 0.20S) | ||
-- Hadoop 0.23 changes the behavior FsShell on Exit Codes | ||
-- In Hadoop 0.20 | ||
|
@@ -37,7 +37,6 @@ WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:string") | |
TBLPROPERTIES ("hbase.table.name" = "hbase_table_0") | ||
POSTHOOK: type: CREATETABLE | ||
POSTHOOK: Output: database:hbasedb | ||
POSTHOOK: Output: [email protected]_table_0 | ||
POSTHOOK: Output: hbaseDB@hbase_table_0 | ||
Found 3 items | ||
#### A masked pattern was here #### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
ql/src/test/queries/clientnegative/authorization_create_view.q
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
set hive.test.authz.sstd.hs2.mode=true; | ||
set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest; | ||
set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator; | ||
set hive.security.authorization.enabled=true; | ||
|
||
set user.name=user3; | ||
create database db1; | ||
use db1; | ||
create table tab1(i int); | ||
|
||
set user.name=user4; | ||
-- create view should fail as view is being created in db that it does not own | ||
create view db1.view1(i) as select * from tab1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
set hive.test.authz.sstd.hs2.mode=true; | ||
set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest; | ||
set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator; | ||
set hive.security.authorization.enabled=true; | ||
|
||
set user.name=user_dbowner; | ||
-- check ctas without db ownership | ||
create database ctas_auth; | ||
|
||
set user.name=user_unauth; | ||
create table t1(i int); | ||
use ctas_auth; | ||
show tables; | ||
create table t2 as select * from default.t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
create database if not exists table_in_database_creation; | ||
create table table_in_database_creation.test1 as select * from src limit 1; | ||
create table `table_in_database_creation.test2` as select * from src limit 1; | ||
create table `table_in_database_creation`.`test2` as select * from src limit 1; | ||
create table table_in_database_creation.test3 (a string); | ||
create table `table_in_database_creation.test4` (a string); | ||
create table `table_in_database_creation`.`test4` (a string); | ||
drop database table_in_database_creation cascade; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.