Andrew Sherman has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/21700 )
Change subject: IMPALA-13310 Add the value of the http 'X-Forwarded-For' header to the runtime profile ...................................................................... IMPALA-13310 Add the value of the http 'X-Forwarded-For' header to the runtime profile When using hs2-http protocol, http messages from Impala clients may pass through one or more proxies before reaching the Impala coordinator. This can make it harder to track the origin of the http messages. The 'X-Forwarded-For' header is added to or edited by HTTP proxies when forwarding a request, so it may contain multiple source addresses. Add the value of this header to the runtime profile so that it can be observed. Impala will truncate the 'X-Forwarded-For' header value at 8096 characters. Apart from this, Impala does not do any verification or sanitization of this value, so its value should only be trusted if the deployment environment protects against spoofing. A good reference for understanding is the use of 'X-Forwarded-For' is https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For To test this, add an option '--hs2_x_forward' to impala-shell which will set the 'X-Forwarded-For' header. Add tests which verify that the value is set in the profile, and that a long value is truncated correctly. Change-Id: I2e010cfb09674c5d043ef915347c3836696e03cf --- M be/src/rpc/authentication.cc M be/src/rpc/thrift-server.h M be/src/service/client-request-state.cc M be/src/service/impala-hs2-server.cc M be/src/service/impala-server.h M be/src/transport/THttpServer.cpp M be/src/transport/THttpServer.h M shell/impala_client.py M shell/impala_shell.py M shell/option_parser.py M tests/shell/test_shell_commandline.py 11 files changed, 90 insertions(+), 5 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/00/21700/3 -- To view, visit http://gerrit.cloudera.org:8080/21700 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2e010cfb09674c5d043ef915347c3836696e03cf Gerrit-Change-Number: 21700 Gerrit-PatchSet: 3 Gerrit-Owner: Andrew Sherman <[email protected]> Gerrit-Reviewer: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Andrew Sherman <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]>
