Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow oauth in databricks provider #233

Open
wants to merge 2 commits into
base: v1.0
Choose a base branch
from

Conversation

salman1993
Copy link
Collaborator

@salman1993 salman1993 commented Nov 11, 2024

i think the following will work with our generic DatabricksProvider, since all we need is the host to try to oauth:

/// Either token must be set or use_oauth must be true
pub struct DatabricksProviderConfig {
    pub host: String,
    pub token: Option<String>,
    pub use_oauth: bool,
}

order of checking:

  1. config.token is used if its provided
  2. check env DATABRICKS_TOKEN
  3. if config.use_oauth -> oauth with host to get token

Open Questions

  1. not sure if (2) and (3) should be swapped. we can also remove use_oauth depending on whether we wanna be explicit or not
  2. should we expose other oauth config like client_id, redirect_url, cache_path
  3. databricks_oauth.rs adds a bunch of dependencies so maybe we wanna make this an optional package that's only installed if you wanna use databricks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant