You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Abhishek Rawat (Code Review)" <ge...@cloudera.org> on 2024/09/10 23:18:49 UTC
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Abhishek Rawat has uploaded this change for review. ( http://gerrit.cloudera.org:8080/21780
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Added backend flag 'use_xff_address_as_origin' for using the client IP
address from 'X-Forwarded-For' HTTP header as the origin of HTTP
connection. The origin IP address in the SessionState is used by the
ranger client for both authorization (RangerAccessRequestImpl) and
auditing (RangerBufferAuditHandler).
Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
header with comma separated IP addresses, which is the most common form
of XFF header representing client and intermediate proxies:
X-Forwarded-For: <client>, <proxy1>, <proxy2>
'GetXFFOriginClientAddress' is now also used for getting the client IP
from XFF header in existing use cases such as trusted domain based
authentication for both HS2 HTTP server and web server.
Testing:
- Added unit tests for the new GetXFFOriginClientAddress function for
parsing comma separated IP addresses in XFF header
- Updated existing tests for trusted domain authentication to use
XFF with comma separated IP addresses
- Added custom cluster test which ensures that client IP address from
XFF header is included in the ranger audit logs.
Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
---
M be/src/rpc/authentication-test.cc
M be/src/rpc/authentication-util.cc
M be/src/rpc/authentication-util.h
M be/src/rpc/authentication.cc
M be/src/transport/THttpServer.cpp
M be/src/util/webserver.cc
M fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
M fe/src/test/java/org/apache/impala/customcluster/LdapWebserverTest.java
M tests/authorization/test_ranger.py
M tests/common/custom_cluster_test_suite.py
M tests/custom_cluster/test_shell_jwt_auth.py
11 files changed, 207 insertions(+), 47 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/21780/1
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 1
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has uploaded a new patch set (#5). ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Added backend flag 'use_xff_address_as_origin' for using the client IP
address from 'X-Forwarded-For' HTTP header as the origin of HTTP
connection. The origin IP address in the SessionState is used by the
ranger client for both authorization (RangerAccessRequestImpl) and
auditing (RangerBufferAuditHandler). Impala does not do any verification
or sanitization of this IP address, so its value should only be trusted
if the deployment environment protects against spoofing.
Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
header with comma separated IP addresses, which is the most common form
of XFF header representing client and intermediate proxies:
X-Forwarded-For: <client>, <proxy1>, <proxy2>
'GetXFFOriginClientAddress' is now also used for getting the client IP
from XFF header in existing use cases such as trusted domain based
authentication for both HS2 HTTP server and web server.
Testing:
- Added unit tests for the new GetXFFOriginClientAddress function for
parsing comma separated IP addresses in XFF header
- Updated existing tests for trusted domain authentication to use
XFF with comma separated IP addresses
- Added custom cluster test which ensures that client IP address from
XFF header is included in the ranger audit logs.
Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
---
M be/src/rpc/authentication-test.cc
M be/src/rpc/authentication-util.cc
M be/src/rpc/authentication-util.h
M be/src/rpc/authentication.cc
M be/src/transport/THttpServer.cpp
M be/src/util/webserver.cc
M fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
M fe/src/test/java/org/apache/impala/customcluster/LdapWebserverTest.java
M tests/authorization/test_ranger.py
9 files changed, 182 insertions(+), 12 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/21780/5
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 5
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 7: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 7
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Fri, 27 Sep 2024 08:27:09 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 4:
(7 comments)
gerrit-auto-critic failed. You can reproduce it locally using command:
python2 bin/jenkins/critique-gerrit-review.py --dryrun
To run it, you might need a virtual env with virtualenv installed.
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@139
PS4, Line 139: \
flake8: W605 invalid escape sequence '\d'
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@148
PS4, Line 148: \
flake8: W605 invalid escape sequence '\('
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@148
PS4, Line 148: \
flake8: W605 invalid escape sequence '\)'
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@150
PS4, Line 150: \
flake8: W605 invalid escape sequence '\('
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@150
PS4, Line 150: \
flake8: W605 invalid escape sequence '\)'
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@152
PS4, Line 152: \
flake8: W605 invalid escape sequence '\('
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@152
PS4, Line 152: \
flake8: W605 invalid escape sequence '\)'
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 4
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 02:47:56 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 1:
(3 comments)
gerrit-auto-critic failed. You can reproduce it locally using command:
python2 bin/jenkins/critique-gerrit-review.py --dryrun
To run it, you might need a virtual env with virtualenv installed.
http://gerrit.cloudera.org:8080/#/c/21780/1/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/1/tests/authorization/test_ranger.py@79
PS1, Line 79: +
flake8: W504 line break after binary operator
http://gerrit.cloudera.org:8080/#/c/21780/1/tests/authorization/test_ranger.py@102
PS1, Line 102: r
flake8: F841 local variable 'result' is assigned to but never used
http://gerrit.cloudera.org:8080/#/c/21780/1/tests/common/custom_cluster_test_suite.py
File tests/common/custom_cluster_test_suite.py:
http://gerrit.cloudera.org:8080/#/c/21780/1/tests/common/custom_cluster_test_suite.py@406
PS1, Line 406: l
flake8: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 1
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Tue, 10 Sep 2024 23:20:05 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 6: Code-Review+2
(8 comments)
Thanks for addressing my previous comments Abhishek! I only left 2 very minor comments in test_ranger.py. I don't have any other suggestion.
http://gerrit.cloudera.org:8080/#/c/21780/3//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/21780/3//COMMIT_MSG@15
PS3, Line 15: if the deployment environment protects against spoofing.
:
: Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
: header with comma separated IP addresses, whi
> Updated commit message mainly inspired from IMPALA-13310
Ack
http://gerrit.cloudera.org:8080/#/c/21780/3/be/src/rpc/authentication-util.h
File be/src/rpc/authentication-util.h:
http://gerrit.cloudera.org:8080/#/c/21780/3/be/src/rpc/authentication-util.h@56
PS3, Line 56: Status GetXFFOriginClientAddress(const std::string_view& xff_addresses,
: std::string& origin);
> Thanks for pointing this out. It appears there are gaps in code and most of
Thanks for the pointer!
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@117
PS3, Line 117: '--hs2_x_forw
> Maybe not since it's treated as an empty header which is similar to not inc
Thanks! I was just confused by this code comment ("# Invalid XFF headers") in the patch set 3. Since it has been removed in the patch set 6, I don't have any other suggestion.
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@135
PS3, Line 135: '"resType":"@table",'
: '"action":"select",'
: '"result":1,'
: '"agent":"impala",'
: r'"policy":\d,'
: '"enforcer":"ranger-acl",'
: '"cliIP":"%s",'
: '"reqData":"%s",'
: '".+":".+","logType":"RangerAudit"'
: )
:
> Added regex.
Ack
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@135
PS3, Line 135: '"resType":"@table",'
: '"action":"select",'
: '"result":1,'
: '"agent":"impala",'
: r'"policy":\d,'
: '"enforcer":"ranger-acl",'
: '"cliIP":"%s",'
: '"reqData":"%s",'
: '".+":".+","logType":"RangerAudit"'
: )
:
: # Ensure audit logs were logged in coordinator logs
: self.assert_impalad_log_contains("INFO", expected_strings_valid_xff %
: ("10.20.30.40", r"select count\(1\) from functional.alltypes"),
: expected_count=3)
: self.assert_impalad_log_contains("INFO", expected_strings_valid_xff %
: ("127.0.0.1", r"select count\(2\) from functional.alltypes"), expected_count=2)
: self.assert_impalad_log_contains("INFO", expected_strings_valid_xff %
: ("foobar", r"select count\(3\) from functional.alltypes"), expected_count=1)
:
: @pytest.mark.execute_serially
: @CustomClusterTestSuite.with_args(
: impalad_args=IMPALAD_ARGS, catalogd_args=CATALOGD_ARGS)
: def test_grant_revoke_with_catalog_v1(self, unique_name):
: """Tests grant/revoke with catalog v1."""
: self._test_grant_revoke(unique_name, [None, "invalidate metadata",
: "refresh authorization"])
:
: @pytest.mark.execute_serially
: @SkipIfFS.hdfs_acls
: @CustomClusterTestSuite.with_args(
: impalad_args=IMPALAD_ARGS, catalogd_args=CATALOGD_ARGS)
: def test_insert_with_catalog_v1(self, unique_name):
: """
: Test that when Ranger is the authorization provider in the legacy catalog mode,
: Impala does not throw an AnalysisException when an authorized user tries to execute
: an INSERT query against a partitioned table of which the respective table path and
: the partition path are not writable according to HDFS permission.
: """
: user = getuser()
: admin_client = self.create_impala_client()
: unique_database = unique_name + "_db"
: unique_table = unique_name + "_tbl"
: partition_column = "year"
: partition_value = "2008"
: table_path = "test-warehouse/{0}.db/{1}".format(unique_database, unique_table)
: table_partition_path = "{0}/{1}={2}"\
: .format(table_path, partition_column, partition_value)
: insert_statement = "insert into {0}.{1} (name) partition ({2}) " \
: "values (\"Adam\", {3})".format(unique_database, unique_table, partition_column,
: partition_value)
: authz_err = "AuthorizationException: User '{0}' does not have privileges to " \
: "execute 'INSERT' on: {1}.{2}".format(user, unique_database, unique_table)
: try:
: admin_client.execute("drop database if exists {0} cascade"
: .format(unique_database), user=ADMIN)
: admin_client.execute("create database {0}".format(unique_database), user=ADMIN)
: admin_client.execute("create table {0}.{1} (name string) partitioned by ({2} int)"
: .format(unique_database, unique_table, partition_column), user=ADMIN)
: admin_client.execute("alter table {0}.{1} add partition ({2}={3})"
: .format(unique_database, unique_table, partition_column, partition_value),
: user=ADMIN)
:
: # Change the owner user and group of the HDFS paths corresponding to the table and
: # the partition so that according to Impala's FsPermissionChecker, the table is not
: #
> I added regex based on other review comment. Please take a look if the late
Ack
http://gerrit.cloudera.org:8080/#/c/21780/6/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/6/tests/authorization/test_ranger.py@131
PS6, Line 131: s
nit: Is my understanding correct that in patch set 6, the following becomes a single string (the sub-strings of different fields are implicitly concatenated)? If so, it may be good that we remove this "s" in the end. :-)
http://gerrit.cloudera.org:8080/#/c/21780/6/tests/authorization/test_ranger.py@132
PS6, Line 132: s
nit: Same as above. It may be clearer to change the name of the variable to 'expected_string_valid_xff' (to emphasize it's a single string)?
http://gerrit.cloudera.org:8080/#/c/21780/6/tests/authorization/test_ranger.py@147
PS6, Line 147: assert_impalad_log_contains
This is just a note for myself. Nothing has to be changed. :-)
It looks like assert_log_file() used in patch set 3 were more flexible in that it tried to make sure there exists a log line that contains each field added in the list, whereas assert_impalad_log_contains() here in patch set 6 makes sure there exists a log line that contains the single line given as a whole.
In the future, when the schema of a Ranger audit event changes, e.g., the relative order of fields changes, we may have to update the test here.
Anyway, the current patch looks good. We don't have to change this part.
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 6
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 18:25:29 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has uploaded a new patch set (#7). ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Added backend flag 'use_xff_address_as_origin' for using the client IP
address from 'X-Forwarded-For' HTTP header as the origin of HTTP
connection. The origin IP address in the SessionState is used by the
ranger client for both authorization (RangerAccessRequestImpl) and
auditing (RangerBufferAuditHandler). Impala does not do any verification
or sanitization of this IP address, so its value should only be trusted
if the deployment environment protects against spoofing.
Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
header with comma separated IP addresses, which is the most common form
of XFF header representing client and intermediate proxies:
X-Forwarded-For: <client>, <proxy1>, <proxy2>
'GetXFFOriginClientAddress' is now also used for getting the client IP
from XFF header in existing use cases such as trusted domain based
authentication for both HS2 HTTP server and web server.
Testing:
- Added unit tests for the new GetXFFOriginClientAddress function for
parsing comma separated IP addresses in XFF header
- Updated existing tests for trusted domain authentication to use
XFF with comma separated IP addresses
- Added custom cluster test which ensures that client IP address from
XFF header is included in the ranger audit logs.
Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
---
M be/src/rpc/authentication-test.cc
M be/src/rpc/authentication-util.cc
M be/src/rpc/authentication-util.h
M be/src/rpc/authentication.cc
M be/src/transport/THttpServer.cpp
M be/src/util/webserver.cc
M fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
M fe/src/test/java/org/apache/impala/customcluster/LdapWebserverTest.java
M tests/authorization/test_ranger.py
M tests/custom_cluster/test_shell_jwt_auth.py
10 files changed, 212 insertions(+), 67 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/21780/7
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 7
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "gaurav singh (Code Review)" <ge...@cloudera.org>.
gaurav singh has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 3: -Code-Review
(1 comment)
http://gerrit.cloudera.org:8080/#/c/21780/3/be/src/rpc/authentication-test.cc
File be/src/rpc/authentication-test.cc:
http://gerrit.cloudera.org:8080/#/c/21780/3/be/src/rpc/authentication-test.cc@308
PS3, Line 308: xff_addresses = " 10.90.11.23, ";
case: space between the first ip and the comma.
xff_addresses = "10.90.11.23 ,";
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Wed, 25 Sep 2024 19:07:31 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Jason Fehr (Code Review)" <ge...@cloudera.org>.
Jason Fehr has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 2:
(3 comments)
Overall, very solid. A few questions/comments to look at.
http://gerrit.cloudera.org:8080/#/c/21780/2/be/src/rpc/authentication.cc
File be/src/rpc/authentication.cc:
http://gerrit.cloudera.org:8080/#/c/21780/2/be/src/rpc/authentication.cc@151
PS2, Line 151: DEFINE_bool(use_xff_address_as_origin, false,
Since the X-Forwarded-For header is non-standard, please add some wording about the value of this header must be a comma separated list of IP addresses.
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/authorization/test_ranger.py@95
PS2, Line 95: '--hs2_x_forward=10.20.30.40, 1.1.2.3, 127.0.0.6',
Please add a couple more test cases to ensure string parsing works as expected:
* space before the first ip address
* no space between IP addresses (e.g. 10.20.30.40,1.1.2.3,127.0.0.6)
* Empty X-Forward-For header
* Invalid X-Forward-For header (e.g. header value of "foobar")
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/common/custom_cluster_test_suite.py
File tests/common/custom_cluster_test_suite.py:
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/common/custom_cluster_test_suite.py@388
PS2, Line 388: def assert_log_file(log_dir, log_file, expected_strings, log_keyword=""):
Nit: A better place for this method (if it is being kept) is in impala_test_suite.py where the other assert_log methods are located.
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 2
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Comment-Date: Thu, 19 Sep 2024 19:16:42 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 6:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/17040/ : 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/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 6
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 14:51:48 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 4:
(6 comments)
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@139
PS4, Line 139: \
> flake8: W605 invalid escape sequence '\d'
Done
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@148
PS4, Line 148: \
> Prefixing the string with 'r' usually remove these warnings.
Thanks!
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@150
PS4, Line 150: \
> flake8: W605 invalid escape sequence '\)'
Done
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@152
PS4, Line 152: \
> flake8: W605 invalid escape sequence '\)'
Done
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/custom_cluster/test_shell_jwt_auth.py
File tests/custom_cluster/test_shell_jwt_auth.py:
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/custom_cluster/test_shell_jwt_auth.py@92
PS4, Line 92: __assert_log_file
> Can these use assert_impalad_log_contains() as well?
Fixing in next iteration.
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/custom_cluster/test_shell_jwt_auth.py@179
PS4, Line 179: def __assert_log_file(self, log_dir, log_file, expected_strings):
> Is this accidentally put back?
Fixing in next iteration.
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 4
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 03:03:40 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "gaurav singh (Code Review)" <ge...@cloudera.org>.
gaurav singh has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 6: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 6
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 14:39:27 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 6: Code-Review+2
(2 comments)
Thank you for addressing my comments. LGTM.
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/custom_cluster/test_shell_jwt_auth.py
File tests/custom_cluster/test_shell_jwt_auth.py:
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/custom_cluster/test_shell_jwt_auth.py@92
PS4, Line 92: 'connected_user \
> Fixing in next iteration.
Done
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/custom_cluster/test_shell_jwt_auth.py@179
PS4, Line 179: failure_count_min=0, failure_cou
> Fixing in next iteration.
Done
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 6
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 14:50:11 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 3:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/21780/2/be/src/rpc/authentication.cc
File be/src/rpc/authentication.cc:
http://gerrit.cloudera.org:8080/#/c/21780/2/be/src/rpc/authentication.cc@151
PS2, Line 151: DEFINE_bool(use_xff_address_as_origin, false,
> Since the X-Forwarded-For header is non-standard, please add some wording a
Done
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/authorization/test_ranger.py@95
PS2, Line 95: args = ['--protocol=hs2-http',
> Please add a couple more test cases to ensure string parsing works as expec
Done. Note that we don't validate the IP address but just read it as is from XFF. So for the "invalid" XFF header we're still reading "foobar" and adding it to the audit logs.
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/common/custom_cluster_test_suite.py
File tests/common/custom_cluster_test_suite.py:
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/common/custom_cluster_test_suite.py@388
PS2, Line 388:
> Nit: A better place for this method (if it is being kept) is in impala_test
Done
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Comment-Date: Mon, 23 Sep 2024 23:46:31 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@135
PS3, Line 135: expected_strings_valid_xff_1 = [
: '"access":"select"',
: '"resource":"functional/alltypes"',
: '"resType":"@table"',
: '"action":"select"',
: '"agent":"impala"',
: '"enforcer":"ranger-acl"',
: '"cliIP":"10.20.30.40"',
: '"reqData":"select count(*) from functional.alltypes"',
: '"logType":"RangerAudit"'
: ]
Are these strings exist in single line or multiline? Why not craft regex for this and use existing assert_log_contains()?
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Wed, 25 Sep 2024 16:20:32 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 5:
(1 comment)
gerrit-auto-critic failed. You can reproduce it locally using command:
python2 bin/jenkins/critique-gerrit-review.py --dryrun
To run it, you might need a virtual env with virtualenv installed.
http://gerrit.cloudera.org:8080/#/c/21780/5/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/5/tests/authorization/test_ranger.py@148
PS5, Line 148: )
flake8: E501 line too long (91 > 90 characters)
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 5
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 03:04:00 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 7: Code-Review+2
(2 comments)
Carry forward +2
http://gerrit.cloudera.org:8080/#/c/21780/6/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/6/tests/authorization/test_ranger.py@131
PS6, Line 131:
> nit: Is my understanding correct that in patch set 6, the following becomes
Done
http://gerrit.cloudera.org:8080/#/c/21780/6/tests/authorization/test_ranger.py@132
PS6, Line 132: _
> nit: Same as above. It may be clearer to change the name of the variable to
Done
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 7
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Fri, 27 Sep 2024 02:50:37 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 7:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/17052/ : 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/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 7
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Fri, 27 Sep 2024 03:14:54 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
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/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Added backend flag 'use_xff_address_as_origin' for using the client IP
address from 'X-Forwarded-For' HTTP header as the origin of HTTP
connection. The origin IP address in the SessionState is used by the
ranger client for both authorization (RangerAccessRequestImpl) and
auditing (RangerBufferAuditHandler). Impala does not do any verification
or sanitization of this IP address, so its value should only be trusted
if the deployment environment protects against spoofing.
Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
header with comma separated IP addresses, which is the most common form
of XFF header representing client and intermediate proxies:
X-Forwarded-For: <client>, <proxy1>, <proxy2>
'GetXFFOriginClientAddress' is now also used for getting the client IP
from XFF header in existing use cases such as trusted domain based
authentication for both HS2 HTTP server and web server.
Testing:
- Added unit tests for the new GetXFFOriginClientAddress function for
parsing comma separated IP addresses in XFF header
- Updated existing tests for trusted domain authentication to use
XFF with comma separated IP addresses
- Added custom cluster test which ensures that client IP address from
XFF header is included in the ranger audit logs.
Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Reviewed-on: http://gerrit.cloudera.org:8080/21780
Reviewed-by: Abhishek Rawat <ar...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M be/src/rpc/authentication-test.cc
M be/src/rpc/authentication-util.cc
M be/src/rpc/authentication-util.h
M be/src/rpc/authentication.cc
M be/src/transport/THttpServer.cpp
M be/src/util/webserver.cc
M fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
M fe/src/test/java/org/apache/impala/customcluster/LdapWebserverTest.java
M tests/authorization/test_ranger.py
M tests/custom_cluster/test_shell_jwt_auth.py
10 files changed, 212 insertions(+), 67 deletions(-)
Approvals:
Abhishek Rawat: Looks good to me, approved
Impala Public Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 8
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Andrew Sherman (Code Review)" <ge...@cloudera.org>.
Andrew Sherman has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 2
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Comment-Date: Fri, 20 Sep 2024 22:03:26 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Jason Fehr (Code Review)" <ge...@cloudera.org>.
Jason Fehr has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 3: Code-Review+1
(3 comments)
http://gerrit.cloudera.org:8080/#/c/21780/2/be/src/rpc/authentication.cc
File be/src/rpc/authentication.cc:
http://gerrit.cloudera.org:8080/#/c/21780/2/be/src/rpc/authentication.cc@151
PS2, Line 151: DEFINE_bool(use_xff_address_as_origin, false,
> Done
Done
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/authorization/test_ranger.py@95
PS2, Line 95: args = ['--protocol=hs2-http',
> Done. Note that we don't validate the IP address but just read it as is fro
Done
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/common/custom_cluster_test_suite.py
File tests/common/custom_cluster_test_suite.py:
http://gerrit.cloudera.org:8080/#/c/21780/2/tests/common/custom_cluster_test_suite.py@388
PS2, Line 388:
> Done
Done
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Comment-Date: Tue, 24 Sep 2024 21:06:00 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Added backend flag 'use_xff_address_as_origin' for using the client IP
address from 'X-Forwarded-For' HTTP header as the origin of HTTP
connection. The origin IP address in the SessionState is used by the
ranger client for both authorization (RangerAccessRequestImpl) and
auditing (RangerBufferAuditHandler).
Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
header with comma separated IP addresses, which is the most common form
of XFF header representing client and intermediate proxies:
X-Forwarded-For: <client>, <proxy1>, <proxy2>
'GetXFFOriginClientAddress' is now also used for getting the client IP
from XFF header in existing use cases such as trusted domain based
authentication for both HS2 HTTP server and web server.
Testing:
- Added unit tests for the new GetXFFOriginClientAddress function for
parsing comma separated IP addresses in XFF header
- Updated existing tests for trusted domain authentication to use
XFF with comma separated IP addresses
- Added custom cluster test which ensures that client IP address from
XFF header is included in the ranger audit logs.
Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
---
M be/src/rpc/authentication-test.cc
M be/src/rpc/authentication-util.cc
M be/src/rpc/authentication-util.h
M be/src/rpc/authentication.cc
M be/src/transport/THttpServer.cpp
M be/src/util/webserver.cc
M fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
M fe/src/test/java/org/apache/impala/customcluster/LdapWebserverTest.java
M tests/authorization/test_ranger.py
M tests/common/impala_test_suite.py
M tests/custom_cluster/test_shell_jwt_auth.py
11 files changed, 284 insertions(+), 47 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/21780/3
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 4:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/17036/ : 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/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 4
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 03:17:31 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "gaurav singh (Code Review)" <ge...@cloudera.org>.
gaurav singh has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Wed, 25 Sep 2024 14:45:25 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 4:
(7 comments)
It appears IPV6 addresses aren't supported in Impala at many places and would probably require separate effort to support them.
http://gerrit.cloudera.org:8080/#/c/21780/3//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/21780/3//COMMIT_MSG@15
PS3, Line 15: if the deployment environment protects against spoofing.
:
: Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
: header with comma separated IP addresses, whi
> Should we mention that checking the validity of a given IP address is out o
Updated commit message mainly inspired from IMPALA-13310
http://gerrit.cloudera.org:8080/#/c/21780/3/be/src/rpc/authentication-test.cc
File be/src/rpc/authentication-test.cc:
http://gerrit.cloudera.org:8080/#/c/21780/3/be/src/rpc/authentication-test.cc@308
PS3, Line 308: xff_addresses = " 10.90.11.23, ";
> case: space between the first ip and the comma.
Done
http://gerrit.cloudera.org:8080/#/c/21780/3/be/src/rpc/authentication-util.h
File be/src/rpc/authentication-util.h:
http://gerrit.cloudera.org:8080/#/c/21780/3/be/src/rpc/authentication-util.h@56
PS3, Line 56: Status GetXFFOriginClientAddress(const std::string_view& xff_addresses,
: std::string& origin);
> I am wondering if IPv6 addresses are supported by this patch.
Thanks for pointing this out. It appears there are gaps in code and most of our logic assumes IPV4 addresses. As I was researching, I found IMPALA-12713 and updated it with my findings. Supporting IPV6 addresses properly would probably be separate effort.
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@82
PS3, Line 82:
> It seems that 'vector' is not needed as an input argument.
Removed vector.
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@117
PS3, Line 117: '--hs2_x_forw
> Is my understanding correct that '--hs2_x_forward= ' is considered an in
Maybe not since it's treated as an empty header which is similar to not including the XFF header?
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@135
PS3, Line 135: '"resType":"@table",'
: '"action":"select",'
: '"result":1,'
: '"agent":"impala",'
: '"policy":\d,'
: '"enforcer":"ranger-acl",'
: '"cliIP":"%s",'
: '"reqData":"%s",'
: '".+":".+","logType":"RangerAudit"'
: )
:
> Are these strings exist in single line or multiline? Why not craft regex fo
Added regex.
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@135
PS3, Line 135: '"resType":"@table",'
: '"action":"select",'
: '"result":1,'
: '"agent":"impala",'
: '"policy":\d,'
: '"enforcer":"ranger-acl",'
: '"cliIP":"%s",'
: '"reqData":"%s",'
: '".+":".+","logType":"RangerAudit"'
: )
:
: # Ensure audit logs were logged in coordinator logs
: self.assert_impalad_log_contains("INFO", expected_strings_valid_xff %
: ("10.20.30.40", "select count\(1\) from functional.alltypes"), expected_count=3)
: self.assert_impalad_log_contains("INFO", expected_strings_valid_xff %
: ("127.0.0.1", "select count\(2\) from functional.alltypes"), expected_count=2)
: self.assert_impalad_log_contains("INFO", expected_strings_valid_xff %
: ("foobar", "select count\(3\) from functional.alltypes"), expected_count=1)
:
: @pytest.mark.execute_serially
: @CustomClusterTestSuite.with_args(
: impalad_args=IMPALAD_ARGS, catalogd_args=CATALOGD_ARGS)
: def test_grant_revoke_with_catalog_v1(self, unique_name):
: """Tests grant/revoke with catalog v1."""
: self._test_grant_revoke(unique_name, [None, "invalidate metadata",
: "refresh authorization"])
:
: @pytest.mark.execute_serially
: @SkipIfFS.hdfs_acls
: @CustomClusterTestSuite.with_args(
: impalad_args=IMPALAD_ARGS, catalogd_args=CATALOGD_ARGS)
: def test_insert_with_catalog_v1(self, unique_name):
: """
: Test that when Ranger is the authorization provider in the legacy catalog mode,
: Impala does not throw an AnalysisException when an authorized user tries to execute
: an INSERT query against a partitioned table of which the respective table path and
: the partition path are not writable according to HDFS permission.
: """
: user = getuser()
: admin_client = self.create_impala_client()
: unique_database = unique_name + "_db"
: unique_table = unique_name + "_tbl"
: partition_column = "year"
: partition_value = "2008"
: table_path = "test-warehouse/{0}.db/{1}".format(unique_database, unique_table)
: table_partition_path = "{0}/{1}={2}"\
: .format(table_path, partition_column, partition_value)
: insert_statement = "insert into {0}.{1} (name) partition ({2}) " \
: "values (\"Adam\", {3})".format(unique_database, unique_table, partition_column,
: partition_value)
: authz_err = "AuthorizationException: User '{0}' does not have privileges to " \
: "execute 'INSERT' on: {1}.{2}".format(user, unique_database, unique_table)
: try:
: admin_client.execute("drop database if exists {0} cascade"
: .format(unique_database), user=ADMIN)
: admin_client.execute("create database {0}".format(unique_database), user=ADMIN)
: admin_client.execute("create table {0}.{1} (name string) partitioned by ({2} int)"
: .format(unique_database, unique_table, partition_column), user=ADMIN)
: admin_client.execute("alter table {0}.{1} add partition ({2}={3})"
: .format(unique_database, unique_table, partition_column, partition_value),
: user=ADMIN)
:
: # Change the owner user and group of the HDFS paths corresponding to the table and
: # the partition so that according to Impala's FsPermissionChecker, the table is not
: # writable to the user that loads the table. This user usually is the one
: #
> I was wondering if the test would be a bit more concise if we use a base li
I added regex based on other review comment. Please take a look if the latest test looks good.
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 4
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 02:47:49 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Added backend flag 'use_xff_address_as_origin' for using the client IP
address from 'X-Forwarded-For' HTTP header as the origin of HTTP
connection. The origin IP address in the SessionState is used by the
ranger client for both authorization (RangerAccessRequestImpl) and
auditing (RangerBufferAuditHandler). Impala does not do any verification
or sanitization of this IP address, so its value should only be trusted
if the deployment environment protects against spoofing.
Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
header with comma separated IP addresses, which is the most common form
of XFF header representing client and intermediate proxies:
X-Forwarded-For: <client>, <proxy1>, <proxy2>
'GetXFFOriginClientAddress' is now also used for getting the client IP
from XFF header in existing use cases such as trusted domain based
authentication for both HS2 HTTP server and web server.
Testing:
- Added unit tests for the new GetXFFOriginClientAddress function for
parsing comma separated IP addresses in XFF header
- Updated existing tests for trusted domain authentication to use
XFF with comma separated IP addresses
- Added custom cluster test which ensures that client IP address from
XFF header is included in the ranger audit logs.
Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
---
M be/src/rpc/authentication-test.cc
M be/src/rpc/authentication-util.cc
M be/src/rpc/authentication-util.h
M be/src/rpc/authentication.cc
M be/src/transport/THttpServer.cpp
M be/src/util/webserver.cc
M fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
M fe/src/test/java/org/apache/impala/customcluster/LdapWebserverTest.java
M tests/authorization/test_ranger.py
9 files changed, 182 insertions(+), 12 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/21780/4
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 4
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 4:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/authorization/test_ranger.py@148
PS4, Line 148: \
> flake8: W605 invalid escape sequence '\('
Prefixing the string with 'r' usually remove these warnings.
r"select count\(1\) from functional.alltypes"
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/custom_cluster/test_shell_jwt_auth.py
File tests/custom_cluster/test_shell_jwt_auth.py:
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/custom_cluster/test_shell_jwt_auth.py@92
PS4, Line 92: __assert_log_file
Can these use assert_impalad_log_contains() as well?
http://gerrit.cloudera.org:8080/#/c/21780/4/tests/custom_cluster/test_shell_jwt_auth.py@179
PS4, Line 179: def __assert_log_file(self, log_dir, log_file, expected_strings):
Is this accidentally put back?
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 4
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 02:51:48 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 3:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/17011/ : 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/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Comment-Date: Tue, 24 Sep 2024 00:13:02 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/16917/ : 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/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 1
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Tue, 10 Sep 2024 23:49:51 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 6:
Also updated `test_shell_jwt_auth.py` to use `assert_impalad_log_contains()`
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 6
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 14:20:31 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has uploaded a new patch set (#6). ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Added backend flag 'use_xff_address_as_origin' for using the client IP
address from 'X-Forwarded-For' HTTP header as the origin of HTTP
connection. The origin IP address in the SessionState is used by the
ranger client for both authorization (RangerAccessRequestImpl) and
auditing (RangerBufferAuditHandler). Impala does not do any verification
or sanitization of this IP address, so its value should only be trusted
if the deployment environment protects against spoofing.
Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
header with comma separated IP addresses, which is the most common form
of XFF header representing client and intermediate proxies:
X-Forwarded-For: <client>, <proxy1>, <proxy2>
'GetXFFOriginClientAddress' is now also used for getting the client IP
from XFF header in existing use cases such as trusted domain based
authentication for both HS2 HTTP server and web server.
Testing:
- Added unit tests for the new GetXFFOriginClientAddress function for
parsing comma separated IP addresses in XFF header
- Updated existing tests for trusted domain authentication to use
XFF with comma separated IP addresses
- Added custom cluster test which ensures that client IP address from
XFF header is included in the ranger audit logs.
Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
---
M be/src/rpc/authentication-test.cc
M be/src/rpc/authentication-util.cc
M be/src/rpc/authentication-util.h
M be/src/rpc/authentication.cc
M be/src/transport/THttpServer.cpp
M be/src/util/webserver.cc
M fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
M fe/src/test/java/org/apache/impala/customcluster/LdapWebserverTest.java
M tests/authorization/test_ranger.py
M tests/custom_cluster/test_shell_jwt_auth.py
10 files changed, 212 insertions(+), 67 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/21780/6
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 6
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 7:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/10982/ DRY_RUN=false
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 7
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Fri, 27 Sep 2024 03:22:23 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org>.
Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 3:
(5 comments)
Thanks for working on this Abhishek!
I left some minor comments. I have a question regarding whether IPv6 addresses are supported by this patch. If IPv6 addresses could not be passed to Impala's frontend, it's also okay. We could create a follow-up JIRA for it. :-)
http://gerrit.cloudera.org:8080/#/c/21780/3//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/21780/3//COMMIT_MSG@15
PS3, Line 15: Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
: header with comma separated IP addresses, which is the most common form
: of XFF header representing client and intermediate proxies:
: X-Forwarded-For: <client>, <proxy1>, <proxy2>
Should we mention that checking the validity of a given IP address is out of the scope of this patch?
http://gerrit.cloudera.org:8080/#/c/21780/3/be/src/rpc/authentication-util.h
File be/src/rpc/authentication-util.h:
http://gerrit.cloudera.org:8080/#/c/21780/3/be/src/rpc/authentication-util.h@56
PS3, Line 56: Status GetXFFOriginClientAddress(const std::string_view& xff_addresses,
: std::string& origin);
I am wondering if IPv6 addresses are supported by this patch.
For instance, I tried the following on the command line to connect to Impala server via impala-shell using a valid IPv6 address.
impala-shell.sh --protocol=hs2-http --hs2_x_forward='2001:db8:3333:4444:5555:6666:7777:8888' -u admin
I ran "select count(*) from functional.alltypes limit 5" and found the following audit event in impalad.INFO. It looks like the value of 'cliIP' was an empty string. Not very sure if I missed anything.
I0925 16:17:48.625419 29319 Log4JAuditDestination.java:107] {"repoType":3,"repo":"test_impala","reqUser":"admin","evtTime":"2024-09-25 16:17:47.385","access":"select","resource":"functional/alltypes","resType":"@table","action":"select","result":1,"agent":"impala","policy":2,"enforcer":"ranger-acl","cliIP":"","reqData":"select count(*) from functional.alltypes limit 5","agentHost":"fangyu-upstream-dev.gce.cloudera.com","logType":"RangerAudit","id":"b769016b-295a-4d18-ae61-756add066f5b-0","seq_num":0,"event_count":1,"event_dur_ms":0,"tags":[],"cluster_name":"test-cluster","policy_version":1}
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@82
PS3, Line 82: vector
It seems that 'vector' is not needed as an input argument.
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@117
PS3, Line 117: # Invalid XFF headers
Is my understanding correct that '--hs2_x_forward= ' is considered an invalid XFF header?
http://gerrit.cloudera.org:8080/#/c/21780/3/tests/authorization/test_ranger.py@135
PS3, Line 135: expected_strings_valid_xff_1 = [
: '"access":"select"',
: '"resource":"functional/alltypes"',
: '"resType":"@table"',
: '"action":"select"',
: '"agent":"impala"',
: '"enforcer":"ranger-acl"',
: '"cliIP":"10.20.30.40"',
: '"reqData":"select count(*) from functional.alltypes"',
: '"logType":"RangerAudit"'
: ]
: expected_strings_valid_xff_2 = [
: '"access":"select"',
: '"resource":"functional/alltypes"',
: '"resType":"@table"',
: '"action":"select"',
: '"agent":"impala"',
: '"enforcer":"ranger-acl"',
: '"cliIP":"10.20.30.40"',
: '"reqData":"select count(1) from functional.alltypes"',
: '"logType":"RangerAudit"'
: ]
: expected_strings_valid_xff_3 = [
: '"access":"select"',
: '"resource":"functional/alltypes"',
: '"resType":"@table"',
: '"action":"select"',
: '"agent":"impala"',
: '"enforcer":"ranger-acl"',
: '"cliIP":"10.20.30.40"',
: '"reqData":"select count(2) from functional.alltypes"',
: '"logType":"RangerAudit"'
: ]
: expected_strings_no_xff = [
: '"access":"select"',
: '"resource":"functional/alltypes"',
: '"resType":"@table"',
: '"action":"select"',
: '"agent":"impala"',
: '"enforcer":"ranger-acl"',
: '"cliIP":"127.0.0.1"',
: '"reqData":"select count(3) from functional.alltypes"',
: '"logType":"RangerAudit"'
: ]
: expected_strings_empty_xff = [
: '"access":"select"',
: '"resource":"functional/alltypes"',
: '"resType":"@table"',
: '"action":"select"',
: '"agent":"impala"',
: '"enforcer":"ranger-acl"',
: '"cliIP":"127.0.0.1"',
: '"reqData":"select count(4) from functional.alltypes"',
: '"logType":"RangerAudit"'
: ]
: expected_strings_invalid_xff = [
: '"access":"select"',
: '"resource":"functional/alltypes"',
: '"resType":"@table"',
: '"action":"select"',
: '"agent":"impala"',
: '"enforcer":"ranger-acl"',
: '"cliIP":"foobar"',
: '"reqData":"select count(5) from functional.alltypes"',
: '"logType":"RangerAudit"'
: ]
I was wondering if the test would be a bit more concise if we use a base list containing the constant fields in an audit event in our test cases. To construct a list of fields to check for a given query, we append to the base list the varying fields, i.e., 'cliIP' and 'reqData'.
expected_strings_base = [
'"access":"select"',
'"resource":"functional/alltypes"',
'"resType":"@table"',
'"action":"select"',
'"agent":"impala"',
'"enforcer":"ranger-acl"',
'"logType":"RangerAudit"'
]
expected_strings_example = list(expected_strings_base)
expected_strings_example.append('"cliIP":"foobar"')
expected_strings_example\
.append('"reqData":"select count(5) from functional.alltypes"')
self.assert_log_file(self.LOG_DIR_RANGER_AUDIT_XFF,
"impalad.INFO", expected_strings_example, "Log4JAuditDestination.java")
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Wed, 25 Sep 2024 23:59:36 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 5:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/17037/ : 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/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 5
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Andrew Sherman <as...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gs...@cloudera.com>
Gerrit-Comment-Date: Thu, 26 Sep 2024 03:35:02 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Added backend flag 'use_xff_address_as_origin' for using the client IP
address from 'X-Forwarded-For' HTTP header as the origin of HTTP
connection. The origin IP address in the SessionState is used by the
ranger client for both authorization (RangerAccessRequestImpl) and
auditing (RangerBufferAuditHandler).
Also, added a new function 'GetXFFOriginClientAddress' for parsing XFF
header with comma separated IP addresses, which is the most common form
of XFF header representing client and intermediate proxies:
X-Forwarded-For: <client>, <proxy1>, <proxy2>
'GetXFFOriginClientAddress' is now also used for getting the client IP
from XFF header in existing use cases such as trusted domain based
authentication for both HS2 HTTP server and web server.
Testing:
- Added unit tests for the new GetXFFOriginClientAddress function for
parsing comma separated IP addresses in XFF header
- Updated existing tests for trusted domain authentication to use
XFF with comma separated IP addresses
- Added custom cluster test which ensures that client IP address from
XFF header is included in the ranger audit logs.
Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
---
M be/src/rpc/authentication-test.cc
M be/src/rpc/authentication-util.cc
M be/src/rpc/authentication-util.h
M be/src/rpc/authentication.cc
M be/src/transport/THttpServer.cpp
M be/src/util/webserver.cc
M fe/src/test/java/org/apache/impala/customcluster/LdapHS2Test.java
M fe/src/test/java/org/apache/impala/customcluster/LdapWebserverTest.java
M tests/authorization/test_ranger.py
M tests/common/custom_cluster_test_suite.py
M tests/custom_cluster/test_shell_jwt_auth.py
11 files changed, 207 insertions(+), 47 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/21780/2
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 2
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Abhishek Rawat (Code Review)" <ge...@cloudera.org>.
Abhishek Rawat has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 2:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/21780/1/tests/authorization/test_ranger.py
File tests/authorization/test_ranger.py:
http://gerrit.cloudera.org:8080/#/c/21780/1/tests/authorization/test_ranger.py@79
PS1, Line 79:
> flake8: W504 line break after binary operator
Done
http://gerrit.cloudera.org:8080/#/c/21780/1/tests/authorization/test_ranger.py@102
PS1, Line 102: r
> flake8: F841 local variable 'result' is assigned to but never used
Done
http://gerrit.cloudera.org:8080/#/c/21780/1/tests/common/custom_cluster_test_suite.py
File tests/common/custom_cluster_test_suite.py:
http://gerrit.cloudera.org:8080/#/c/21780/1/tests/common/custom_cluster_test_suite.py@406
PS1, Line 406: l
> flake8: F632 use ==/!= to compare constant literals (str, bytes, int, float
Done
--
To view, visit http://gerrit.cloudera.org:8080/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 2
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 11 Sep 2024 00:37:19 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/21780 )
Change subject: IMPALA-13312: Use client address from X-Forwarded-For Header in Ranger Audit Logs
......................................................................
Patch Set 2:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/16918/ : 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/21780
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib784ad805c649e9576ef34f125509c904b7773ab
Gerrit-Change-Number: 21780
Gerrit-PatchSet: 2
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Wed, 11 Sep 2024 01:09:41 +0000
Gerrit-HasComments: No