[coverage] Conformance findings: AUTH-019
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 72/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- python
研究方向
從 backend/kernel/auth_bridge.py::_normalize_scopes 和 coverage PR diff 中 tests/ 下的 xfail 測試 test_oauth_m2m_token_request_uses_configured_scopes 開始。檢查設定的 scope 項目如何處理空白和重複項目,然後執行該測試。完成標準是:設定的 scope 產生唯一的 sql token,而空白或未設定的 scope 會回退到 all-apis,且 session assertions 通過。
由索引模型根據 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-019 [sea]: kernel/SEA OAuth M2M does not normalize
oauth_scopes: list entries are forwarded verbatim, so a padded/duplicated entry sends a repeated scope token and a whitespace-only entry sends a blank scope the token endpoint rejects (HTTP 400 invalid_scope) instead of falling back toall-apis(backend/kernel/auth_bridge.py::_normalize_scopes)- failing test:
test_oauth_m2m_token_request_uses_configured_scopes(see the coverage PR diff undertests/)
- failing test:
- AUTH-019: kernel/SEA OAuth M2M does not normalize
oauth_scopes: list entries are forwarded verbatim, so a padded/duplicated entry ([" sql sql "]) sends a repeated scope token and a whitespace-only entry ([" "]) sends a blank scope that the workspace token endpoint rejects with HTTP 400 invalid_scope instead of falling back to theall-apisdefault (backend/kernel/auth_bridge.py::_normalize_scopes)
Reproduce & Expected
AUTH-019 — Verifies that the driver's OAuth scopes option decides what the client-credentials (M2M) token request asks for, instead of always requesting all-apis, so a service principal whose secret is scoped…
Reproduce:
SELECT CURRENT_USER() AS user
SELECT CURRENT_USER() AS user
SELECT CURRENT_USER() AS user
SELECT CURRENT_USER() AS user
Expected (per the shared spec):
- result has exactly 1 row(s)
- result has exactly 1 row(s)
- result has exactly 1 row(s)
- result has exactly 1 row(s)
- full assertion contract:
result:
- label: configured_scopes
oauth_token_request_scope_tokens:
grant_type: client_credentials
equals:
- sql
- label: configured_scopes
row_count: 1
- label: sloppy_scopes
oauth_token_request_scope_tokens:
grant_type: client_credentials
equals:
- sql
- label: sloppy_scopes
row_count: 1
- label: blank_scopes
oauth_token_request_scope_tokens:
grant_type: client_credentials
equals:
- all-apis
- label: blank_scopes
row_count: 1
- label: unset_scopes
oauth_token_request_scope_tokens:
grant_type: client_credentials
equals:
- all-apis
- label: unset_scopes
row_count: 1
protocol:
thrift:
- call_min:
method: OpenSession
min: 1
sea:
- call_min:
operation: CreateSession
min: 1
Context
- The behavior was first fixed in a DIFFERENT driver — reference PR: https://github.com/databricks/databricks-sql-nodejs/pull/583 — 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/2020
- 主要語言
- Python
- 星號
- 236
- 分支
- 162
- 平均合併
- 13 小時 13 分鐘
- 30 天內合併 PR
- 23
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
databricks/databricks-sql-python 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
databricks/databricks-sql-python#1012 ·
維護者通常 1 天內回覆
-
Token federation: `_exchange_token` raises KeyError('access_token') on error responses, discarding the real failure reason可能已有人在做 @TangoEnSkai 於 81 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
databricks/databricks-sql-python#904 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 84/100
databricks/databricks-sql-python#865 ·
維護者通常 1 天內回覆
-
engineer-bot
難度 2/5 1-3 小時 新手友好度 76/100
databricks/databricks-sql-python#860 · 3 則留言 ·
維護者通常 1 天內回覆
-
Cursor.close() leaks server-side handle for async commands that were never fetched可能已有人在做 @nanookclaw 於 176 天前認領。 未關閉bug engineer-bot
難度 2/5 1-3 小時 新手友好度 72/100
databricks/databricks-sql-python#791 · 5 則留言 ·
維護者通常 1 天內回覆
查看 databricks/databricks-sql-python 的全部 Issue
相似的 Issue
-
premises-missing
難度 2/5 1-3 小時 新手友好度 72/100
WingedGuardian/GENesis-AGI#4432 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 83/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 78/100
huggingface/skills#301 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
intuitem/ciso-assistant-community#5275 ·
維護者通常 1 天內回覆
-
comp/desktop P3 type/feature
難度 2/5 1-3 小時 新手友好度 78/100
NousResearch/hermes-agent#154285 ·
維護者通常 1 天內回覆