Repository navigation
Closed
Description
Summary
Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-python. Each finding is committed as an expected-failure (xfail) test in the coverage PR — the test asserts the CORRECT (post-fix) behavior and stays red until THIS driver (databricks/databricks-sql-python) is fixed, then flips green as a tripwire.
Findings
- CLOUDFETCH-213701 [thrift]: unified_http_client logs/wraps urllib3's MaxRetryError verbatim, so a terminal CloudFetch download failure leaks the presigned URL's sig= query into both the driver log and the raised RequestError; RedactUrlQueryParamsFilter is only installed on the urllib3.connectionpool logger, not on the connector's own loggers
- failing test:
test_failed_cloud_fetch_download_does_not_leak_presigned_url_credential(see the coverage PR diff undertests/)
- failing test:
- CLOUDFETCH-213701 [sea]: The kernel's CloudFetch download path prints the presigned URL with its sig= query: reqwest's URL-bearing error text goes into the default-on "Chunk N download failed (attempt n/m)" retry warning and the NetworkError message, and the per-request/chunk-download DEBUG lines log the whole link
- failing test:
test_failed_cloud_fetch_download_does_not_leak_presigned_url_credential(see the coverage PR diff undertests/)
- failing test:
- CLOUDFETCH-213701: A terminal CloudFetch download failure leaks the presigned URL's credential: unified_http_client logs urllib3's MaxRetryError verbatim ("Max retries exceeded with url: /…?sig=…") and copies it into the raised RequestError; RedactUrlQueryParamsFilter is installed only on the urllib3.connectionpool logger, not on the connector's own loggers (downloader.py's slow-download warning also passes the unstripped URL)
Reproduce & Expected
CLOUDFETCH-213701 — A CloudFetch presigned URL carries its credential IN THE QUERY STRING -- Azure SAS sig=, S3 X-Amz-Signature, GCS X-Goog-Signature.
Reproduce:
- Install the harness's log capture before any CloudFetch traffic and keep it
for the whole test, at the most verbose level the driver exposes to tests
(DEBUG where available). The retry warning is default-on, but the
per-request and chunk-download lines are debug and printed the URL too. - One shot: the first cloud-storage download is cut off, the retry succeeds.
The failure is RECOVERED, so the retry warning is the only trace of it --
which is exactly why a credential written there goes unnoticed. - Drain the whole result; it succeeds after the retry.
- Now the download NEVER succeeds, so the driver exhausts its attempt budget
and the failure reaches the application as an error -- the second surface. - Drain and expect the drain to fail.
Expected (per the shared spec):
- completes without an exception
- result has at least 1 row(s)
- full assertion contract:
result:
- label: recovered_download
no_exception: true
- label: recovered_download
row_count_min: 1
- label: recovered_download
log_output:
not_contains:
- sig=
- X-Amz-Signature
- X-Amz-Credential
- X-Amz-Security-Token
- X-Goog-Signature
not_contains_observed: presigned_url_query
- label: terminal_download
exception_thrown: true
- label: terminal_download
error:
not_contains:
- sig=
- X-Amz-Signature
- X-Amz-Credential
- X-Amz-Security-Token
- X-Goog-Signature
not_contains_observed: presigned_url_query
- label: terminal_download
log_output:
not_contains:
- sig=
- X-Amz-Signature
- X-Amz-Credential
- X-Amz-Security-Token
- X-Goog-Signature
not_contains_observed: presigned_url_query
- label: terminal_download
elapsed_seconds_range:
max: 180
protocol:
thrift:
- label: recovered_download
cloud_downloads_min: 2
- label: terminal_download
cloud_downloads_min: 1
sea:
- label: recovered_download
cloud_downloads_min: 2
- label: terminal_download
cloud_downloads_min: 1Context
- The behavior was first fixed in a DIFFERENT driver — reference PR: fix(logging): drop presigned query from request errors and debug URLs databricks-sql-kernel#454 — which seeded the shared language-neutral spec. This issue tracks the same conformance gap in databricks/databricks-sql-python; the reference PR is for cross-referencing the intended behavior, NOT a change to this repo.
- Coverage PR carrying the reproducing xfail test(s): https://github.com/databricks/databricks-driver-test/pull/2139
Metadata
Metadata
Assignees
Labels
No labels
Activity