Skip to content

fix: embedded additional keyrings for headless use cases - #353

Merged
cloudsmith-iduffy merged 2 commits into
masterfrom
iduffy/headless
Aug 14, 2026
Merged

fix: embedded additional keyrings for headless use cases#353
cloudsmith-iduffy merged 2 commits into
masterfrom
iduffy/headless

Conversation

@cloudsmith-iduffy

Copy link
Copy Markdown
Contributor

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

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Other (please describe)

Additional Notes

Copilot AI lite review requested due to automatic review settings August 14, 2026 14:17
@cloudsmith-iduffy
cloudsmith-iduffy requested a review from a team as a code owner August 14, 2026 14:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-alt and keyrings-cryptfile dependencies (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.

Comment thread CHANGELOG.md Outdated
Comment thread pyproject.toml
Comment thread packaging/pyinstaller/entry.py

@BartoszBlizniak BartoszBlizniak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Pre-approving, but can we please check manually once on the produced standalone binary that it all works correctly (if haven't already)

@cloudsmith-iduffy

Copy link
Copy Markdown
Contributor Author

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.

@cloudsmith-iduffy

Copy link
Copy Markdown
Contributor Author

Tested the binaries CI built and all worked as expected.

@cloudsmith-iduffy
cloudsmith-iduffy merged commit 80cf3d6 into master Aug 14, 2026
26 checks passed
@cloudsmith-iduffy
cloudsmith-iduffy deleted the iduffy/headless branch August 14, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants