Skip to content

[coverage] Conformance findings: ERRORRECOV-016 #1021

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

  • ERRORRECOV-016 [thrift]: Thrift path retries an unverifiable server certificate (urllib3 DatabricksRetryPolicy treats SSLCertVerificationError as a broken connection) and surfaces only a generic "Error during request to server / Retry policy max retry duration" error — the CERTIFICATE_VERIFY_FAILED cause is logged but never chained onto the raised exception
    • failing test: test_invalid_server_certificate_is_rejected_once_with_certificate_cause (see the coverage PR diff under tests/)
  • ERRORRECOV-016: Thrift path retries an unverifiable server certificate (urllib3 DatabricksRetryPolicy treats SSLCertVerificationError as a broken connection, up to 30 doomed handshakes on the default 900s budget) and surfaces only a generic "Error during request to server / Retry policy max retry duration" error — the CERTIFICATE_VERIFY_FAILED cause (unknown CA / self-signed / IP-address mismatch / expired) is logged but never chained onto the raised exception

Reproduce & Expected

ERRORRECOV-016 — Verifies that a server certificate the driver CANNOT verify is treated as a PERMANENT failure: the driver makes exactly ONE TLS attempt, no HTTP request reaches the server, and the error surfaced to…

Reproduce:

  • Requires the custom-CA option (see PRECONDITION); omit the phase where absent.
  • Requires the custom-CA option (see PRECONDITION); omit the phase where absent.
  • Negative control: a closed loopback port, no TLS server, no certificates.

Expected (per the shared spec):

  • full assertion contract:
result:
- label: untrusted_ca
  connection_not_established: true
- label: untrusted_ca
  tls_handshake_attempts: 1
- label: untrusted_ca
  server_received_request: false
- label: untrusted_ca
  error:
    contains:
    - unknownissuer
    - unable to get local issuer
    - unable to find valid certification path
    - pkix path
    - signed by unknown authority
    - unable to verify the first certificate
    - unknown root
    - not trusted
    - untrusted
    - invalid certificate chain
    - certificate chain
    - certificate verify failed
    - self-signed
    - self signed
- label: self_signed
  connection_not_established: true
- label: self_signed
  tls_handshake_attempts: 1
- label: self_signed
  server_received_request: false
- label: self_signed
  error:
    contains:
    - self-signed
    - self signed
    - depth_zero_self_signed_cert
    - unknownissuer
    - unable to get local issuer
    - unable to find valid certification path
    - pkix path
    - signed by unknown authority
    - unknown root
    - not trusted
    - untrusted
    - invalid certificate chain
    - certificate chain
    - certificate verify failed
- label: hostname_mismatch
  connection_not_established: true
- label: hostname_mismatch
  tls_handshake_attempts: 1
- label: hostname_mismatch
  server_received_request: false
- label: hostname_mismatch
  error:
    contains:
    - notvalidforname
    - not valid for name
    - ip address mismatch
    - hostname mismatch
    - host name mismatch
    - name does not match
    - name mismatch
    - does not match
    - certificate is not valid for
    - altname
    - target principal name is incorrect
    - name in the certificate is invalid
- label: expired
  connection_not_established: true
- label: expired
  tls_handshake_attempts: 1
- label: expired
  server_received_request: false
- label: expired
  error:
    contains:
    - expired
    - cert_has_expired
    - notafter
    - not valid after
    - validity
- label: transient_connect_failure
  connection_not_established: true
- label: transient_connect_failure
  error:
    not_contains:
    - certificate verify failed
    - unknownissuer
    - unknown authority
    - self-signed
    - self signed
    - hostname mismatch
    - notvalidforname
    - expired
    - pkix

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