[coverage] Conformance findings: AUTH-012

Đang mở
#896 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
backend, networking

Hướng nghiên cứu

Bắt đầu trong thrift_backend.py và so sánh cách xử lý scheme của host với common/url_utils.py::normalize_host_with_protocol. Xem xét test xfail test_explicit_tls_opt_out_connects_over_plaintext_http trong coverage PR, sau đó xác minh contract dự kiến: http:// được chỉ rõ sẽ kết nối qua HTTP dạng plaintext, trong khi các thiết lập TLS bị bỏ qua hoặc không hợp lệ và host https:// được chỉ rõ thì không.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

  • AUTH-012 [thrift]: Thrift backend silently forces https:// onto an explicit http:// server_hostname (thrift_backend.py prepends "https://" unless the composed URI already starts with it, yielding https://http://host:port/...), so the explicit plaintext opt-out is never honoured and the cleartext endpoint is never dialed; contradicts common/url_utils.py::normalize_host_with_protocol, which preserves an explicit http:// host. Kernel/SEA honours it correctly.
    • failing test: test_explicit_tls_opt_out_connects_over_plaintext_http (see the coverage PR diff under tests/)
  • AUTH-012: Thrift backend silently forces https:// onto an explicit http:// server_hostname (thrift_backend.py prepends "https://" unless the composed URI already starts with it, yielding https://http://host:port/...), so an explicit plaintext opt-out is never honoured and the cleartext endpoint is never dialed — contradicting common/url_utils.py::normalize_host_with_protocol, which documents that an explicit http:// host is preserved. The kernel/SEA backend honours it correctly.

Reproduce & Expected

AUTH-012 — Verifies the transport-scheme contract for an EXPLICIT TLS opt-out, and that TLS is never downgraded without one.

Reproduce:

  • Local cleartext HTTP listener recording every request it receives.
  • Host = the plaintext listener's host, port = its port, TLS-disable option = canonical
    falsy value (ODBC SSL=0). Attempt to open a session.
  • Same target, TLS-disable option OMITTED entirely.
  • Same target, TLS-disable option set to a non-canonical value (e.g. ture).
  • Host given WITH an explicit https:// scheme, TLS-disable option set falsy.

Expected (per the shared spec):

  • full assertion contract:
result:
- label: explicit_opt_out
  no_unsupported_option_error: true
- label: explicit_opt_out
  plaintext_session_open_request_count: 1
- label: tls_default_absent
  plaintext_session_open_request_count: 0
- label: tls_default_typo
  plaintext_session_open_request_count: 0
- label: explicit_https_host_wins
  plaintext_session_open_request_count: 0

Context

Ngôn ngữ chính
Python
Star
233
Fork
152
Merge trung bình
21 giờ 5 phút
Pull request đã merge (30 ngày)
10

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của databricks/databricks-sql-python

Tất cả issue của databricks/databricks-sql-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.