Discussion: Capabilities API #40
Replies: 4 comments
-
Currently looking at this this a thought experiment for now and don't feel there is a end-to-end use case that is specific to ORAS or the reference capabilities. I believe we should first work with the OCI distribution spec unless this is scoped to only ORAS endpoints. |
Beta Was this translation helpful? Give feedback.
-
I agree it's non-blocking for now. And, I'd like to see it in distribution. For now, I was thinking we incubate here and propose back to distribution as we have some implementation. I think it will become more important as we start implementing the oras and nv2 libraries to identify if the registry supports a certain capability. Rather than have each feature have a unique trial/error, this is a bit more scalable, with a result that can be cached for subsequent calls. |
Beta Was this translation helpful? Give feedback.
-
+1 @sajayantony -- I'd prefer keeping this issue out of the scope of the If this is something that people want to start working on now, I'd encourage it to be moved to the |
Beta Was this translation helpful? Give feedback.
-
Moved to a discussion to capture the concepts, but avoid any active development, or design, for the artifacts-spect |
Beta Was this translation helpful? Give feedback.
-
As registries capabilities evolve, it will take time for all registries to enable the capabilities. Having a list of capabilities isn't limited to Notary or Artifacts. This issue tracks the design of an API for discovering the capabilities of a specific registry implementation, or even the capabilities of a specific repo within the registry. The response should provide the product/project/instance of the registry and a version, enabling an artifact client to cache the capabilities for subsequent interactions with the registry.
Existing Patterns
Discovering capabilities is a well-known pattern, such as smart device phones that implement capabilities based on the cost/model of the hardware or version of the software. Providing a list of capabilities enables applications to be written and released as one application (or client), that may check the capability of the device for what the application may provide. A device may have location services, wifi, bluetooth, a light, headset, nfc, multiple windows. The application checks the capability of the device, possibly prompting the user for authorization to use that capability, and proceeds based on that capabilities enablement or authorization of the user.
This same pattern can be used for registries. It's proposed to land this capability check with the artifact.manifest to set the stage for future capability checks.
Examples
docker.manifest
,docker index
,oci manifest
,oci index
,artifact.manifest
, ...)_catalog
apireferrers/
API support filtering based onartifactType
and/or annotationsDesign Discussion
A name/value api can be provided, enabling a list of capabilities the registry can respond with, allowing registry clients with the ability for how they may proceed.
There should be a set of standard registry properties, simply defined in the root, with a set of registry specific capabilities defined with an annotation style prefix.
/oras/v1/capabilities?capabilityName
For example:
/oras/v1/capabilities?supportedManifests
would respond with:The capabilities MAY be implemented at the repository level:
/oras/v1/{repository}/capabilities?capabilityName
Now or Later
For the immediate timeframe, the ORAS libraries will likely just query if the
referrers/
API exists to proxy the support of theartifacts.manifest
. If we can land a solid design of this API in the next several weeks, we can ship the ORAS libraries to be more robust.Tagging OCI Distribution Spec extension proposal for possible alignment.
Beta Was this translation helpful? Give feedback.
All reactions