Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/22600 )

Change subject: IMPALA-13813: OAuth/JWT Avoid key verification on every rpc call
......................................................................

IMPALA-13813: OAuth/JWT Avoid key verification on
every rpc call

This patch optimizes the OAuth/JWT flow by setting
cookies in order to avoid token verification in every
RPC call. The default cookie expiry time is 1 day.
This is only valid for hs2-http protocol.

Testing: Modified existing custom cluster tests:
test_jwt_auth_valid and test_oauth_auth_valid:
-  total jwt token verification success count = 1:
   Reason: Verify jwt/oauth token only the first time
   and then set the cookie so do not need to re-verify
   the token for subsequent rpc queries.
-  total cookie auth success = rpc count - 1:
   Reason: After first verification, all subsequent
   authentication will be cookie auth based.
- Benchmarking the query SELECT 1; executed 10,000
  times with OAuth authentication showed a total time
  of 2.16s with the cookie enabled vs. 2.38s
  without the cookie. This indicates a modest
  performance gain (~9%) when cookie support is
  enabled. The time command output in both scenarios
  are:

  With cookie enabled:
  - real 2.16
  - user 0.99
  - sys 0.21

  With cookie disabled:
  - real 2.38
  - user 1.12
  - sys 0.22

Change-Id: I0e3e5d9cf8bdb99920611b06571515e05e15164e
Reviewed-on: http://gerrit.cloudera.org:8080/22600
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/rpc/authentication.cc
M tests/custom_cluster/test_shell_jwt_auth.py
M tests/custom_cluster/test_shell_oauth_auth.py
3 files changed, 31 insertions(+), 8 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/22600
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0e3e5d9cf8bdb99920611b06571515e05e15164e
Gerrit-Change-Number: 22600
Gerrit-PatchSet: 13
Gerrit-Owner: gaurav singh <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
Gerrit-Reviewer: gaurav singh <[email protected]>

Reply via email to