You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Adam Holley (Code Review)" <ge...@cloudera.org> on 2018/04/10 17:22:42 UTC

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Adam Holley has uploaded this change for review. ( http://gerrit.cloudera.org:8080/9972


Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................

IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

This change add the last two privileges at the SERVER level.

grant select on server to ROLE test_role;
grant insert on server to ROLE test_role

Testing:
Added tests to cover server level select and insert.
Ran all front-end tests.

Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
---
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
3 files changed, 138 insertions(+), 30 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/72/9972/1
-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 1
Gerrit-Owner: Adam Holley <gi...@holleyism.com>

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Fredy Wijaya (Code Review)" <ge...@cloudera.org>.
Fredy Wijaya has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 4: Code-Review+1


-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 4
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Comment-Date: Tue, 10 Apr 2018 19:17:21 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 6: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 6
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Apr 2018 23:57:53 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................

IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

This change add the last two privileges at the SERVER level.

GRANT SELECT ON SERVER TO ROLE test_role;
REVOKE SELECT ON SERVER FROM ROLE test_role;
GRANT INSERT ON SERVER TO ROLE test_role
REVOKE INSERT ON SERVER FROM ROLE test_role

Testing:
Added tests to cover server level select and insert.
Ran all front-end tests.

Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Reviewed-on: http://gerrit.cloudera.org:8080/9972
Reviewed-by: Alex Behm <al...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
3 files changed, 179 insertions(+), 29 deletions(-)

Approvals:
  Alex Behm: Looks good to me, approved
  Impala Public Jenkins: Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 7
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 6: Code-Review+2

Needed a rebase. Retrying.


-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 6
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Apr 2018 20:21:18 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/9972/4/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
File fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java:

http://gerrit.cloudera.org:8080/#/c/9972/4/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2761
PS4, Line 2761:       AuthzOk("insert into functional.alltypes partition (month, year) " +
Also add one negative here and below that shows that INSERT at SERVER does not give ALTER or similar.


http://gerrit.cloudera.org:8080/#/c/9972/4/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2851
PS4, Line 2851:       // Insert allows view_metadata
SELECT



-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 4
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Comment-Date: Tue, 10 Apr 2018 22:41:21 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Adam Holley (Code Review)" <ge...@cloudera.org>.
Adam Holley has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................

IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

This change add the last two privileges at the SERVER level.

GRANT SELECT ON SERVER TO ROLE test_role;
REVOKE SELECT ON SERVER FROM ROLE test_role;
GRANT INSERT ON SERVER TO ROLE test_role
REVOKE INSERT ON SERVER FROM ROLE test_role

Testing:
Added tests to cover server level select and insert.
Ran all front-end tests.

Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
---
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
3 files changed, 156 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/72/9972/4
-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 4
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 5: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/2291/


-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 5
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Apr 2018 20:18:53 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Fredy Wijaya (Code Review)" <ge...@cloudera.org>.
Fredy Wijaya has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 1:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
File fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java:

http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@a614
PS1, Line 614: 
             : 
             : 
             : 
> functional_complex_view_sub does not exist so this test is already covered 
We still need a test case where a user has only SELECT privilege for a view that exists. Can we update this test with that scenario instead?


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@758
PS1, Line 758:     AuthzError("insert into functional.alltypes partition (month, year) select id, " +
             :         "bool_col, tinyint_col, smallint_col, a.int_col, bigint_col, float_col, " +
             :         "a.double_col, a.date_string_col, a.string_col, a.timestamp_col, a.year, " +
             :         "a.month from functional_rc.alltypesagg a join (select int_col, " +
             :         "double_col, date_string_col, string_col, timestamp_col, year, month " +
             :         "from functional_seq.alltypes) b on (a.int_col = b.int_col)", "User '%s' does " +
             :         "not have privileges to execute 'SELECT' on: functional_rc.alltypesagg");
> The sql as written would not execute successfully even if authorization was
Can we format this SQL to make it more readable?


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2750
PS1, Line 2750:       // ensure they succeed here.  Some tests that fail will fail here with
nit: remove extra space bore "Some"


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2758
PS1, Line 2758:       AuthzOk("insert into functional.alltypes partition (month, year) select id, " +
nit: format this SQL to be more readable.


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2772
PS1, Line 2772:       AuthzOk("insert into functional.alltypes partition (month, year) " +
Add tests for any statements that require VIEW_METADATA.


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2774
PS1, Line 2774: 
nit: remove new line.


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2809
PS1, Line 2809:               + "join functional.alltypes b ON (a.id = b.id)");
nit: fix indentation


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2835
PS1, Line 2835:       AuthzOk("select a.* from functional.alltypesagg a cross join " +
Add tests for any statements that require VIEW_METADATA.



-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 1
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Comment-Date: Tue, 10 Apr 2018 17:33:12 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Adam Holley (Code Review)" <ge...@cloudera.org>.
Adam Holley has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 4:

(2 comments)

updated

http://gerrit.cloudera.org:8080/#/c/9972/4/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
File fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java:

http://gerrit.cloudera.org:8080/#/c/9972/4/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2761
PS4, Line 2761:       AuthzOk("insert into functional.alltypes partition (month, year) " +
> Also add one negative here and below that shows that INSERT at SERVER does 
Done


http://gerrit.cloudera.org:8080/#/c/9972/4/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2851
PS4, Line 2851:       // Insert allows view_metadata
> SELECT
Done



-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 4
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Apr 2018 16:17:58 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 6:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/2301/


-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 6
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Apr 2018 20:22:03 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Fredy Wijaya (Code Review)" <ge...@cloudera.org>.
Fredy Wijaya has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/9972/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/9972/2//COMMIT_MSG@11
PS2, Line 11: grant select on server to ROLE test_role;
nit: for consistency, change this to: GRANT SELECT ON SERVER TO ROLE test_role;


http://gerrit.cloudera.org:8080/#/c/9972/2//COMMIT_MSG@12
PS2, Line 12: grant insert on server to ROLE test_role
nit: for consistency, change this to: GRANT INSERT ON SERVER TO ROLE test_role;



-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 2
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Comment-Date: Tue, 10 Apr 2018 19:08:27 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 5:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/2291/


-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 5
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Apr 2018 16:22:03 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Adam Holley (Code Review)" <ge...@cloudera.org>.
Adam Holley has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 5: Code-Review+1

carry +1


-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 5
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Apr 2018 16:19:21 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Adam Holley (Code Review)" <ge...@cloudera.org>.
Adam Holley has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/9972/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/9972/2//COMMIT_MSG@11
PS2, Line 11: grant select on server to ROLE test_role;
> nit: for consistency, change this to: GRANT SELECT ON SERVER TO ROLE test_r
Done


http://gerrit.cloudera.org:8080/#/c/9972/2//COMMIT_MSG@12
PS2, Line 12: grant insert on server to ROLE test_role
> nit: for consistency, change this to: GRANT INSERT ON SERVER TO ROLE test_r
Done



-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 2
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Comment-Date: Tue, 10 Apr 2018 19:10:17 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Adam Holley (Code Review)" <ge...@cloudera.org>.
Adam Holley has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 1:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
File fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java:

http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@a614
PS1, Line 614: 
             : 
             : 
             : 
> We still need a test case where a user has only SELECT privilege for a view
Done


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@758
PS1, Line 758:     AuthzError("insert into functional.alltypes partition (month, year) select id, " +
             :         "bool_col, tinyint_col, smallint_col, a.int_col, bigint_col, float_col, " +
             :         "a.double_col, a.date_string_col, a.string_col, a.timestamp_col, a.year, " +
             :         "a.month from functional_rc.alltypesagg a join (select int_col, " +
             :         "double_col, date_string_col, string_col, timestamp_col, year, month " +
             :         "from functional_seq.alltypes) b on (a.int_col = b.int_col)", "User '%s' does " +
             :         "not have privileges to execute 'SELECT' on: functional_rc.alltypesagg");
> Can we format this SQL to make it more readable?
Done


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2750
PS1, Line 2750:       // ensure they succeed here.  Some tests that fail will fail here with
> nit: remove extra space bore "Some"
Disagree but done.


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2758
PS1, Line 2758:       AuthzOk("insert into functional.alltypes partition (month, year) select id, " +
> nit: format this SQL to be more readable.
Done


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2772
PS1, Line 2772:       AuthzOk("insert into functional.alltypes partition (month, year) " +
> Add tests for any statements that require VIEW_METADATA.
Done


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2774
PS1, Line 2774: 
> nit: remove new line.
Done


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2809
PS1, Line 2809:               + "join functional.alltypes b ON (a.id = b.id)");
> nit: fix indentation
Done


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@2835
PS1, Line 2835:       AuthzOk("select a.* from functional.alltypesagg a cross join " +
> Add tests for any statements that require VIEW_METADATA.
Done



-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 1
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Comment-Date: Tue, 10 Apr 2018 19:05:04 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Adam Holley (Code Review)" <ge...@cloudera.org>.
Adam Holley has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................

IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

This change add the last two privileges at the SERVER level.

grant select on server to ROLE test_role;
grant insert on server to ROLE test_role

Testing:
Added tests to cover server level select and insert.
Ran all front-end tests.

Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
---
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
3 files changed, 156 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/72/9972/2
-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 2
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Adam Holley (Code Review)" <ge...@cloudera.org>.
Adam Holley has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
File fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java:

http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@a614
PS1, Line 614: 
             : 
             : 
             : 
functional_complex_view_sub does not exist so this test is already covered by // Select from non-existent table.


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@a651
PS1, Line 651: 
             : 
             : 
             : 
functional_complex_view_sub does not exist so this test is already covered by // Select from non-existent table.


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@704
PS1, Line 704: a 
Minor correct to make this test fail purely from authorization and not analysis.


http://gerrit.cloudera.org:8080/#/c/9972/1/fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java@758
PS1, Line 758:     AuthzError("insert into functional.alltypes partition (month, year) select id, " +
             :         "bool_col, tinyint_col, smallint_col, a.int_col, bigint_col, float_col, " +
             :         "a.double_col, a.date_string_col, a.string_col, a.timestamp_col, a.year, " +
             :         "a.month from functional_rc.alltypesagg a join (select int_col, " +
             :         "double_col, date_string_col, string_col, timestamp_col, year, month " +
             :         "from functional_seq.alltypes) b on (a.int_col = b.int_col)", "User '%s' does " +
             :         "not have privileges to execute 'SELECT' on: functional_rc.alltypesagg");
The sql as written would not execute successfully even if authorization was allowed.  Fixed to make it a purely authorization error.



-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 1
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Comment-Date: Tue, 10 Apr 2018 17:22:46 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Adam Holley (Code Review)" <ge...@cloudera.org>.
Adam Holley has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................

IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

This change add the last two privileges at the SERVER level.

GRANT SELECT ON SERVER TO ROLE test_role;
GRANT INSERT ON SERVER TO ROLE test_role

Testing:
Added tests to cover server level select and insert.
Ran all front-end tests.

Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
---
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
3 files changed, 156 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/72/9972/3
-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 3
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................


Patch Set 5: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 5
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Apr 2018 16:21:26 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

Posted by "Adam Holley (Code Review)" <ge...@cloudera.org>.
Adam Holley has uploaded a new patch set (#5). ( http://gerrit.cloudera.org:8080/9972 )

Change subject: IMPALA-6804: Allow SELECT and INSERT privileges on SERVER
......................................................................

IMPALA-6804: Allow SELECT and INSERT privileges on SERVER

This change add the last two privileges at the SERVER level.

GRANT SELECT ON SERVER TO ROLE test_role;
REVOKE SELECT ON SERVER FROM ROLE test_role;
GRANT INSERT ON SERVER TO ROLE test_role
REVOKE INSERT ON SERVER FROM ROLE test_role

Testing:
Added tests to cover server level select and insert.
Ran all front-end tests.

Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
---
M fe/src/main/java/org/apache/impala/analysis/PrivilegeSpec.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeAuthStmtsTest.java
M fe/src/test/java/org/apache/impala/analysis/AuthorizationTest.java
3 files changed, 179 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/72/9972/5
-- 
To view, visit http://gerrit.cloudera.org:8080/9972
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If6510b4d54c9902029a357f1aebb2570cd75855d
Gerrit-Change-Number: 9972
Gerrit-PatchSet: 5
Gerrit-Owner: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Adam Holley <gi...@holleyism.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Fredy Wijaya <fw...@cloudera.com>