Skip to content

Support for connecting via Service Principals #29

@kartikay-bagla

Description

@kartikay-bagla

Currently the only authentication method supported is via personal access tokens:

f"databricks://token:{access_token}@{host}?http_path={http_path}&catalog={catalog}&schema={schema}"

Technically, we can generate tokens for service principals by calling the Workspace OAuth API. But that returns a short-lived access token, and when that token expires, we would need to create a new engine with the updated token.

The Databricks SQL Connector for Python already supports M2M authentication which removes the overhead of managing short-lived access tokens.

Would it be possible to have connector itself manage refreshing the access tokens? The connection string would then possibly become:

f"databricks://{service_principal_uuid}:{service_principal_secret}@{host}?http_path={http_path}&catalog={catalog}&schema={schema}"

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