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

Bump sigstore-go version #2106

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Bump sigstore-go version #2106

merged 2 commits into from
Jan 11, 2024

Conversation

rdimitrov
Copy link
Member

Fixes #2105

Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
…re-go

Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
@rdimitrov rdimitrov requested a review from a team as a code owner January 10, 2024 15:54
@@ -49,7 +49,7 @@ func New(trustedRoot, accessToken, cacheDir string) (*Sigstore, error) {
return nil, err
}
sev, err := verify.NewSignedEntityVerifier(trustedMaterial, verify.WithSignedCertificateTimestamps(1),
verify.WithTransparencyLog(1), verify.WithOnlineVerification())
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this because the API changed between versions, or is there a different reason for it?

Copy link
Member Author

Choose a reason for hiding this comment

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

This one is an API change 👍

Choose a reason for hiding this comment

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

Yea, we've separated requiring a number of transparency log entries from timestamps. Using the new WithObserverTimestamps API states that you require at least one timestamp from any source (the preferred API to use).

@@ -49,7 +49,7 @@ func New(trustedRoot, accessToken, cacheDir string) (*Sigstore, error) {
return nil, err
}
sev, err := verify.NewSignedEntityVerifier(trustedMaterial, verify.WithSignedCertificateTimestamps(1),
verify.WithTransparencyLog(1), verify.WithOnlineVerification())
verify.WithTransparencyLog(1), verify.WithOnlineVerification(), verify.WithObserverTimestamps(1))

Choose a reason for hiding this comment

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

Just wondering, what is the need for online verification? Is it that there is no state and bundles aren't persisted?

Copy link
Member Author

Choose a reason for hiding this comment

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

@haydentherapper - Currently Minder handles sigstore verification by processing artifact publish events from GitHub - when a signature comes, extract whatever is needed from it (build a v1 bundle, prev. it was using cosign verify) and verify it.

My impression was that we can't avoid the online verification yet since the signature we get is missing the inclusion proof rekor details we should provide in order to use the v2 bundle version(cosign does not store it).

I recall we touched this in the sigstore-go PR about the OCI example, so thus why I defaulted to online verification (ref. comment). At least this was my understanding for it back then, but I'll be happy to revisit and align this to sigstore-go's preferred approach if you have suggestions 💯

Choose a reason for hiding this comment

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

Yep, you’re totally right, forgot this is because it’s using the converted v0.1 bundles.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the input though! 👍 I would be happy to keep minder on par with the latest sigtore-go, i.e. update to the latest bundle version once this is possible, etc.

@@ -49,7 +49,7 @@ func New(trustedRoot, accessToken, cacheDir string) (*Sigstore, error) {
return nil, err
}
sev, err := verify.NewSignedEntityVerifier(trustedMaterial, verify.WithSignedCertificateTimestamps(1),
verify.WithTransparencyLog(1), verify.WithOnlineVerification())

Choose a reason for hiding this comment

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

Yea, we've separated requiring a number of transparency log entries from timestamps. Using the new WithObserverTimestamps API states that you require at least one timestamp from any source (the preferred API to use).

@rdimitrov rdimitrov merged commit 783aae7 into mindersec:main Jan 11, 2024
17 checks passed
@rdimitrov rdimitrov deleted the bump-sigstore branch January 11, 2024 12:59
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.

Update sigstore-go version
4 participants