You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org> on 2022/06/22 23:15:20 UTC
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
Fang-Yu Rao has uploaded this change for review. ( http://gerrit.cloudera.org:8080/18656
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
This patch revised the logic of Ranger audit log generation such that
unauthorized SELECT operation on non-existing tables would be produced
as well.
In addition, this patch also fixed a subtle bug where an authorized
table event could be produced even though the authorization failed with
respect to a deny policy on a column in the same table.
The code comments in RangerAuthorizationChecker#authorizeTableAccess()
was also updated to reflect Impala's current behavior with respect to
Ranger audit log generation.
Testing:
- Added a test case to verified the log corresponding to an
unauthorized SELECT operation on a non-existing table is produced.
Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
---
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
2 files changed, 43 insertions(+), 21 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/56/18656/1
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18656 )
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/10841/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Wed, 22 Jun 2022 23:36:02 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/18656 )
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
Patch Set 2: Code-Review+2
Sorry to be late here. The patch looks pretty good!
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Fri, 01 Jul 2022 01:16:38 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18656 )
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 3
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Fri, 01 Jul 2022 01:17:22 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/18656 )
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
This patch revised the logic of Ranger audit log generation such that
unauthorized SELECT operation on non-existing tables would be produced
as well. Note that after this change, in the case of an unauthorized
SELECT operation on an existing table, Impala will produce a table event
instead of the first failing column event because we do not filter out
the table event for an unauthorized SELECT operation like what we did
before.
In addition, this patch fixed a subtle bug where an authorized table
event could be produced even though the authorization failed due to a
deny policy on a column in the same table.
The code comment in RangerAuthorizationChecker#authorizeTableAccess()
was also updated to reflect Impala's current behavior with respect to
Ranger audit log generation.
Testing:
- Added a test case to verify the log corresponding to an unauthorized
SELECT operation on a non-existing table is produced.
- Manually verified that an authorized table event won't be produced
when the requesting user is granted the SELECT privilege on a table
but is denied access to a column in the same table.
Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
---
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
2 files changed, 43 insertions(+), 21 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/56/18656/2
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18656 )
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
Patch Set 3:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/8284/ DRY_RUN=false
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 3
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Fri, 01 Jul 2022 01:17:23 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
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/18656 )
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
This patch revised the logic of Ranger audit log generation such that
unauthorized SELECT operation on non-existing tables would be produced
as well. Note that after this change, in the case of an unauthorized
SELECT operation on an existing table, Impala will produce a table event
instead of the first failing column event because we do not filter out
the table event for an unauthorized SELECT operation like what we did
before.
In addition, this patch fixed a subtle bug where an authorized table
event could be produced even though the authorization failed due to a
deny policy on a column in the same table.
The code comment in RangerAuthorizationChecker#authorizeTableAccess()
was also updated to reflect Impala's current behavior with respect to
Ranger audit log generation.
Testing:
- Added a test case to verify the log corresponding to an unauthorized
SELECT operation on a non-existing table is produced.
- Manually verified that an authorized table event won't be produced
when the requesting user is granted the SELECT privilege on a table
but is denied access to a column in the same table.
Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Reviewed-on: http://gerrit.cloudera.org:8080/18656
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/test/java/org/apache/impala/authorization/ranger/RangerAuditLogTest.java
2 files changed, 43 insertions(+), 21 deletions(-)
Approvals:
Impala Public Jenkins: Looks good to me, approved; Verified
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 4
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/18656 )
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
http://gerrit.cloudera.org:8080/#/c/18656/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/18656/1//COMMIT_MSG@9
PS1, Line 9: This patch revised the logic of Ranger audit log generation such that
: unauthorized SELECT operation on non-existing tables would be produced
: as well.
:
: In addition, this patch also fixed a subtle bug where an authorized
: table event could be produced even though the authorization failed with
: respect to a deny policy on a column in the same table.
I struggled a bit to understand how the change leads to these different behaviors.
Is my understanding right?
- In case of selects, before this change we only kept column events
- We only kept the first event that survived the filter above. - The two rules above led to logging only the first failed column authorization request, and in case there were no column request (non-existing tables), we didn't write anything to the audit log.
- This change no longer filters out table events in select, and this fixes IMPALA-11382 while leads to log a table event instead of a column event in case the user had no privileges on the table, because the table event will come before the column events.
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Thu, 23 Jun 2022 12:12:37 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18656 )
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
Patch Set 2:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/10854/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Thu, 23 Jun 2022 19:17:34 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/18656 )
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Fri, 24 Jun 2022 13:54:14 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18656 )
Change subject: IMPALA-11382: Produce log for unauthorized SELECT on non-existing table
......................................................................
Patch Set 3: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/18656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I92b2a6acc920de1d2d14b991c374a4550e742f7b
Gerrit-Change-Number: 18656
Gerrit-PatchSet: 3
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Comment-Date: Fri, 01 Jul 2022 05:58:58 +0000
Gerrit-HasComments: No