Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add support for referrers attestations#1409

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
arewm wants to merge1 commit intotektoncd:main
base:main
Choose a base branch
Loading
fromarewm:use-referrers-api

Conversation

@arewm
Copy link
Contributor

Changes

While the backwards compatible tag-based attestation method works, it can result in a lot of additional tags being pushed to OCI registries. In order to maintain fewer tags, Chains should be able to use the referrer's API when pushing signatures and attestations.

Co-Authored-By: Claudenoreply@antrhopic.com
Signed-off-by: arewmarewm@users.noreply.github.com

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • HasDocs included if any changes are user facing
  • HasTests included if any functionality added or changed
  • Follows thecommit message standard
  • Meets theTekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Add support for pushing OCI signatures and provenance with the referrer's API

@tekton-robottekton-robot added size/LDenotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-testIndicates a PR that requires an org member to verify it is safe to test. labelsAug 8, 2025
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR isNOT APPROVED

This pull-request has been approved by:
To complete thepull request process, please assignpriyawadhwa after the PR has been reviewed.
You can assign the PR to them by writing/assign @priyawadhwa in a comment when ready.

The full list of commands accepted by this bot can be foundhere.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing/approve in a comment
Approvers can cancel approval by writing/approve cancel in a comment

@tekton-robot
Copy link

Hi@arewm. Thanks for your PR.

I'm waiting for atektoncd member to verify that this patch is reasonable to test. If it is, they should reply with/ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors shouldjoin the org to skip this step.

Once the patch is verified, the new status will be reflected by theok-to-test label.

I understand the commands that are listedhere.

Instructions for interacting with me using PR comments are availablehere. If you have questions or suggestions related to my behavior, please file an issue against thekubernetes/test-infra repository.

@arewmarewmforce-pushed theuse-referrers-api branch 3 times, most recently from5549931 to9f1e273CompareAugust 8, 2025 18:57
@arewmarewm marked this pull request as draftAugust 8, 2025 19:26
@tekton-robottekton-robot added the do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress. labelAug 8, 2025
@anithapriyanatarajan
Copy link
Contributor

anithapriyanatarajan commentedAug 11, 2025
edited
Loading

@arewm - Could you clarify if all the OCI registries support the referrer API end point? If not could we include validation and default fall back option if the end point is not supported for the given registry. Also, Recommend to create an upstream issue for this with label kind/feature with more details on why we are incorporating this enhancement.Thanks

vdemeester reacted with thumbs up emoji

@arewm
Copy link
ContributorAuthor

All registries might not support the referrers API but this is also why the configuration can be defined.

After creating this PR, I investigated the gap more and createdsigstore/cosign/issues/4335. I used cosign's support for the new bundle format in the PR. I don't know if there are any implications with this change, but I suspect that we might actually want that to be configured separately from the use of the referrer's API.

My understanding is that Cosign should handle the fallback, but it does make sense to add that as a test case here too.

After I do a little more investigation with cosign, I will create an issue in Chains to further describe the challenge I am trying to resolve (the motivation is similar to the cosign issue).

lcarva reacted with thumbs up emoji

@arewm
Copy link
ContributorAuthor

I found the spec:https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.md#unavailable-referrers-api

A client that pushes an image manifest with a defined subject field MUST verify thereferrers API is available or fallback to updating the image index pushed to a tag described by thereferrers tag schema. A client querying thereferrers API and receiving a 404 Not Found MUST fallback to using an image index pushed to a tag described by thereferrers tag schema.

So we should expect cosign to fall back appropriately. The configuration change is just toattempt to use the referrer's API in the first place instead of only using the legacy option.

anithapriyanatarajan reacted with eyes emoji

arewm added a commit to arewm/tekton-chains that referenced this pull requestSep 16, 2025
Proposing to bump the cosign version to include new library calls topush attestations with the referrer's API.- [Release notes](https://github.com/sigstore/cosign/releases/tag/v2.6.0)- [Changelog](https://github.com/sigstore/cosign/blob/6431af15a8066c4b33c7232fc2dba3f9278a16a5/CHANGELOG.md)- [Commits](sigstore/cosign/compare/v2.5.3...v2.6.0)The new changes desired aresigstore/cosign/pull/4357 which shouldbetter support the work intektoncd#1409.Signed-off-by: arewm <arewm@users.noreply.github.com>rh-pre-commit.version: 2.3.2rh-pre-commit.check-secrets: ENABLED
arewm added a commit to arewm/tekton-chains that referenced this pull requestSep 16, 2025
Proposing to bump the cosign version to include new library calls topush attestations with the referrer's API.- [Release notes](https://github.com/sigstore/cosign/releases/tag/v2.6.0)- [Changelog](https://github.com/sigstore/cosign/blob/6431af15a8066c4b33c7232fc2dba3f9278a16a5/CHANGELOG.md)- [Commits](sigstore/cosign@v2.5.3...v2.6.0)The new changes desired aresigstore/cosign/pull/4357 which shouldbetter support the work intektoncd#1409.Signed-off-by: arewm <arewm@users.noreply.github.com>rh-pre-commit.version: 2.3.2rh-pre-commit.check-secrets: ENABLED
lcarva pushed a commit that referenced this pull requestSep 18, 2025
* Bump github.com/sigstore/cosign/v2 from 2.5.3 to 2.6.0Proposing to bump the cosign version to include new library calls topush attestations with the referrer's API.- [Release notes](https://github.com/sigstore/cosign/releases/tag/v2.6.0)- [Changelog](https://github.com/sigstore/cosign/blob/6431af15a8066c4b33c7232fc2dba3f9278a16a5/CHANGELOG.md)- [Commits](sigstore/cosign@v2.5.3...v2.6.0)The new changes desired aresigstore/cosign/pull/4357 which shouldbetter support the work in#1409.Signed-off-by: arewm <arewm@users.noreply.github.com>rh-pre-commit.version: 2.3.2rh-pre-commit.check-secrets: ENABLED* Fix LoadPrivateKey API breaking change for cosign v2.6.0- Add LoadOption parameter to LoadPrivateKey calls in x509.go and clients.go- Pass nil for defaultLoadOptions to use sensible defaults (ED25519ph)- Update both production code and test code to match new APIThe LoadPrivateKey function signature changed in cosign v2.6.0 toinclude a third parameter for LoadOption configuration. Passing niluses the default ED25519ph behavior which is appropriate for thisuse case.Co-authored-by: Claude Sonnet <claude@anthropic.com>Signed-off-by: arewm <arewm@users.noreply.github.com>rh-pre-commit.version: 2.3.2rh-pre-commit.check-secrets: ENABLED
@tekton-robottekton-robot added size/XXLDenotes a PR that changes 1000+ lines, ignoring generated files. and removed size/LDenotes a PR that changes 100-499 lines, ignoring generated files. labelsSep 19, 2025
@@ -0,0 +1,389 @@
# OCI Storage Format Migration Guide
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is something that Claude created. I'll leave it for now, but will plan to remove it before merging.

@arewmarewm marked this pull request as ready for reviewSeptember 23, 2025 02:33
@tekton-robottekton-robot removed the do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress. labelSep 23, 2025
@arewm
Copy link
ContributorAuthor

arewm commentedSep 23, 2025
edited
Loading

I just reworked this implementation to include the changes made insigstore/cosign#4357. It is not currently possible for cosign to download all of these attestations, but that is also something that I am working on. I have been using Tekton as the attestation generator for testing Cosign, so as I continue the investigation, this PR may change.

I have some sample images that I generated attestations and signatures for here:https://quay.io/repository/arewm/test-repo?tab=tags

Add storage.oci.format configuration supporting three storagestrategies for OCI signatures and attestations:- "legacy": Tag-based storage with DSSE format (default)- "referrers-api": OCI 1.1 referrers API with DSSE format- "protobuf-bundle": OCI 1.1 referrers API with protobuf  bundle formatImplementation includes:- Configuration layer with format validation and defaults- Format-based routing in AttestationStorer and SimpleStorer- Three storage implementations per storer type- Legacy backend integration with format-aware storers- Comprehensive test coverage for all three formatsEnables adoption of OCI 1.1 referrers API while maintainingbackward compatibility with existing tag-based storage. Allformats also work correctly with both certificate-based andx509 key configurations.🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>Signed-off-by: arewm <arewm@users.noreply.github.com>rh-pre-commit.version: 2.3.2rh-pre-commit.check-secrets: ENABLED
@arewmarewm marked this pull request as draftSeptember 24, 2025 03:16
@tekton-robottekton-robot added the do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress. labelSep 24, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lcarvalcarvaAwaiting requested review from lcarva

@wlynchwlynchAwaiting requested review from wlynch

@chitrangpatelchitrangpatelAwaiting requested review from chitrangpatel

Assignees

No one assigned

Labels

do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress.needs-ok-to-testIndicates a PR that requires an org member to verify it is safe to test.size/XXLDenotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@arewm@tekton-robot@anithapriyanatarajan

[8]ページ先頭

©2009-2025 Movatter.jp