Repository navigation
refactor: Call Connect's bootstrap endpoint directly instead of via rsconnect-python - #67
Merged
Merged
Conversation
…sconnect-python Generates the bootstrap JWT with stdlib hmac/hashlib and POSTs with urllib, using v1/bootstrap with a fallback to v1/experimental/bootstrap on 404. Removes the rsconnect-python dependency and its transitive deps. Closes #29 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #29.
with-connect used rsconnect-python only to sign a bootstrap JWT and POST it to Connect. This PR does both with the standard library (
hmac,hashlib,base64,json,urllib), sodockeris now the only dependency. The lockfile drops rsconnect-python and its transitive dependencies, includinguv,pip,click,pyjwtandsemver.It also removes the circular dependency: testing changes to rsconnect-python no longer depends on rsconnect-python's own bootstrap code working.
Behavior kept from rsconnect-python
iss: "rsconnect-python",aud: "rsconnect"andscope: "bootstrap". Connect hard-codes these and rejects anything else (src/connect/api/bootstrap/bootstrap.go), and it also requiresiatandexp. The header and claims are the same asrsconnect.json_web_token.TokenGenerator.bootstrap()produces, and the token verifies under pyjwt.v1/bootstrapfirst and falls back tov1/experimental/bootstrapon a 404, matching Use v1 bootstrap endpoint, falling back to experimental rsconnect-python#879. Connect versions before 2024.05.0 only have the experimental endpoint.Other changes
The
test-versionsCI matrix from #66 runs real Connect containers from 2022.10.0 throughpreview, covering both endpoints.🤖 Generated with Claude Code