Hello Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/25247
to look at the new patch set (#2).
Change subject: IMPALA-14331: Support proxy for JWKS URL download
......................................................................
IMPALA-14331: Support proxy for JWKS URL download
Add an optional jwksProxy field to --oauth_servers entries so the JWKS
can be downloaded from jwksUrl through a proxy, e.g.
"https://proxy.example.com:3128" or "socks5h://proxy.example.com:1080".
The http, https, socks4, socks4a, socks5 and socks5h schemes are
supported. The proxy is used both for the initial download at startup
and for the periodic JWKS refresh.
Previously, the JWKS download could not use a proxy at all: EasyCurl
sets CURLOPT_NOPROXY to "*" by default, so even the http_proxy and
https_proxy environment variables were ignored. EasyCurl now has a
set_proxy() setter. When a proxy is set, it is used for every host,
ignoring the no_proxy environment variable, and the TLS certificate of
an https proxy is verified according to verifyServerCert and
caCertFilePath. Without jwksProxy, the behavior is unchanged.
jwksProxy must be a <scheme>://<host>[:<port>] URL and requires
jwksUrl. Proxy credentials are rejected for now since proxy
authentication is tracked separately by IMPALA-15692. Startup and
refresh errors include the proxy URL to ease troubleshooting.
Testing:
- Added OAuthServerConfigTest cases for parsing and validating
jwksProxy.
- Added JwtUtilTest cases that download the JWKS from an unresolvable
host through a fake HTTP proxy, check that no_proxy does not bypass
a configured proxy, that an unreachable proxy fails with a clear
error, and that proxy environment variables are still ignored
without jwksProxy.
- Added TestOAuthServersJwksProxy custom cluster tests that run impalad
with JWT auth and download the JWKS from an unresolvable host through
an http proxy (absolute-form and CONNECT tunnel to an https JWKS
URL), an https proxy with a verified certificate and a socks5h proxy,
and that impalad fails to start with an unreachable proxy.
- Linux: be/build/debug/util/oauth-server-config-test,
be/build/debug/util/jwt-util-test and
be/build/debug/util/oauth-servers-manager-test passed.
- Linux: impala-py.test
tests/custom_cluster/test_shell_oauth_servers_auth.py (8 passed).
- Linux: impala-py.test tests/custom_cluster/test_shell_jwt_auth.py
tests/custom_cluster/test_shell_oauth_auth.py (8 passed).
- Linux: fe mvn test -Dtest=JwtHttpTest (12 passed).
Change-Id: I6741b8e107f707d3fcc0a9e15ac01b5769191924
Assisted-by: Claude Opus 5.5 (Cursor)
---
M be/src/kudu/util/curl_util.cc
M be/src/kudu/util/curl_util.h
M be/src/util/jwt-util-internal.h
M be/src/util/jwt-util-test.cc
M be/src/util/jwt-util.cc
M be/src/util/jwt-util.h
M be/src/util/oauth-server-config-test.cc
M be/src/util/oauth-server-config.cc
M be/src/util/oauth-server-config.h
M be/src/util/oauth-servers-manager.cc
M tests/custom_cluster/test_shell_oauth_servers_auth.py
A tests/util/proxy_servers.py
12 files changed, 718 insertions(+), 18 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/47/25247/2
--
To view, visit http://gerrit.cloudera.org:8080/25247
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6741b8e107f707d3fcc0a9e15ac01b5769191924
Gerrit-Change-Number: 25247
Gerrit-PatchSet: 2
Gerrit-Owner: Anubhav Jindal <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>