Configure and Manage Labels

Configure JFrog Catalog labels for package versions on the JFrog Platform so you can group packages, enforce Curation policies, and automate updates with GraphQL.

Labels in JFrog Catalog help you organize, manage, and secure your software packages. You can apply one or more labels to any package version so you can group packages, enforce security and compliance policies, and integrate label management into CI/CD workflows through the API.

Key Benefits

  • Streamline package management: Group and categorize packages for better organization.
  • Enforce security and compliance policies: Use labels to define allowlists and blocklists.
  • Automate workflow integration: Apply labels programmatically through the GraphQL API.

Label Management

Dedicated Label Management Page

You can manage labels from the Labels page. From this page, you can:

  • View all existing labels in one place and all applied labels on a package or version.
  • Create new labels with descriptions.
  • Add packages and versions to a label directly from this page.
  • Edit existing labels, including updating their scope.
  • Remove labels from specific versions without deleting the label.

Create a Label

Create a label when you need a reusable name and description for a group of package versions.

To create a label:

  1. Navigate to Labels.
  2. Click Create a New Label and enter a name.
  3. Provide a description to clarify its purpose.
  4. Click Save Label to confirm. The label is added to the Labels table.

Add Packages to a Label

After you save a label, add the packages and versions that should carry it.

To add packages to a label:

  1. Select the label, and click Add Packages.
  2. Select the packages and versions you want to apply this label to. You can add multiple packages.

Packages Associated with a Label

When you open a label:

  • You see the packages currently associated with it.
  • Each entry includes:
    • The package name
    • The specific versions associated with the label
    • Timestamps for when the package was last edited and last updated

You can manage those associations:

  • Add or remove specific versions from a label.
  • Remove the entire package from the label if it's no longer relevant.

This keeps labels accurate, up to date, and aligned with your organization’s compliance or policy goals.

Apply an Existing Label to a Package in Explore View

You can apply a label that already exists from a package version in Explore view.

To apply an existing label to a package in Explore view:

  1. Select a package version and click + Add Label.
  2. Choose from the list of pre-existing labels or create a new one. The label is applied to the selected package version.

Remove a Label

Remove a label from a package version when that version should no longer carry it. This action only removes the label from the package, not from the system.

To remove a label:

  1. Locate the package version with the label.
  2. Click the trash icon next to the label to remove it.

Labels in Curation Policies

You can use labels in JFrog Curation policies to enforce package security and compliance.

Blocked Packages

You can create policies that block packages carrying specific labels.

Pre-Approved Packages

You can use labels to allow only vetted packages.

Policy Conditions

You can define policies based on label assignments:

  • Blocklist approach: Restrict packages assigned to a banned label.
  • Allowlist approach: Permit only packages associated with an approved label.

After the policies are in place, JFrog Catalog enforces the package restrictions.

Label Automation with GraphQL

You can manage JFrog Catalog labels programmatically with the GraphQL API. Send queries and mutations to:

POST https://<YOUR_JFROG_DOMAIN>/onemodel/api/v1/graphql

Where:

  • <YOUR_JFROG_DOMAIN> is the hostname of your JFrog Platform.

For example:

POST https://company.jfrog.io/onemodel/api/v1/graphql

You can:

  • Create and delete labels.
  • Assign and remove labels from packages.
  • Query packages based on label assignments.

Automation helps you scale security and compliance workflows.

For query and mutation examples, see Catalog GraphQL.

Frequently Asked Questions

This section provides answers to frequently asked questions.

plusFAQs
Q: How do I create a label in JFrog Catalog?

A: Create the label from the Labels page, then add the package versions that should carry it. For the steps, see Create a Label.

Q: What happens if I remove a label from a package version?

A: Catalog removes the label from that package version and keeps the label available for other packages. For more information, see Remove a Label.

Q: What is the difference between a blocklist label and an allowlist label?

A: A blocklist label restricts packages that carry it, and an allowlist label permits only packages associated with it. For more information, see Policy Conditions.

Q: Can I manage Catalog labels with GraphQL?

A: Yes. You can create, assign, remove, and query labels through the Catalog GraphQL endpoint. For more information, see Label Automation with GraphQL.

Related Topics


Did this page help you?