Anubhav Jindal has posted comments on this change. ( 
https://gerrit.cloudera.org/25247 )

Change subject: IMPALA-14331: Support proxy for JWKS URL download
......................................................................


Patch Set 3:

(Reposting with the formatting fixed.)

Thanks Jason, PS3 addresses all 8 comments:

- curl_util.cc:280 (CURLOPT_PROXY_PINNEDPUBLICKEY): Done. Added 
EasyCurl::set_proxy_pinned_public_key() and a jwksProxyPinnedPublicKey field 
(PEM/DER public key file or "sha256//<base64 hash>", requires jwksProxy). Added 
custom cluster tests with a matching pin and a wrong pin (startup fails).

- curl_util.cc:300 (CURLOPT_NOPROXY): Done. CURLOPT_NOPROXY is set whenever 
noproxy_ is not empty, regardless of proxy_. Since EasyCurl defaults noproxy_ 
to "*", the JWKS download calls set_noproxy("") when jwksProxy is set, so hosts 
in the no_proxy environment variable now bypass the proxy. 
JwtUtilTest.LoadJwksUrlThroughProxyHonorsNoProxyEnv covers this.

- jwt-util.cc:838 (always log): Done. "Downloading JWKS from '<url>'" is always 
logged, with " via proxy '<proxy>'" appended when a proxy is set.

- oauth-server-config.cc:97 (let libcurl validate): Done. Removed the custom 
parser; libcurl validates jwksProxy when the JWKS is downloaded, which fails 
startup on a bad value. The only remaining checks are field combinations: 
jwksProxy requires jwksUrl, and jwksProxyPinnedPublicKey requires jwksProxy.

- oauth-server-config.cc:119 (don't limit jwksProxy): Done. Any value is 
accepted, including credentials. Since credentials are now allowed, the proxy 
URL is passed through libcurl's URL API (as in f6a5cf48a1) to strip the user 
name and password before it is logged or included in errors 
(JwtUtilTest.LoadJwksUrlProxyErrorOmitsCredentials). Note that impalad still 
logs the full --oauth_servers flag value at startup, so credentials embedded in 
jwksProxy would appear there. Proxy authentication is tracked separately in 
IMPALA-15692.

- test_shell_oauth_servers_auth.py:175 (merge classes): Done. The proxy tests, 
servers and helper are now in TestImpalaShellOAuthServersAuth, and 
TestOAuthServersJwksProxy is removed. The existing tests also use the shared 
oauth_servers_flag() helper now.

- test_shell_oauth_servers_auth.py:258 (untrusted https proxy): Done. Added 
test_jwks_url_through_https_proxy_with_untrusted_cert_fails, which asserts 
impalad fails to start with the "via proxy" error and that the proxy received 
no request.

- proxy_servers.py:24 (nit): Done, converted to a comment.

Tested on Linux: oauth-server-config-test (22), jwt-util-test (32), 
oauth-servers-manager-test (10), test_shell_oauth_servers_auth.py (11), 
test_shell_jwt_auth.py + test_shell_oauth_auth.py (8), all passed.


--
To view, visit https://gerrit.cloudera.org/25247
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6741b8e107f707d3fcc0a9e15ac01b5769191924
Gerrit-Change-Number: 25247
Gerrit-PatchSet: 3
Gerrit-Owner: Anubhav Jindal <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Anubhav Jindal <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Comment-Date: Wed, 04 Nov 2026 19:01:39 +0000
Gerrit-HasComments: No

Reply via email to