[coverage] Conformance findings: AUTH-013

オープン
#909 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

auth.py と coverage PR の失敗しているテスト test_oauth_u2m_explicit_bundle_override から始めます。ログインを完了せずに、認証 URL と callback listener を観察しながら両方のケースを再現します。指定された client_id が保持され、完全な override ではポート 8099 とスコープ all-apis が使用され、client_id-only ではアプリケーション固有のスコープ指定なしでポート 8030 にフォールスルーすれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

  • AUTH-013 [thrift]: U2M partial override: a caller-supplied oauth_client_id without oauth_redirect_port still gets the connector's own default app port 8020 (auth.py honours oauth_redirect_port only when paired with oauth_client_id, else falls back to PYSQL_OAUTH_REDIRECT_PORT_RANGE), so the foreign app's browser redirect fails with redirect_uri_mismatch (PECOBLR-4039)
    • failing test: test_oauth_u2m_explicit_bundle_override (see the coverage PR diff under tests/)

Reproduce & Expected

AUTH-013 — Verifies that a caller-supplied U2M OAuth identity is honoured verbatim, and that a caller who supplies their OWN client_id also OWNS the rest of the bundle - the driver must NOT pin its own default…

Reproduce:

  • Case 1 - begin a U2M connect supplying client_id test-custom-u2m-app,
    scopes ["all-apis"] and redirect_port 8099; capture the resolved bundle at the
    same observation point AUTH-012 uses (authorization URL / callback listener /
    proxied request). The interactive login is not completed.
  • Case 2 - repeat supplying ONLY client_id test-custom-u2m-app, leaving scopes
    and redirect_port unset.

Expected (per the shared spec):

  • The supplied client_id is sent unchanged - no default substitution, in both cases.
  • {'oauth_u2m_override_scopes_verbatim': {'values': ['all-apis'], 'description': "Case 1: the caller's scope set is forwarded verbatim, even when it differs from\nthe driver's default sql offline_access.\n"}}
  • Case 1: the localhost callback / redirect URI uses the caller's port 8099, not any driver default.
  • Case 2 (client_id only): the driver does NOT apply its own default app's app-specific pins. Concretely, a driver whose DEFAULT bundle uses databricks-sql-python + port 8020 must NOT redirect to 8020 here - with a foreign client_id the unsupplied port falls through to the base kernel default (8030). Likewise the scope set is not pinned to that binding's app-specific list.

Context

主要言語
Python
スター
233
フォーク
152
平均マージ
21時間 5分
マージ済み PR(30日)
10

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

databricks/databricks-sql-python のほかの issue

databricks/databricks-sql-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。