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

Basic auth messaging #294

Merged
merged 3 commits into from
Feb 6, 2025
Merged

Basic auth messaging #294

merged 3 commits into from
Feb 6, 2025

Conversation

hadley
Copy link
Member

@hadley hadley commented Feb 3, 2025

Fixes #291

@atheriel this is just a first pass. Please let me know what you think is missing or incorrect

@hadley hadley requested a review from atheriel February 3, 2025 17:17
Copy link
Collaborator

@atheriel atheriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up making some fairly heavy-handed changes here. LMK if they seem OK.

README.Rmd Outdated Show resolved Hide resolved
README.Rmd Outdated Show resolved Hide resolved
README.Rmd Outdated

Authentication works a little differently depending on the provider. A few popular ones (including OpenAI and Anthropic) require you to obtain an API key. We recommend you save it in an environment variable rather than using it directly in your code, and if you deploy an app or report that uses ellmer to another system, you'll need to ensure that this environment variable is available there, too.

ellmer also automatically detects many of the OAuth or IAM-based credentials used by the big cloud providers (currently `chat_azure()`, `chat_bedrock()`, `chat_databricks()`, `chat_snowflake()`). That includes credentials for these platforms managed by Posit Workbench and Posit Connect.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this seems like a big improvement, thanks! I think the bit that we're missing is some brief note about how to use viewer based auth on connect. Maybe something like:

Posit connect also supports viewer-based auth, where the credential of the person using the app are used. To opt-in to this, you need to ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess for Connect, it's actually opt-out? i.e. if you don't want to use viewer-based auth, you need to set up a service account and use that? Do we have advice on that?

Copy link
Member Author

@hadley hadley Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or do you need to do something on the server side too? so we should just link to https://docs.posit.co/connect/user/oauth-integrations/#adding-oauth-integrations-to-deployed-content ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I'll just link. We can improve the linked docs if needed.

@hadley hadley merged commit 1462695 into main Feb 6, 2025
11 checks passed
@hadley hadley deleted the readme-auth branch February 6, 2025 17:08
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.

Add general auth section to readme
2 participants