This is version 1 of this specification.
The CAS-template protocol is configured via a single URI Template.
When configured via a casEngines
entry, the uri
property MUST be set, and its value is the URI Template.
For a given blob digest, consumers MUST provide at least the following variables:
digest
, matchingdigest
in thedigest
rule.algorithm
, matchingalgorithm
in thedigest
rule.encoded
, matchingencoded
in thedigest
rule.
and expand the URI Template as defined in RFC 6570 section 3. If the expanded URI reference is a relative reference, it MUST be resolved following RFC 3986 section 5.
An example casEngines
entry using the registered oci-cas-template-v1
protocol identifier is:
{
"protocol": "oci-cas-template-v1",
"uri": "https://a.example.com/cas/{algorithm}/{encoded:2}/{encoded}"
}
A digest like sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
matches digest
with:
sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
asdigest
,sha256
asalgorithm
, ande3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
asencoded
so the expanded URI is:
https://a.example.com/cas/sha256/e3/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855