Introduction to Artifact Registry
About 2649 wordsAbout 9 min
Artifact Registry is the artifact hosting service built into CNB, storing build outputs such as images and dependency packages.
When to use: when you need to publish build outputs to a repository so that others or other pipelines can pull them - for example pushing Docker images, publishing npm packages and Maven dependencies, or archiving Helm charts per team conventions. The registry already provides artifact type detection and permission control, so there is no need to run your own Registry or object storage.
This article introduces the basic concepts of the CNB Artifact Registry, including supported artifact types, management, permission control, storage billing, and artifact migration.
Artifact Types
CNB currently supports the following artifact types:
| Artifact Type | Domain |
|---|---|
| Docker | docker.cnb.cool |
| OCI | oci.cnb.cool |
| Helm | helm.cnb.cool |
| Maven | maven.cnb.cool |
| npm | npm.cnb.cool |
| ohpm | ohpm.cnb.cool |
| Nuget | nuget.cnb.cool |
| Composer | composer.cnb.cool |
| PyPI | pypi.cnb.cool |
| Cargo | cargo.cnb.cool |
| Conan | conan.cnb.cool |
Managing the Artifact Registry
The hierarchical relationship between artifact types, group, and repository in the UI is as follows:
test-org # group
├── maven
├── npm
├── ohpm
├── nuget
├── composer
├── pypi
├── cargo
├── conan
└── test-git-repo # repository
├── docker
├── helm
└── ociAs shown above, Composer/Maven and other artifact types belong to a group, while Docker/Helm/OCI artifacts belong to a repository under the group. Their usage methods differ accordingly.
Artifact Type Admission Restrictions
The Docker, Helm, and OCI registries are isolated from each other. Each registry only accepts pushes of its allowed artifact types. Pushing other artifact types will be rejected with an error.
| Registry | Allowed Artifacts |
|---|---|
| Docker | Container images (single/multi-arch), buildx registry cache, buildx attestations (provenance/SBOM attestations) |
| Helm | Helm Charts (OCI format) |
| OCI | Docker Model artifacts and generic OCI artifacts |
See Appendix: Supported Manifest Types for OCI Registries for the manifest config mediaType of each type.
For example, pushing a Helm Chart to the Docker registry address, or pushing a container image to the Helm registry address, will be rejected:
denied: artifact type "CHART" is not allowed to be pushed to a "docker" registryBlobs already uploaded by a rejected push are not referenced by any artifact and will be automatically cleaned up by garbage collection (GC). No manual intervention is required.
Using Docker/Helm/OCI Artifact Registries
Docker/Helm/OCI artifact registries belong to a repository, so no manual creation is required. Log in, then go to the repository's "Packages" page to view them.
Using Composer/Maven Artifacts
Creating an Artifact Registry
Click the "+" button in the upper right corner to create a new artifact registry, or select "Your registries" from your avatar to use an existing one. Click "Usage Guidelines" after entering the registry.
Deleting Artifacts
Enter the artifact registry, click the artifact name to enter it, and delete the entire artifact or a specific version.
Deleting an Artifact Registry
Docker/Helm/OCI artifacts do not require manual deletion. Other artifact types can be deleted in "Registry Setting".
Obtaining the Artifact Registry Address
View the artifact registry address in "Registry Setting" > "General".
Permission Control
Roles
The visibility of Docker/Helm/OCI artifacts is consistent with the visibility of the repository they belong to. User access permissions for artifacts are determined by their role in the repository.
For Composer/Maven and other artifact types, visibility depends on the artifact registry's visibility. User access permissions for artifacts are determined by their role in the artifact registry.
A user's role in a repository can be viewed in "Repository" > "Settings" > "Members": 
A user's role in an artifact registry can be viewed in "Artifact Registry" > "Registry Setting" > "Members Manage": 
The table below lists the correspondence between artifact behaviors and required roles:
| Resource | Behavior | Required Role |
|---|---|---|
| Public Artifact Registry Artifacts | Pull | Anyone can pull without authentication |
| Public Artifact Registry Artifacts | Push | Developer or above |
| Public Artifact Registry Artifacts | Delete | Administrator or above |
| Private Artifact Registry Artifacts | Pull | Guest or above, requires authentication |
| Private Artifact Registry Artifacts | Push | Developer or above |
| Private Artifact Registry Artifacts | Delete | Administrator or above |
Access Tokens
When using command-line tools to read or write artifacts, whether an operation is authorized depends on the user's role and the permissions of the access token in the request.
If an access token is missing, the system treats it as anonymous access, which limits operation permissions.
The detailed authentication policy for the artifact registry is as follows:
Login: If the
access tokenis valid, login is allowed; otherwise, it is denied.Anonymous operations: Only pulling from public artifact registries is allowed; all other operations are denied.
Query, pull, and push operations: If the user's
rolehas the required permissions and theaccess token'sregistry-packagescope includes the operation, it is allowed; otherwise, denied. Deletion operations follow the same rules.If the
access tokenspecifies a scope (e.g., a specific repository or artifact registry) and the scope matches the accessed resource, the actual authorization scope is returned. Otherwise, the visibility of the resource is checked:- If the resource is public, pull operations are still allowed, but other operations are denied.
- If the resource is private, all operations are denied.
If the user, token, or accessed resource is in an abnormal state (e.g., frozen), all operations are denied. Carrying an incorrect
access token(e.g., expired after login, treated as an abnormal token) will also deny pulling from a public artifact registry.
The above policy is illustrated below (using pull operations as an example, where "token" refers to the CNB access token and "scope" refers to the access token's authorization scope):
Creating an Access Token
Click "Avatar" > "Settings" > "Access tokens" > "Add Access Token"(Open in new window) to create a new access token.

For access token permissions, only the "Authorization Scope" registry section needs attention.
When selecting "Common Scenarios" as "Artifact Registry," only registry-package read/write permissions are granted by default.
If you need to delete artifacts via command-line tools (e.g., npm unpublish), you must also check registry-package-delete read/write permissions.
Additionally, "Specify Artifact Registry" in "Usage Scope" cannot select Docker, Helm, and OCI artifacts. Instead, select "Specify Repository" and then set "Common Scenarios" to "Artifact Registry."
Using Tokens in Workspaces and Cloud Native Build
There are three ways to use tokens:
- Directly use environment variables
${CNB_TOKEN_USER_NAME}${CNB_TOKEN}(recommended) - Manually create an
access tokenand use it directly (not recommended) - Manually create an
access token, write it to the Secret Registry, and then import it as an environment variable (neutral)
About Method 1:
CNB provides built-in access tokens for Workspaces and Cloud Native Build (CI pipelines). If no special requirements exist, you can directly use these environment variables without manually creating additional access tokens. For details about the permissions of this access token, refer to CNB_TOKEN.
Capacity Statistics
Billing is based on the storage space occupied by artifacts hosted on CNB. You can view the capacity of each artifact in the "Usage" section.
Note
For Docker/OCI artifacts, blobs with identical content are deduplicated before calculating capacity.
The following usage update guidance applies to Docker, Helm, and OCI artifacts. Group-level registries such as Composer, Maven, and npm use separate statistics and are not covered by this guidance.
Capacity Limit
"Capacity Limit" is an independent storage limit for the specified artifact type under the current repository. Docker, Helm, and OCI are calculated separately, and changing the limit for one type does not affect the others. This limit only constrains storage for the corresponding artifact type. It does not include Git objects, LFS objects, images or attachments, and does not limit the number of tags, artifacts, or packages.
The page shows the currently effective limit. Its initial value comes from platform configuration or a root group policy, and it can be set to a maximum of 10 TiB. The actual available range is shown on the page. For example, when the page shows "used X / limit Y", X is the usage for the current type and Y is the effective limit. Repository administrators and above can select "Capacity Limit" to change it. If the setting is controlled by the root group, the current repository cannot change it independently. A root group administrator must adjust the group policy or a repository-specific override in "Root Organization / Organization Settings / Artifactory / Capacity Limit Control".

After you change the limit:
- The new limit takes effect immediately, but existing usage is not recalculated, existing artifacts are not deleted, and GC is not triggered.
- The page does not allow the limit to be set below current usage. After the limit is reached, new pushes of that type fail, while existing artifacts can still be pulled and deleted.
- After storage is released or the limit is raised, pushes can continue without additional operations.
Capacity limit is not a billing quota
The capacity limit only restricts pushes for one artifact type in one repository. It is not the group's object storage free quota or billing budget. Changing the capacity limit does not change billing charges or relax group-level usage restrictions.
When Does Usage Refresh?
When you open "Settings" > "Usage" for a repository, the page retrieves the latest available total usage. Expanding the "Name" details retrieves usage for each artifact package. The page does not refresh automatically while you remain on it.
Refreshing or revisiting the page requests usage again, but does not immediately complete statistics that are still updating. After a push, deletion, or tag cleanup, total usage and details may update later, so revisit the page after some time.
Why May Total Usage Differ from the Sum of the Details?
- Different deduplication scopes: when multiple packages reference the same blob, total usage counts it once, while each package's details count it separately. The sum of the details may therefore exceed total usage.
- Different refresh times: total usage and details may separately be undergoing synchronization, recalculation, or caching, causing temporary differences.
The itemized total in the downloaded details has the same measurement differences and is not directly comparable to the total usage shown on the page.
How Capacity Decreases After Deleting Tags or Packages
The Docker artifact page provides two manual cleanup actions: "Delete Tag" and "Delete packages". The former deletes a single tag, while the latter deletes the entire artifact package and all of its tags. You can also configure a "Docker Tag Cleanup Policy" under the repository's "Settings" > "Artifact".
A tag is a readable reference to an artifact. Within its package, an artifact is uniquely identified by its sha256 digest, and one artifact can have multiple tags. The effects of these actions on total repository usage and individual package details are as follows:
| Cleanup Action | Total Repository Usage | Package Details |
|---|---|---|
| Delete a tag while the artifact is still referenced by other tags | Unchanged. | Unchanged. |
| Delete a tag and the artifact is not referenced by other tags or artifacts | The artifact is deleted together with the tag, and usage decreases afterward. | Decreases after the artifact is deleted and usage is updated. The row disappears when no artifacts with usage remain in the package. |
| Delete an entire artifact package | Usage is updated after deletion completes and then decreases. A successful page response does not mean deletion has finished. | May decrease as artifacts in the package are deleted and eventually disappears. Old data may remain visible briefly. |
| Docker tag cleanup policy | Decreases after matching artifacts are cleaned up and usage is updated, without waiting for GC. | Decreases after artifacts are cleaned up and usage is updated. The policy does not delete the package itself. |
When you delete a tag, the system determines whether the artifact it references can also be deleted. For a normal single-tag image that is not referenced by other artifacts, both the tag and the artifact are deleted, leaving no untagged artifact. If the artifact has other tags, only the selected tag is deleted. If the artifact is still referenced by another artifact, such as a child artifact of a multi-architecture image, only the tag is deleted; the artifact becomes untagged and usage is updated after subsequent GC cleanup.
An overwrite push can also produce untagged artifacts: when a tag points to new content, the old artifact no longer appears in the tag list and is cleaned up by subsequent GC. Such artifacts cannot be deleted directly from the page.
The decreases above apply only when the repository has no other valid references. If other artifacts or packages still use the same content, package details may decrease first while total repository usage retains that shared data. A decrease in page usage is a statistics change, not proof that storage space has been released. Content that is no longer used is reclaimed by subsequent GC.
Retention Rules for the Docker Tag Cleanup Policy
Each repository's cleanup policy runs once daily. Completion time depends on the number of artifacts to clean up.
The policy determines retention by artifact and does not split multiple tags on the same artifact. Cleaning up an artifact deletes all of its tags, while an artifact that matches a retention condition is retained together with its tags. The policy neither deletes the package itself nor releases storage space immediately.
What Do the GC Times on the Page Mean?
- Last GC: the most recent scheduled trigger time calculated from the current GC schedule. It is not the actual task start, success, or completion time. This time advances with the schedule even if a task is still running, has failed, or has not finished refreshing statistics.
- Next GC: the next scheduled trigger time. It does not mean page usage will update immediately at that time.
Therefore, "GC 1 day ago" alone does not prove that physical reclamation has completed or that page capacity had already decreased at that time.
Note
The GC time next to LFS objects belongs to Git/LFS repository maintenance, not the Artifact Registry GC described here. The two have different time meanings and mechanisms and cannot be used to infer each other's status.
After a deletion, revisit the page later. If only a tag is deleted while its artifact remains, unchanged usage is expected. GC is mainly needed to clean up untagged artifacts and reclaim storage space. If the artifact has been deleted but usage remains outdated for an extended period, contact CNB Support with the artifact path, deletion time, and a page screenshot.
Artifact Migration
To batch migrate artifacts from other registries to CNB, use the CNB Artifact Migration Tool.