fix: embedded additional keyrings for headless use cases - #353
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the PyInstaller-packaged Cloudsmith CLI binary to include additional keyring backends (keyrings.cryptfile and keyrings.alt) so headless environments can persist SSO/OIDC tokens using file-based/encrypted keyrings.
Changes:
- Add
keyrings-altandkeyrings-cryptfiledependencies (plus transitives) to the project lockfile and dependency set. - Update the PyInstaller spec to bundle keyring backend modules and their dist metadata for entry-point discovery.
- Extend the packaging selftest to verify the extra keyring backends are discoverable at runtime.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Locks new keyring backend dependencies and transitive crypto dependencies. |
pyproject.toml |
Adds keyring backend packages to declared dependencies. |
packaging/pyinstaller/entry.py |
Adds a selftest check to ensure extra keyring backends are discoverable via entry points. |
packaging/pyinstaller/cloudsmith.spec |
Bundles keyring backend modules and copies dist metadata needed for keyring entry-point discovery. |
CHANGELOG.md |
Documents the new bundled backends for the packaged binary. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
BartoszBlizniak
left a comment
There was a problem hiding this comment.
Pre-approving, but can we please check manually once on the produced standalone binary that it all works correctly (if haven't already)
Yeah have tested it locally and will test it again when the binaries get built. |
|
Tested the binaries CI built and all worked as expected. |
Description
When using the single binary it is not possible to install different keyring plugins. Some users may want to use cloudsmith cli in a headless environment but still use their sso token.
In the previous scenario where a user installed cloudsmith cli into a python environment they could install something like keyrings.cryptfile or keyrings.alt and be able to store their sso generated credentials to a file instead of the operating system keychain. They could then mount that file in a docker container or share it in ssh sessions.
By building keyrings.cryptfile and keyrings.alt we enable users of the CLI to use the keyring environment variables to manipulate the keyring that is loaded and thus customise where cloudsmith stores credentials.
Type of Change
Additional Notes