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 <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Comment-Date: Thu, 19 Sep 2024 19:16:42 +0000
Gerrit-HasComments: Yes

Reply via email to