Cooldown policies now support Ruby
You can now apply cooldown policies to Ruby gem packages, protecting your supply chain from newly published versions that may carry malware or have not yet undergone sufficient community scrutiny…
The Cloudsmith CLI now authenticates from Buildkite pipelines and Google Cloud workloads with OpenID Connect (OIDC), so no Cloudsmith API key needs to live on your build hosts. It can also list packages from connected repositories alongside your own.
v1.29.0 adds Buildkite to the CI/CD platforms that the CLI detects automatically. In a Buildkite job, the CLI asks the Buildkite agent for an OIDC token and exchanges it for a short-lived Cloudsmith token.
First, create an OIDC provider in your Cloudsmith workspace with these settings:
https://agent.buildkite.comorganization_slug, set to the slug of your Buildkite organization. Buildkite signs tokens for all organizations with the same keys, so this claim keeps other organizations out. You can add other claims from the token, such as pipeline_slug or build_branch, to limit access further.Then set your workspace and service account in the pipeline:
env:
CLOUDSMITH_WORKSPACE: "YOUR-WORKSPACE"
CLOUDSMITH_SERVICE_SLUG: "YOUR-SERVICE-ACCOUNT"
steps:
- label: "Push package"
commands:
- cloudsmith whoami --verbose
- cloudsmith push FORMAT WORKSPACE/REPOSITORY FILENAME
When authentication succeeds, cloudsmith whoami --verbose shows Authentication Method: OIDC Auto-Discovery and Source: OIDC via Buildkite.
For more details, see Integrating Buildkite in the Cloudsmith documentation.
v1.29.0 also adds automatic detection of OIDC credentials for Google Cloud. On Compute Engine, Google Kubernetes Engine (GKE), Cloud Run, Cloud Run functions, App Engine, and Cloud Build, the CLI gets an ID token for the service account of the workload. It then exchanges the ID token for a short-lived Cloudsmith token. The CLI finds the service account through Application Default Credentials (ADC), which is the same mechanism that the Google Cloud client libraries use.
Create an OIDC provider in your Cloudsmith workspace with https://accounts.google.com as the provider URL. Google signs ID tokens for all Google Cloud projects with the same keys, so add claims that match only your own service accounts:
sub claim set to the numeric unique ID of the service account. To get the ID, run:gcloud iam service-accounts describe SERVICE_ACCOUNT_EMAIL --format='value(uniqueId)'email claim with a wildcard at the start, such as .*@PROJECT_ID.iam.gserviceaccount.com. Keep your project ID in the value. A broader value, such as .*@developer.gserviceaccount.com, also matches service accounts in other Google Cloud projects.You can add other claims from the token to limit access further.
The CLI supports these credentials:
GOOGLE_APPLICATION_CREDENTIALS points to.gcloud auth application-default login --impersonate-service-account=SERVICE_ACCOUNT_EMAIL. Use them to test the setup from your own machine.For a step-by-step Cloud Build setup, see Integrating GCP CloudBuild. For all supported credential types, see Google Cloud in the CLI documentation.
Connected repositories let one repository serve the packages of other repositories. v1.29.0 adds --include-connected to cloudsmith list packages, so you can see these packages from the terminal:
cloudsmith list packages WORKSPACE/REPOSITORY --include-connectedWith the flag, the table adds an Origin Repository column that shows the repository each package belongs to. In JSON output (-F json), the origin_repository field has the same information, and is null for packages that belong to the repository you listed. The flag works with -q search queries and the pagination options.
Note: Download URLs in the output, such as cdn_url, point to the repository you listed, not to the repository that the package belongs to.
Connected repositories are in early access. To try them, contact us. For more details, see Connected repositories in the Cloudsmith documentation.
cloudsmith repos list output no longer includes the repository display namecloudsmith repos list now shows the repository identifier (WORKSPACE/REPOSITORY) in the first column instead of the repository display name. The identifier is the value that other CLI commands accept.
buildkite and gcp. For example, set CLOUDSMITH_OIDC_GCP_DISABLED=true to skip the Google Cloud detector, or use --oidc-detector-order to change the order in which the CLI tries each platform.For a more detailed list of changes, see the changelog on GitHub.
You can now apply cooldown policies to Ruby gem packages, protecting your supply chain from newly published versions that may carry malware or have not yet undergone sufficient community scrutiny…
A new validate endpoint returns syntax and type errors in Rego policy logic without creating or updating anything, so you can fix them before you submit…
The Cloudsmith CLI can now update itself, so you can upgrade quickly and get back to work. The CLI also authenticates Terraform to your Cloudsmith registries without storing a token, reads your workspace settings from a new --workspace option, and keeps single sign-on (SSO) sessions alive through temporary network failures…
A connected_repositories field in client log exports lists the connected repositories a package was served through, so you can trace a download back from the repository that served it…
You can now provision Cloudsmith team membership from groups in your identity provider (IdP) on Ultra and Enterprise plans. Adding or removing a user from a mapped group in your IdP updates their Cloudsmith team membership automatically…
The Cloudsmith CLI has had six releases since our last update here. The headlines: you can now push Nix packages, let Cargo and pnpm authenticate automatically with credential helpers, and manage a repository's GNU Privacy Guard (GPG) key and access privileges without leaving your terminal. Along the way, the CLI got faster to start, kinder to macOS users, and better behaved on machines with no OS keyring…