Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using artifactType to identify the signature type while pushing #975

Open
MinerYang opened this issue Jun 18, 2024 · 1 comment
Open

Using artifactType to identify the signature type while pushing #975

MinerYang opened this issue Jun 18, 2024 · 1 comment
Labels
enhancement New feature or request spec Specifications to define the product requirements
Milestone

Comments

@MinerYang
Copy link

Is your feature request related to a problem?

Would notation consider to wrap the application/vnd.cncf.notary.signature from config.MediaType to artifactType field in the signature manifest to better utilize oci-spec v1.1

  • Current behavior
    Signature manifest would looks like below:
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.manifest.v1+json",
  "config": {
    "mediaType": "application/vnd.cncf.notary.signature",
    "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
    "size": 2
  },
  "layers": [
    {
      "mediaType": "application/jose+json",
      "digest": "sha256:fb748695cc875eeec78c644d5346e560bfd84782bc1f4ff914d9e970792430d4",
      "size": 2121
    }
  ],
  "subject": {
    "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
    "digest": "sha256:d37ada95d47ad12224c205a938129df7a3e52345828b4fa27b03a98825d1e2e7",
    "size": 524
  },
  "annotations": {
    "io.cncf.notary.x509chain.thumbprint#S256": "[\"0f653b1a75d8fe98fcb04dd73aab8a00c746985f2aafa427a04ace1b5adb2822\"]",
    "org.opencontainers.image.created": "2024-06-18T08:24:22Z"
  }
}

What solution do you propose?

  • Expected behavior
    Using artifactType in signature manifest to specify sig type
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.manifest.v1+json",
  "artifactType": "application/vnd.cncf.notary.signature",
  "config": {
    "mediaType": "application/vnd.oci.image.config.v1+json",
    "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
    "size": 2
  },
  "layers": [
    {
      "mediaType": "application/jose+json",
      "digest": "sha256:fb748695cc875eeec78c644d5346e560bfd84782bc1f4ff914d9e970792430d4",
      "size": 2121
    }
  ],
  "subject": {
    "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
    "digest": "sha256:d37ada95d47ad12224c205a938129df7a3e52345828b4fa27b03a98825d1e2e7",
    "size": 524
  },
  "annotations": {
    "io.cncf.notary.x509chain.thumbprint#S256": "[\"0f653b1a75d8fe98fcb04dd73aab8a00c746985f2aafa427a04ace1b5adb2822\"]",
    "org.opencontainers.image.created": "2024-06-18T08:24:22Z"
  }
}

What alternatives have you considered?

While notation verify server/registry compatible with oci-spec 1.1 and referrer-api available, render signature manifest with Subject and artifactType fields.

Any additional context?

notaion version

Version:     1.2.0-alpha.1
Go version:  go1.22.4
Git commit:  2f4387276b4a73fb4b81f9499afe0aa156b56218
@MinerYang MinerYang added enhancement New feature or request triage Need to triage labels Jun 18, 2024
@yizha1 yizha1 added spec Specifications to define the product requirements and removed triage Need to triage labels Jun 21, 2024
@yizha1 yizha1 added this to the 1.3.0 milestone Jun 21, 2024
@yizha1
Copy link
Contributor

yizha1 commented Jun 21, 2024

The Notary Project specification work is tracked by issue notaryproject/specifications#295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request spec Specifications to define the product requirements
Projects
Status: Todo
Development

No branches or pull requests

2 participants