Repository navigation
Closed as not planned
Labels
Description
Summary
Surfaced by the multi-language coverage fan-out while conformance-testing these SPEC-IDs against databricks/databricks-sql-kernel. 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-kernel) is fixed, then flips green as a tripwire.
Findings
- AUTH-017: shared-secret M2M token exchange is issued on the raw reqwest client (
http_client.inner()in src/auth/oauth/m2m.rs) instead ofexecute_without_auth(.., RequestType::AuthTokenRequest), so it bypasses the Auth retry ladder entirely and a single transient 429/503 from the token endpoint fails the whole connection; sibling exchanges (jwt_m2m.rs, federation.rs) do use the ladder - AUTH-018: because the shared-secret M2M exchange runs off the retry ladder, an exhausted-retryable token-endpoint status is never retried AND every failure is mapped to
Error::unauthenticated(), so a throttled (429) or timed-out (408) token endpoint is misdiagnosed as a credentials rejection — sending operators chasing credentials for a backoff problem
Reproduce & Expected
AUTH-017 — Verifies that the OAuth client-credentials (M2M) token exchange is covered by the driver's HTTP retry layer: a transient failure from the token endpoint (429, 503, other 5xx, or a network error) is R…
Reproduce:
- Drive the driver's M2M credential acquisition (connect, or request the auth
header directly where the driver exposes that) and require it to SUCCEED.
Expected (per the shared spec):
- full assertion contract:
result:
- label: m2m_transient
token_acquired: true
- label: m2m_transient
token_endpoint_request_count: 3
- label: m2m_transient
all_attempts_identical: true
description: every recorded request carries the same client authentication and the
same form body
- label: m2m_transient
request_body_contains:
- grant_type=client_credentials
- scope=all-apis
applies_to: every_attempt
- label: azure_v1_resource_transient
condition: azure service-principal flow supported
token_acquired: true
- label: azure_v1_resource_transient
condition: azure service-principal flow supported
token_endpoint_request_count: 2
- label: azure_v1_resource_transient
condition: azure service-principal flow supported
request_body_contains:
- grant_type=client_credentials
- resource=
applies_to: every_attemptAUTH-018 — Verifies that a failed token exchange is classified by WHETHER THE RETRY LADDER WOULD RETRY THE STATUS, not by the fact that it happened during authentication: - A status the ladder refuses to retry…
Expected (per the shared spec):
- full assertion contract:
result:
- label: rejected_client_credentials
token_endpoint_request_count: 1
- label: rejected_client_credentials
error_is_authentication_failure: true
description: the driver's authentication/credentials error category (or, where it
has no error codes, a message stating authentication/credentials failure)
- label: rejected_client_credentials
error:
contains:
- '401'
- invalid_client
- label: exhausted_throttling
token_endpoint_request_count:
min: 2
- label: exhausted_throttling
error_is_authentication_failure: false
description: an exhausted retryable status must NOT be reported as bad/expired credentials
- label: exhausted_throttling
error:
contains:
- '429'
- too many requests
- rate
- throttl
- exhaust
- label: exhausted_retryable_4xx
token_endpoint_request_count:
min: 2
- label: exhausted_retryable_4xx
error_is_authentication_failure: false
- label: exhausted_retryable_4xx
error:
contains:
- '408'
- timeout
- timed out
- label: jwt_assertion_rejected
condition: private-key JWT M2M grant supported
error_is_authentication_failure: true
- label: jwt_assertion_rejected
condition: private-key JWT M2M grant supported
error:
contains:
- '400'
- invalid_clientContext
- The behavior was first fixed in a DIFFERENT driver — reference PR: fix(auth): retry M2M token exchange on transient failures #399 — which seeded the shared language-neutral spec. This issue tracks the same conformance gap in databricks/databricks-sql-kernel; 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/1826
Activity
github-actions commentedon Nov 15, 2026
This issue has been marked as Stale because it has been open for 30 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue.
github-actions commentedon Nov 23, 2026
This issue was closed because it has been inactive for 7 days since being marked as stale.