[coverage] Conformance findings: AUTH-012,AUTH-015
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- python
调研方向
从 tests/ 下的 coverage PR diff 开始,重点查看 test_server_certificate_validation_enabled_by_default 和 test_mutual_tls_client_certificate_options_validated,然后跟踪它们所覆盖的 Thrift 和 SEA 连接路径。完成标准是:两条路径都能拒绝不受信任的服务器证书,以及不完整或格式错误的客户端身份选项,并返回可采取行动的 TLS 或客户端密钥错误,同时不调用 OpenSession 或 CreateSession。
由索引模型根据 Issue 内容生成。
描述
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 [sea]: kernel (SEA) rejects the untrusted server cert but the error drops rustls's UnknownIssuer cause, reporting only "http request failed after N attempts: error sending request for url (…)" — a TLS-trust misconfiguration is indistinguishable from a network outage
- failing test:
test_server_certificate_validation_enabled_by_default(see the coverage PR diff undertests/)
- failing test:
- AUTH-015 [thrift]: mTLS client-identity options get no both-or-neither validation: an unpaired _tls_client_cert_file reaches SSLContext.load_cert_chain(certfile=…, keyfile=None) and surfaces OpenSSL's opaque "[SSL] PEM lib", naming neither the supplied option nor the missing private key
- failing test:
test_mutual_tls_client_certificate_options_validated(see the coverage PR diff undertests/)
- failing test:
- AUTH-012: kernel (SEA) backend rejects an untrusted server certificate but its error drops the rustls cause, reporting only "http request failed after N attempts: error sending request for url (…)" — a TLS-trust misconfiguration is indistinguishable from a network outage
- AUTH-015: mTLS client-identity options get no both-or-neither validation: an unpaired
_tls_client_cert_filereachesload_cert_chain(certfile=…, keyfile=None)on the Thrift path and surfaces OpenSSL's opaque[SSL] PEM lib, naming neither the supplied option nor the missing private key
Reproduce & Expected
AUTH-012 — Verifies the driver is secure-by-default: with NO TLS options supplied, the driver performs full chain + hostname verification of the server certificate, and a server whose certificate does NOT chain…
Expected (per the shared spec):
- [thrift] exactly 0
OpenSessioncall(s) - [sea] exactly 0
CreateSessioncall(s) - full assertion contract:
result:
- error:
contains:
- certificate
- cert
- self-signed
- self signed
- unable to verify
- unable to get local issuer
- tls
- ssl
- handshake
protocol:
thrift:
- call_count:
method: OpenSession
expected: 0
sea:
- call_count:
operation: CreateSession
expected: 0
AUTH-015 — Verifies that the mutual-TLS (mTLS) client-identity options are validated on the client side with clear, actionable errors instead of failing opaquely deep in the TLS handshake.
Expected (per the shared spec):
- [thrift] exactly 0
OpenSessioncall(s) - [sea] exactly 0
CreateSessioncall(s) - full assertion contract:
result:
- label: both_or_neither
error:
contains:
- client cert
- clientcert
- client key
- clientkey
- private key
- mutual
- mtls
- both
- label: malformed_pem
error:
contains:
- pem
- certificate
- client cert
- clientcert
protocol:
thrift:
- call_count:
method: OpenSession
expected: 0
sea:
- call_count:
operation: CreateSession
expected: 0
Context
- The behavior was first fixed in a DIFFERENT driver — reference PR: https://github.com/databricks/databricks-sql-nodejs/pull/463 — 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/1115
- 主要语言
- Python
- 星标
- 233
- 派生
- 152
- 平均合并
- 21 小时 5 分钟
- 30 天内合并 PR
- 10
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
databricks/databricks-sql-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 84/100
查看 databricks/databricks-sql-python 的全部 Issue
相似的 Issue
-
fix: inaccuracy ⚠️
难度 2/5 1-3 小时 新手友好度 72/100
uabrc/uabrc.github.io#1255 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
ethereum-optimism/factory#64 ·
-
难度 2/5 1-3 小时 新手友好度 90/100
duckdb/duckdb-python#627 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
-
documentation
难度 1/5 1 小时以内 新手友好度 78/100
Qiskit/qiskit-addon-sqd#376 ·