"/accessories"-API should return actual OCI 1.1 artifactType
of the artifact
#21344
Labels
Won't Fix
The cost of fixing this is not justified.
Is your feature request related to a problem? Please describe.
When listing the accessories of an artifact by using the
/accessories
endpoint of the API, the results currently do not contain the actualartifactType
of the artifact as specified by the OCI 1.1 image spec. TheAccessory
model used by Harbor has atype
attribute, but the value can only be one of a few predefined constants, severely limiting its usefulness.Describe the solution you'd like
Instead of the fallback
subject.accessory
type, I would like to see the actualartifactType
as returned by the Referrers-API as the accessory type. Since this would be a (slightly) breaking change, as an alternative we could add a newartifact_type
attribute to theAccessory
model.Also, it should be possible to query only the artifacts of a specific
artifactType
. Since Harbor v2.12 there is a new endpoint to query all artifacts of a project that have a givenartifact_type
, but this only works for the whole project, not when listing the accessories of a given repository. For this, I currently have to query the Referrer-API directly:In summary:
/accessories
endpoint should return the actualartifactType
of the OCI 1.1 artifact./accessories
endpoint should support to query by a specificartifactType
.The text was updated successfully, but these errors were encountered: