Skip to content

[coverage] Conformance findings: CLOUDFETCH-213701 #1064

Closed

Description

@oss-engineer-bot

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 under tests/)
  • 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 under tests/)
  • 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: 1

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions