Repository navigation
fix(thrift): preserve reserved characters in proxy credentials - #635
Draft
vuanhphung wants to merge 1 commit into
Draft
vuanhphung wants to merge 1 commit into
vuanhphung wants to merge 1 commit into
Conversation
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thrift interpolated structured proxy credentials into a URL without escaping them, so passwords containing
/,#or?failed withInvalid URLand usernames could change the parsed proxy host. Encode username and password separately at the existing proxy-agent boundary. Public options, empty-password handling, TLS and agent reuse remain unchanged.Real CONNECT tests cover
/,#,?,@in each component, both together, ordinary credentials and empty/omitted passwords: 28 pass after, versus 21 pass / 7 fail before. Lint, formatting, type-check, build and 1814 unit tests pass (inherited agent flags cleared; main reproduces the unrelated agent-detection failure without that isolation). Rebuilt kernel pindac32e2b; 3 repository proxy/HTTP live e2e tests pass across both backends. On unchanged coverage headce78dac55, PROXY-002 XPASSes 3/3 on fixed Thrift, main retains its narrowly matched expected failure, and SEA passes 1/1. Separate controls also verify reserved characters in both username and password.Five alternating build/run pairs, fresh processes, authenticated proxies, same shared warehouse and pinned binding; validated every returned row and successful CloudFetch downloads. Median execute+fetch seconds (main → fix):
The encoding runs once during cached-agent creation, not per row/request; timing differences overlap shared-warehouse variability, not an expected throughput change. Full driver-test CI uses
commit_sha, not a PR-number check.Cross-driver state
UseProxy=0; separateProxyUID/ProxyPWD,DatabricksHttpClient.java:205@97dac8daHTTP[S]_PROXY, Basic by default; decoded userinfo,common/http_utils.py:87@087b2bffWithKernelProxyfields,backend.go:417@44b21a6aproxy.authcomponents; SEA already supportedProxyAuthType=0; separate kernel credentials,kernel_connection.cpp:360@a2f78c9bproxy_auth=false;NetworkCredential,HiveServer2ProxyConfigurator.cs:174@55051e46Proxy::basic_auth,src/client/http.rs:663@dac32e2bSource audit follows JDBC/kernel semantics, retaining Node's existing empty-password support rather than C#'s stricter validation. #605 also edits
HttpConnection.ts(imports/retry-policy methods), but notcreateProxyAgent; #610 does not edit that file. No production-hunk conflict; their Unreleased changelog additions may need reconciliation.Addresses PROXY-002, discovered by the proxy coverage workstream in databricks/databricks-driver-test#2182.
Adversarial review: pending the separate factory reviewer; this PR remains a draft.
This pull request and its description were written by Isaac.