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

Add support for viewer-based credentials for Databricks & Cortex #183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 27, 2024

  1. Add support for viewer-based credentials for Databricks & Cortex.

    This commit brings support for Posit Connect's "viewer-based
    credentials" feature [0] to the Databricks and Cortex chatbots. Similar
    to the recent work in `odbc` [1], the way this is exposed to R users is
    to require them to pass a Shiny session argument to `chat_databricks()`
    or `chat_cortex()`.
    
    Checks for viewer-based credentials are designed to fall back gracefully
    to existing authentication methods. This is intended to allow users to
    -- for example -- develop and test a Shiny app that uses Databricks or
    Snowflake credentials in desktop Positron/RStudio or Posit Workbench and
    deploy it with no code changes to Connect.
    
    Most of the actual work is outsourced to a new shared package,
    `connectcreds` [2].
    
    Note that this commit also brings the internal auth handling for
    Snowflake much closer to Databricks, notably by making
    `cortex_credentials()` internal and analogous to `databricks_token()`.
    
    Unit tests are included.
    
    [0]: https://docs.posit.co/connect/user/oauth-integrations/
    [1]: r-dbi/odbc#853
    [2]: https://github.com/posit-dev/connectcreds/
    
    Signed-off-by: Aaron Jacobs <[email protected]>
    atheriel committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    c0ea6ad View commit details
    Browse the repository at this point in the history