API key rules are now generally available

API key rules let workspace owners and managers enforce expiration and rotation requirements on API keys, reducing the risk from long-lived or stale credentials.

You can now set independent API key rules for user accounts and service accounts, instead of a single rule applying to both — for example, rotating user keys every 30 days and service account keys every 60.

You can configure API key rules on the workspace Settings tab in the web app, through the API, or with the Terraform provider.

For more details, see API key rules in the Cloudsmith documentation.

API key rules are available for Ultra and Enterprise plans.

Rules created during early access

Global rules are being replaced by separate user and service account rules. A global rule configured during early access continues to apply to both key types until you switch or Cloudsmith contacts you to migrate.

  • If you manually switch to separate rules, your expiry history resets and everyone with an already-expired key, including service account creators, receives an "API key expired" email again.
  • If Cloudsmith migrates your rules, your expiry notification history carries over, so no one gets emailed again about keys they've already been told about.

In both cases, API key access doesn't change. You can switch at any time, but it can’t be undone.

If you have questions about switching, contact support.

Keep up to date with our monthly product bulletin