Skip to content

Pushing a manifest with a sha512 digest fails #4420

Open

Description

@sudo-bmitch

Description

Pushing a manifest with a sha512 digest returns an HTTP 400 / "DIGEST_INVALID" error.

Reproduce

Here are two possible ways to reproduce it:

Option 1, using regctl (v0.7.0 or newer):

regctl image mod --digest-algo sha512 busybox --create localhost:5000/library/busybox:sha512

Option 2, using the conformance tests in opencontainers/distribution-spec#543

Expected behavior

Pushing a manifest by digest should support OCI image-spec registered digest algorithms.

registry version

ghcr.io/distribution/distribution:3.0.0-beta.1 (older registry:2 images also experienced the same issue)

Additional Info

Pushing a single platform image by tag works, but with the registry default sha256 digest. So the error is not from parsing the config and layer digests. Pushing the blobs with a sha512 digest also works with the post/put workflow.

Activity

  1. thaJeztah commented on Jul 25, 2024

    @thaJeztah
    Member

    I recalled that sha256 was required, but sha512 optional; looking at the original PR, it mentioned MUST implement for sha256 and MAY implement for sha512; https://github.com/opencontainers/image-spec/pull/609

    that wording seems to be still there; https://github.com/opencontainers/image-spec/blob/main/descriptor.md#sha-512

    For the distribution spec, wording seems to be more ambiguous but referring to the image spec

  2. sudo-bmitch commented on Jul 25, 2024

    @sudo-bmitch
    ContributorAuthor

    To add more context, we're looking at what is needed to also support chunked blob pushes and tagged manifests with a different digest.
    opencontainers/distribution-spec#543

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions