1
0
mirror of https://github.com/opencontainers/distribution-spec.git synced 2025-04-18 20:04:03 +03:00

554 Commits

Author SHA1 Message Date
Brandon Mitchell
583e014d15
Merge pull request #563 from wking/clarify-referrer-tag-vs-digest-algorithm
spec: Clarify Referrers Tag Schema vs. alternative algorithms
2025-02-20 14:22:32 -05:00
W. Trevor King
e839150a54 spec: Clarify Referrers Tag Schema vs. alternative algorithms
From the referenced OCI spec:

  digest                ::= algorithm ":" encoded
  algorithm             ::= algorithm-component (algorithm-separator algorithm-component)*
  algorithm-component   ::= [a-z0-9]+
  algorithm-separator   ::= [+._-]
  encoded               ::= [a-zA-Z0-9=_-]+

But from the distribution-spec:

  Throughout this document, `<reference>` as a tag MUST be at most 128 characters in length and MUST match the following regular expression:

  `[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}`

Happily, the fist character of algorithm must match
algorithm-component, and its [a-z0-9] a subset of the tag regexp's
opening [a-zA-Z0-9_].  And the colon separating algorithm from encoded
was already addressed in the outgoing text.  But the digest definition
also allows + in the algorithm-separator and = in the encoded portion,
which the tag regexp does not allow, so with the incoming wording I'm
requiring that to be replaced by a - as well, so clients make
consistent choices when deciding how to handle that character while
forming distribution-spec referrer tags.

We need some overall truncation to keep the tag under 128 characters,
again so clients make consistent choices when trying to compress from
the strings the digest specification allows to the strings tags allow.
There is no requirement in the distribution spec as far as I can tell
that registries support tags up to 128 characters, but given that the
spec explicitly requires clients to not exceed that length, it seems
likely that registries will allow tags of that length, and not require
further truncation.

I'm requiring clients to truncate the algothim to 32 characters and
the encoded section to 64 characters, because that's one possible
reading of the outgoing "limit of 64 characters" parenthetical, at
least one client had implemented it that way [1], and Brandon
explicitly requested the 32-and-64 approach [2].

And clients are obviously free to create whatever tags they like that
the registry will accept.  The MUST I'm adding does not forbid that.
It only clarifies the single distribution-spec Referrers Tag
associated with a given digest, because if there could be multiple
Referrers Tag for each digest, all distribution-spec
referrer-retrieving clients would have to iterate over that whole set
of possibilities, in case some distribution-spec referrer-pushing
client happened to use one of that digest's other Referrers Tag
formats.

[1]: dbb1434fd4/types/referrer/referrer.go (L157)
[2]: https://github.com/opencontainers/distribution-spec/pull/563#pullrequestreview-2599659231

Signed-off-by: W. Trevor King <wking@tremily.us>
2025-02-06 12:51:48 -08:00
Brandon Mitchell
7872490e9d
Merge pull request #561 from sudo-bmitch/pr-v1.1.1
Release v1.1.1
2025-01-29 15:06:01 -05:00
Derek McGowan
812fc5be71
Merge pull request #562 from sudo-bmitch/pr-release-specs
Add a release step for specs.opencontainers.org
2025-01-24 15:48:33 -07:00
Brandon Mitchell
e032387939
Add a release step for specs.opencontainers.org
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-01-24 10:52:01 -05:00
Brandon Mitchell
f1286ee8a4
version: bump back to +dev
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-01-23 11:06:48 -05:00
Brandon Mitchell
a139cc4231
version: release v1.1.1
Signed-off-by: Brandon Mitchell <git@bmitch.net>
v1.1.1
2025-01-23 11:05:58 -05:00
Brandon Mitchell
eeddb23523
Merge pull request #560 from sudo-bmitch/pr-update-gha
Update GHA uses
2025-01-23 10:43:16 -05:00
Brandon Mitchell
f1a874a120
Update GHA uses
- actions/checkout v3 -> v4
- actions/setup-go v3 -> v5
- docker/login-action v2 -> v3
- actions/upload-artifact v3 -> v4
- Replace deprecated set-output with $GITHUB_OUTPUT file

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-01-16 16:50:10 -05:00
Josh Dolitsky
37e5199a9a
Merge pull request #558 from sudo-bmitch/pr-golang-x-net
Update golang.org/x/net to v0.33.0
2024-12-20 12:48:01 -06:00
Brandon Mitchell
aae3b8e060
Update golang.org/x/net to v0.33.0
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-12-20 11:24:03 -05:00
Mike Brown
75ca12588f
Merge pull request #556 from burgerdev/require-digest-verification
Explicitly recommend content digest information
2024-12-12 12:09:13 -06:00
Markus Rudy
24084d4f72 Explicitly recommend content digest information
The spec mandated only the verification of digests in the response
headers, not the requested digests. That allowed conformant clients not
to validate content at all, leaving the users of these clients exposed
to accidental or malicious bad content.

This commit adds a "SHOULD verify" clause to the blob and manifest pull
sections. It's not a MUST to keep it somewhat backwards compatible with
requirements of 1.1 and prior, but it's not a MAY to convey that "the
full implications should be understood and the case carefully weighed"
(description in RFC 2119) for a client not to verify digests.

This commit also aligns the recommendations for server-returned digests
between manifest and blob - now both can be ignored, but must be
verified if used.

Fixes: #549

Co-authored-by: Brandon Mitchell <git@bmitch.net>
Signed-off-by: Markus Rudy <mr@edgeless.systems>
2024-12-02 17:06:39 +01:00
Brandon Mitchell
8376368dd8
Merge pull request #555 from sudo-bmitch/pr-endpoint-status
Align endpoint status with rest of spec
2024-09-26 14:51:04 -04:00
Brandon Mitchell
1a6e7d336e
Align endpoint status with rest of spec
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-25 14:01:23 -04:00
Mike Brown
8dba5f1d8d
Merge pull request #460 from sudo-bmitch/pr-release-notice
Add step to update website after a release
2024-09-19 12:07:51 -05:00
Brandon Mitchell
82954d9048
Add step to update website after a release
This also cleaned up linting issues in the doc and replaced references to the runtime spec.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-10 16:44:47 -04:00
Brandon Mitchell
cf9023d6d9
Merge pull request #552 from sudo-bmitch/pr-define-tag
Clarify tags and deletion of manifests
2024-09-10 16:37:58 -04:00
Brandon Mitchell
e3abeed06b
Clarify tags and deletion of manifests
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-05 17:02:11 -04:00
Mike Brown
11b8e3fba7
Merge pull request #541 from sudo-bmitch/pr-conformance-blob-404
Allow 404 on blob deletion in conformance tests
2024-07-18 12:12:42 -05:00
Derek McGowan
f43ee1b532
Merge pull request #325 from sudo-bmitch/pr-registry-vs-repository
Clarify repository vs registry terminology
2024-07-18 10:12:01 -07:00
Josh Dolitsky
58d034eaee
Merge pull request #542 from sudo-bmitch/pr-repository-name-limits
Add note on repository name length limit
2024-07-11 16:21:19 -05:00
Josh Dolitsky
2e5ab3faf6
Merge pull request #544 from jlbutler/filter-nit
Fix a nit in referrers filtering
2024-07-05 09:38:37 -05:00
Jesse Butler
bc5843c337 fix: nit in referrers filtering
Signed-off-by: Jesse Butler <butlerjl@amazon.com>
2024-07-04 12:30:02 -04:00
Brandon Mitchell
7d412fc78d
Add note on repository name length limit
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-06-27 20:29:24 -04:00
Brandon Mitchell
c496de1a92
Define a repository and fix usage of the term
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-06-20 14:35:06 -04:00
Derek McGowan
2291163927
Merge pull request #537 from rchincha/perf
Add support for content range requests when getting blobs
2024-06-20 10:07:12 -07:00
Brandon Mitchell
47008ca930
Allow 404 on blob deletion in conformance tests
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-06-17 09:37:45 -04:00
Ramkumar Chinchani
9d4c4a9f83
Add support for content range requests when getting blobs
OCI artifacts support has landed in various OCI specs v1.1.0 which
allows for arbitrary artifact types, small and large.

Large artifacts (even existing container images) pose a particular
challenge that:

1) it takes too long to download
2) it takes too long to unpack

This PR begins to address 1) above.

The client can initiate a HEAD request to get the size and later
multiple GET range requests to download a blob in parallel.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2024-05-31 04:40:38 +00:00
Derek McGowan
8a871c8234
Merge pull request #471 from zdyxry/main
Fix order in spec TOC
2024-05-16 10:28:43 -07:00
Brandon Mitchell
2ed79d930e
Merge pull request #470 from sudo-bmitch/pr-tag-pagination
Tag pagination
2024-05-09 17:58:55 -04:00
Josh Dolitsky
d679e21df4
Merge pull request #476 from waynr/dont-rely-on-tag-listing-in-manifest-pull-test
conformance: pull tests shouldn't rely on tag listing
2024-04-25 12:53:30 -05:00
Brandon Mitchell
81bb239e0c
Merge pull request #534 from sudo-bmitch/pr-junit-reporter
Conformance: remove labels from junit reporter output
2024-04-25 13:21:36 -04:00
Derek McGowan
67a9d9e827
Merge pull request #535 from opencontainers/dependabot/go_modules/conformance/golang.org/x/net-0.23.0
build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 in /conformance
2024-04-22 06:32:45 -07:00
dependabot[bot]
adf534acbd
build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 in /conformance
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.17.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 12:36:22 +00:00
Brandon Mitchell
37a73f46d7
Tag pagination
Updating tag listing to prefer the Link header.
This aligns with the behavior of actual registries, but will break clients implementing the current spec.
Breaking the spec was preferred over breaking existing registries and clients that work with them.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-04-04 15:20:53 -04:00
Brandon Mitchell
aa83cb4bd9
Conformance: remove labels from junit reporter output
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-04-03 16:00:32 -04:00
Mike Brown
75d28161df
Merge pull request #528 from shizhMSFT/404_on_tag_list
fix: allow 404 on tag list for virtual repositories
2024-03-25 10:22:30 -05:00
Vincent Batts
35eb57883d
Merge pull request #526 from opencontainers/emeritus-vbatts
MAINTAINERS: move vbatts to EMERITUS
2024-03-23 20:37:41 -04:00
Shiwei Zhang
33f0657f5c chore: apply strict equal comparison
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
2024-03-16 21:41:38 +08:00
Derek McGowan
7ac9a4cdd7
Merge pull request #529 from sudo-bmitch/pr-fix-redaction
Fix redaction of conformance tests
2024-03-15 12:22:18 -07:00
Vincent Batts
a6971cc313
CODEOWNERS: remove vbatts
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2024-03-15 12:49:59 -04:00
Brandon Mitchell
4d091a9c78
Fix redaction of conformance tests
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-03-15 11:39:52 -04:00
Shiwei Zhang
631b369886 fix: allow 404 on tag list for virtual repositories
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
2024-03-15 11:54:35 +08:00
Josh Dolitsky
a47ad5164a
Merge pull request #525 from sudo-bmitch/pr-conformance-teardown-by-digest
Teardown manifests by digests
2024-03-14 13:25:50 -05:00
Vincent Batts
36cd91d46a
MAINTAINERS: move vbatts to EMERITUS
Happy to still be brought into conversations, but do not want to slow
progress of the active maintainers.

🐐🧁🧡

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2024-03-14 13:53:56 -04:00
Brandon Mitchell
d6bcd9957d
Teardown manifests by digests
Performing a teardown by tag requires support for a 400 (bad request) response.
The test tag is populated with manifest 4 which was already deleted, so remove the tag from the teardown.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-03-14 10:46:58 -04:00
Josh Dolitsky
0e5fe0915b
Merge pull request #464 from CathalMullan/main
Correct `last` query parameter type in API endpoints
2024-03-12 17:07:40 -05:00
Stephen Day
f453e4a5b5
Merge pull request #480 from opencontainers/dependabot/go_modules/conformance/golang.org/x/net-0.17.0
build(deps): bump golang.org/x/net from 0.11.0 to 0.17.0 in /conformance
2024-02-21 13:22:24 -08:00
Josh Dolitsky
48588f1a3f
Merge pull request #509 from sudo-bmitch/pr-conformance-name
Make the conformance test names unique
2024-02-16 16:56:11 -06:00