Skip to content

docs: add ratify cosign verifier design doc#20

Closed
junczhu wants to merge 2 commits intonotaryproject:mainfrom
junczhu:cosign-verifier-design
Closed

docs: add ratify cosign verifier design doc#20
junczhu wants to merge 2 commits intonotaryproject:mainfrom
junczhu:cosign-verifier-design

Conversation

@junczhu
Copy link
Copy Markdown
Contributor

@junczhu junczhu commented Mar 13, 2025

This document outlines the design of a Cosign verifier library using the newly developed sigstore-go API.
The goals:

  • Referred to the sigstore/cosign library for ratify verifier library. Ensure compatibility with the cosign CLI experience.
  • Use Verifier, TrustMaterial and Policy as verification materials.

Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@junczhu junczhu force-pushed the cosign-verifier-design branch 2 times, most recently from 35675b7 to 7d21d11 Compare March 17, 2025 09:08
@junczhu junczhu marked this pull request as ready for review March 17, 2025 09:09
@junczhu junczhu force-pushed the cosign-verifier-design branch 6 times, most recently from 9672463 to bbab7e4 Compare March 18, 2025 04:37
@junczhu junczhu marked this pull request as draft March 18, 2025 07:15
@junczhu junczhu force-pushed the cosign-verifier-design branch 3 times, most recently from 21484cd to bf68d98 Compare March 25, 2025 01:04
@junczhu junczhu marked this pull request as ready for review March 25, 2025 01:08
@junczhu junczhu force-pushed the cosign-verifier-design branch 3 times, most recently from 673eb08 to b00b41b Compare March 25, 2025 03:37
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
@junczhu junczhu force-pushed the cosign-verifier-design branch from b00b41b to 9d18e98 Compare March 25, 2025 03:43
@shizhMSFT shizhMSFT requested a review from Copilot March 26, 2025 06:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a design document outlining the implementation of a Cosign verifier library built on the new sigstore-go API, ensuring compatibility with the cosign CLI experience and alignment with ratify verification workflows.

  • Introduces the design overview and component breakdown for the new verifier library.
  • Details the API definitions for verifier configuration, policies, trust material, and verification results.
  • Compares legacy and new implementations with emphasis on modular design and enhanced performance.

type VerifyEntity struct {
// verify.SignedEntity is a interface defined by sigstore-go as the verify input
signedEntity verify.SignedEntity
// identityPolices is a list of policy options as verify input
Copy link

Copilot AI Mar 26, 2025

Choose a reason for hiding this comment

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

Typo in the comment: 'identityPolices' should be corrected to 'identityPolicies'.

Suggested change
// identityPolices is a list of policy options as verify input
// identityPolicies is a list of policy options as verify input

Copilot uses AI. Check for mistakes.
}

type TrustMaterialProvider interface {
// user ocispec.Descriptor to retrive the root.TrustedMaterial
Copy link

Copilot AI Mar 26, 2025

Choose a reason for hiding this comment

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

Typo in the comment: 'retrive' should be corrected to 'retrieve'.

Suggested change
// user ocispec.Descriptor to retrive the root.TrustedMaterial
// user ocispec.Descriptor to retrieve the root.TrustedMaterial

Copilot uses AI. Check for mistakes.
tlogEntriesThreshold int
// requireSCTs requires SCTs in Fulcio certificates
requireSCTs bool
// ctlogEntriesTreshold is the minimum number of verified SCTs in
Copy link

Copilot AI Mar 26, 2025

Choose a reason for hiding this comment

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

Typo in the comment: 'ctlogEntriesTreshold' should be corrected to 'ctlogEntriesThreshold'.

Suggested change
// ctlogEntriesTreshold is the minimum number of verified SCTs in
// ctlogEntriesThreshold is the minimum number of verified SCTs in

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

Let's model the cosign as a black box.


### 4.1. Verifier Initialize

```go
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

formatting required

PolicyConfig(ocispec.Descriptor) PolicyConfig
}

type Policy{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

compile error

@junczhu junczhu closed this Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants