Repository navigation
Description
Expected behavior
Connect with a CALLER-SUPPLIED credentials provider as the only credential source -- no static token, OAuth, JWT or Azure credential is configured on the connection -- and drive a session through ope…
Per the shared spec:
- result has exactly 1 row(s)
- col 0, row 0 == 1 (type Int32)
- full assertion contract:
result:
- row_count: 1
- column:
index: 0
row: 0
type: Int32
equals: 1
- provider_invocations:
min: 2
- oauth_token_calls:
expected: 0
protocol:
thrift:
- call_min:
method: OpenSession
min: 1
- call_min:
method: ExecuteStatement
min: 1
- call_min:
method: CloseSession
min: 1
- request_header:
scope: all_warehouse_requests
name: Authorization
present: true
- request_header:
scope: all_warehouse_requests
name: X-Databricks-Driver-Test-Provider
equals: provider-sentinel
sea:
- call_min:
operation: CreateSession
min: 1
- call_min:
operation: ExecuteStatement
min: 1
- call_min:
operation: DeleteSession
min: 1
- request_header:
scope: all_warehouse_requests
name: Authorization
present: true
- request_header:
scope: all_warehouse_requests
name: X-Databricks-Driver-Test-Provider
equals: provider-sentinelWhat this driver does
- Thrift: Thrift: TokenFederationProvider caches a caller-supplied credentials provider's first Authorization for the whole connection, so the provider is consulted once per session and its headers reach no request after the first
- test:
test_caller_supplied_credentials_provider_authenticates_every_request
- test:
- Thrift: TokenFederationProvider caches a caller-supplied credentials provider's first Authorization for the whole connection (auth/token_federation.py:110-126), so the provider is consulted once per session and the headers it returns reach no request after the first — a caller cannot rotate or refresh a credential that expires while the session is open.
Reproduce
SELECT 1 AS test_valueAbout this finding
Candidate finding from the cross-driver coverage run for databricks/databricks-sql-kernel#527. The test that found it is in https://github.com/databricks/databricks-driver-test/pull/2460, which is still in review. If that PR closes without merging, this issue no longer applies.
The spec describes what users of every driver should see. It doesn't ask this driver to copy another driver's implementation. If this driver gets the same user-visible result another way, or the spec asks for more than the product guarantees, say so on the coverage PR and the spec will change instead.
Activity