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 2019/10/10 16:43:24 UTC
[Impala-ASF-CR] IMPALA-9021: Fix the field of client's IP sent to Ranger
Fang-Yu Rao has uploaded this change for review. ( http://gerrit.cloudera.org:8080/14410
Change subject: IMPALA-9021: Fix the field of client's IP sent to Ranger
......................................................................
IMPALA-9021: Fix the field of client's IP sent to Ranger
Currently on a Ranger-enabled Impala minicluster, the value produced for the
field of client's IP in the audit logs sent to Ranger is not in the form of IP
address. This patch fixes the issue.
Testing:
- Manually verified that the client's IP passed to RangerBufferAuditHandler()
is an IP address
- Ran exhaustive tests
Change-Id: I661ca4bb978d497df1fcf2765739cb8b4734d776
---
M fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java
M fe/src/main/java/org/apache/impala/util/TSessionStateUtil.java
M fe/src/test/java/org/apache/impala/testutil/TestUtils.java
3 files changed, 17 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/10/14410/2
--
To view, visit http://gerrit.cloudera.org:8080/14410
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I661ca4bb978d497df1fcf2765739cb8b4734d776
Gerrit-Change-Number: 14410
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[Impala-ASF-CR] IMPALA-9021: Fix the field of client's IP sent to Ranger
Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has abandoned this change. ( http://gerrit.cloudera.org:8080/14410 )
Change subject: IMPALA-9021: Fix the field of client's IP sent to Ranger
......................................................................
Abandoned
Abandon the patch since the JIRA is not really an issue.
--
To view, visit http://gerrit.cloudera.org:8080/14410
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I661ca4bb978d497df1fcf2765739cb8b4734d776
Gerrit-Change-Number: 14410
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[Impala-ASF-CR] IMPALA-9021: Fix the field of client's IP sent to Ranger
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/14410 )
Change subject: IMPALA-9021: Fix the field of client's IP sent to Ranger
......................................................................
Patch Set 2:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/4781/ : 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/14410
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I661ca4bb978d497df1fcf2765739cb8b4734d776
Gerrit-Change-Number: 14410
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 10 Oct 2019 17:27:39 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-9021: Fix the field of client's IP sent to Ranger
Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/14410 )
Change subject: IMPALA-9021: Fix the field of client's IP sent to Ranger
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/14410/2/fe/src/test/java/org/apache/impala/testutil/TestUtils.java
File fe/src/test/java/org/apache/impala/testutil/TestUtils.java:
http://gerrit.cloudera.org:8080/#/c/14410/2/fe/src/test/java/org/apache/impala/testutil/TestUtils.java@365
PS2, Line 365: defaultDb, user, new TNetworkAddress("::ffff:127.0.0.1", 0)));
I changed the first argument to the class of TNetworkAddress because InetAddresses.forString() at https://gerrit.cloudera.org/c/14410/2/fe/src/main/java/org/apache/impala/util/TSessionStateUtil.java#44 is expecting an IP string literal instead of an arbitrary string, e.g., 'localhost'.
--
To view, visit http://gerrit.cloudera.org:8080/14410
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I661ca4bb978d497df1fcf2765739cb8b4734d776
Gerrit-Change-Number: 14410
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 10 Oct 2019 18:07:29 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-9021: Fix the field of client's IP sent to Ranger
Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/14410 )
Change subject: IMPALA-9021: Fix the field of client's IP sent to Ranger
......................................................................
Patch Set 2:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/14410/2/fe/src/main/java/org/apache/impala/util/TSessionStateUtil.java
File fe/src/main/java/org/apache/impala/util/TSessionStateUtil.java:
http://gerrit.cloudera.org:8080/#/c/14410/2/fe/src/main/java/org/apache/impala/util/TSessionStateUtil.java@34
PS2, Line 34:
nit: the original indent is correct, i.e. 4 spaces in continuation indent.
http://gerrit.cloudera.org:8080/#/c/14410/2/fe/src/main/java/org/apache/impala/util/TSessionStateUtil.java@44
PS2, Line 44: InetAddresses.forString(session.getNetwork_address().getHostname())
: .getHostAddress()
Looks like TNetworkAddress.hostname is actually an IPv6 format address, not a hostname... This only parses the IPv6 format address and returns the IPv4 format address. As commented in the JIRA, does Ranger don't allow IPv6 address so we need this?
http://gerrit.cloudera.org:8080/#/c/14410/2/fe/src/test/java/org/apache/impala/testutil/TestUtils.java
File fe/src/test/java/org/apache/impala/testutil/TestUtils.java:
http://gerrit.cloudera.org:8080/#/c/14410/2/fe/src/test/java/org/apache/impala/testutil/TestUtils.java@365
PS2, Line 365:
nit: original indent is correct here too.
--
To view, visit http://gerrit.cloudera.org:8080/14410
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I661ca4bb978d497df1fcf2765739cb8b4734d776
Gerrit-Change-Number: 14410
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Mon, 14 Oct 2019 12:46:20 +0000
Gerrit-HasComments: Yes