Repository navigation
Conversation
|
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
samperman
reviewed
Oct 15, 2026
| ## Unreleased | ||
|
|
||
| - Publishing to a Posit Connect Cloud account that requires single sign-on (SSO) with | ||
| service account credentials now explains that SSO blocks the publish, instead of |
Collaborator
Author
There was a problem hiding this comment.
It seems like that's how we refer to these client credentials in rsconnect-python ("service account credential") 🤔 for example,
Lines 57 to 59 in e6cdd5f
But I think the term is a bit misleading, since these credentials act as the user who created them. I'll change the new wording to "client credentials" and update the existing references in a follow-up
Collaborator
Author
There was a problem hiding this comment.
I'll merge #869 into this branch if you agree with the idea 🙂
6 tasks
* docs: call Connect Cloud client ID and secret client credentials * docs: drop changelog entry for the client credentials wording
…dentials-error # Conflicts: # docs/CHANGELOG.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
When an account requires single sign-on (SSO), Posit Connect Cloud does not grant publish permission to tokens without a recent SSO login. Client credentials tokens never have one. Publishing with client credentials to such an account now reports this, instead of a generic missing-permission error. The check uses the
sso_enabledandrolefields thatGET /v1/accountsalready returns.Type of Change
Approach
When an account is visible but lacks
content:create, and the saved credential is a service account (client ID and secret),ConnectCloudClient._publishablecheckssso_enabledand whetherroleis owner, admin, or publisher. If both hold, it raises an error saying the account requires SSO. Other cases keep the existing message.ConnectCloudAccountgains the optionalroleandsso_enabledkeys.Automated Tests
Added a test in
tests/test_connect_cloud.py: a service account on an SSO account with the publisher role gets the SSO message; the viewer role keeps the existing message; an interactive login does not get the service-account message.Directions for Reviewers
Run
uv run --group test pytest -q tests/test_connect_cloud.py.Checklist
rsconnect-python-tests-at-nightworkflow in Connect against this feature branch.