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 viewer-based credential support for Azure, Databricks & Snowflake #285

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

Conversation

atheriel
Copy link
Collaborator

This commit brings support for Posit Connect's "viewer-based credentials" feature to Azure, Databricks, and Snowflake chatbots.

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 Azure, 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. In this latest version, the API of that package has been dramatically simplified, meaning the changes to ellmer are far less invasive than in previous patches.

Unit tests are included. They make use of the mocking features of the connectcreds package to emulate a Connect environment.

Supersedes #183.

@hadley
Copy link
Member

hadley commented Jan 29, 2025

I assume we shouldn't merge this until after I do the patch release on Monday?

@atheriel
Copy link
Collaborator Author

If you feel like the design is good I can make a push to get connectcreds on CRAN tomorrow. But otherwise no, I don't want to hold up the release or make your life more complicated.

@hadley
Copy link
Member

hadley commented Jan 29, 2025

The design seems solid to me, and it would be nice to get all the auth stuff into the same release. Why don't you have a go at submitting connectcreds to CRAN, and assuming that goes well, I'll submit ellmer afterwards.

This commit brings support for Posit Connect's "viewer-based
credentials" feature [0] to Azure, Databricks, and Snowflake chatbots.

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 Azure,
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` [1]. In this latest version, the API of that package has
been dramatically simplified, meaning the changes to `ellmer` are far
less invasive than in previous patches.

Unit tests are included. They make use of the mocking features of the
`connectcreds` package to emulate a Connect environment.

[0]: https://docs.posit.co/connect/user/oauth-integrations/
[1]: https://github.com/posit-dev/connectcreds/

Signed-off-by: Aaron Jacobs <[email protected]>
@atheriel atheriel force-pushed the viewer-based-credentials-v5 branch from b51c47c to a003aa2 Compare January 31, 2025 16:55
@atheriel
Copy link
Collaborator Author

connectcreds is now on CRAN. 🎉

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.

2 participants