[coverage] Conformance findings: AUTH-019
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- 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
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- authentication, backend, databases
Hướng nghiên cứu
Bắt đầu với backend/kernel/auth_bridge.py::_normalize_scopes và bài kiểm thử xfail test_oauth_m2m_token_request_uses_configured_scopes trong diff của coverage PR dưới tests/. Kiểm tra cách các mục scope được cấu hình xử lý khoảng trắng và phần tử trùng lặp, sau đó chạy bài kiểm thử đó. Hoàn thành khi các scope được cấu hình tạo ra token duy nhất sql, còn scope để trống hoặc chưa được đặt sẽ chuyển về all-apis và các assertion của session đều đạt.
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-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
- Ngôn ngữ chính
- Python
- Star
- 236
- Fork
- 162
- Merge trung bình
- 13 giờ 13 phút
- Pull request đã merge (30 ngày)
- 23
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của databricks/databricks-sql-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
databricks/databricks-sql-python#1012 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Token federation: `_exchange_token` raises KeyError('access_token') on error responses, discarding the real failure reasonCó thể đã có người làm @TangoEnSkai đã nhận 81 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
databricks/databricks-sql-python#904 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
databricks/databricks-sql-python#865 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
engineer-bot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
databricks/databricks-sql-python#860 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Cursor.close() leaks server-side handle for async commands that were never fetchedCó thể đã có người làm @nanookclaw đã nhận 176 ngày trước. Đang mởbug engineer-bot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
databricks/databricks-sql-python#791 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của databricks/databricks-sql-python
Issue tương tự
-
premises-missing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
WingedGuardian/GENesis-AGI#4432 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
huggingface/skills#301 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
intuitem/ciso-assistant-community#5275 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
comp/desktop P3 type/feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-agent#154285 ·
Maintainer thường phản hồi trong vòng 1 ngày