Skip to content

[coverage] Conformance findings: AUTH-012 #254

Closed as not planned
Closed as not planned

Description

@oss-engineer-bot

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-012 [sea]: a configured identity_federation_client_id is silently ignored for a PAT (non-JWT) base credential: FederationProvider gates mandatory token exchange solely on the inner token's iss claim, so no POST /oidc/v1/token is made and SP-wide workload-identity federation never engages, defeating the shape-independent forwarding contract
    • failing test: identity_federation_client_id_honored_across_auth_shapes (see the coverage PR diff under tests/)
  • AUTH-012: a configured identity_federation_client_id is silently ignored for a PAT (non-JWT) base credential: FederationProvider gates mandatory token exchange solely on the inner token's iss claim, so no POST /oidc/v1/token is made and SP-wide workload-identity federation never engages, defeating the shape-independent forwarding contract (a secondary latent defect: exchange() matches Some(client_id) with no is-empty check, so an EMPTY value would be forwarded verbatim as identity_federation_client_id= rather than dropped)

Reproduce & Expected

AUTH-012 — Verifies that a configured service-principal identity federation client id selects MANDATORY SP-wide workload-identity token exchange regardless of which base credential the connection resolves to (P…

Reproduce:

SELECT CURRENT_USER() AS user
SELECT CURRENT_USER() AS user

Expected (per the shared spec):

  • {'thrift_call_count': {'method': 'OpenSession', 'expected': 1}}
  • GET /oauth/token/calls -> at least one recorded call whose form body contains identity_federation_client_id=.
  • {'not_null': 'batch', 'label': 'federation_on'}
  • {'row_count': 1, 'label': 'federation_on'}
  • {'not_null': 'batch.Column(0)', 'label': 'federation_on'}
  • After the reset, GET /oauth/token/calls -> NO recorded call's form body contains an identity_federation_client_id parameter (an empty value is dropped, not forwarded as identity_federation_client_id=).
  • {'not_null': 'batch', 'label': 'federation_empty'}
  • {'row_count': 1, 'label': 'federation_empty'}
  • {'not_null': 'batch.Column(0)', 'label': 'federation_empty'}

Context

Activity

  1. eric-wang-1990 commented on Aug 17, 2026

    @eric-wang-1990
    Collaborator

    Closing as invalid — this is a false-positive conformance finding, not a driver bug.

    AUTH-012 (identity federation) asserts that a configured identity_federation_client_id must trigger a mandatory POST /oidc/v1/token exchange even for a PAT base credential. That premise is wrong:

    • Workload Identity Federation / mandatory token exchange applies only to JWTs. A PAT (dapi…) is an opaque token with no iss claim; it cannot be the subject of a token exchange. The kernel's FederationProvider correctly gates the exchange on the inner token being a JWT with a foreign issuer, so a PAT passes straight through with zero exchanges — this is correct, secure behavior.
    • The reference PR (databricks-sql-python#910) only forwards identity_federation_client_id through the auth bridge to the kernel Session (plumbing); its own unit test asserts merely that the kwarg is present when supplied / absent when empty. It establishes no requirement that a PAT produce a token exchange.
    • The spec's own bug-rationale even states the correct mechanism ("a PAT is not a JWT, so the token passes straight through") and then mislabels it a defect — an internal contradiction.

    The driver conforms. The spec (AUTH-012) is being corrected in the driver-test repo. No kernel change is warranted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions