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

Don't fail on TSA signatures we can't verify #45

Merged
merged 2 commits into from
Dec 15, 2023
Merged

Conversation

steiza
Copy link
Member

@steiza steiza commented Dec 14, 2023

Summary

See #43

As long as there are enough TSA signatures (that we can verify) to meet the threshold specified by the verification policy, we say that the bundle is valid.

Release Note

NONE

Documentation

N/A

For #43

As long as there are enough TSA signatures that do verify to meet the
threshold specified by the verification policy.

Signed-off-by: Zach Steindler <steiza@github.com>
Copy link
Contributor

@haydentherapper haydentherapper left a comment

Choose a reason for hiding this comment

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

Looks good!

We have the same fail-fast vs fail-after-threshold for tlogs - https://github.com/sigstore/sigstore-go/blob/main/pkg/verify/tlog.go#L85-L161
I can make this update, or would you like to?

assert.Error(t, err) // only 1 good should not meet threshold of 2
}

type oneGoodOneBadTimestampEntity struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

tiny nit would be calling this "goodAndUntrustedTimestampEntity" rather than "bad"

haydentherapper added a commit to haydentherapper/sigstore-go that referenced this pull request Dec 15, 2023
Like sigstore#45, as long as the threshold of expected timestamps is met, then
verification should succeed. Otherwise, entries without trust root
material should be skipped.

One benefit of having the log key ID be used to look up the correct
trust root material is that we can still error out if the signature is invalid.

Ref: sigstore#43

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
@haydentherapper
Copy link
Contributor

Rekor is done in #47 (wanted to code some today :) )

Signed-off-by: Zach Steindler <steiza@github.com>
@steiza steiza merged commit 9a59c7f into main Dec 15, 2023
9 checks passed
@steiza steiza deleted the timestamp-verify branch December 15, 2023 19:55
haydentherapper added a commit to haydentherapper/sigstore-go that referenced this pull request Dec 15, 2023
Like sigstore#45, as long as the threshold of expected timestamps is met, then
verification should succeed. Otherwise, entries without trust root
material should be skipped.

One benefit of having the log key ID be used to look up the correct
trust root material is that we can still error out if the signature is invalid.

Ref: sigstore#43

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
haydentherapper added a commit that referenced this pull request Jan 3, 2024
Like #45, as long as the threshold of expected timestamps is met, then
verification should succeed. Otherwise, entries without trust root
material should be skipped.

One benefit of having the log key ID be used to look up the correct
trust root material is that we can still error out if the signature is invalid.

Ref: #43

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
haydentherapper added a commit to haydentherapper/sigstore-go that referenced this pull request Jan 3, 2024
Like sigstore#45, as long as the threshold of expected timestamps is met, then
verification should succeed. Otherwise, entries without trust root
material should be skipped.

One benefit of having the log key ID be used to look up the correct
trust root material is that we can still error out if the signature is invalid.

Ref: sigstore#43

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
haydentherapper added a commit that referenced this pull request Jan 3, 2024
* Don't fail on Rekor entry verification for untrusted entries

Like #45, as long as the threshold of expected timestamps is met, then
verification should succeed. Otherwise, entries without trust root
material should be skipped.

One benefit of having the log key ID be used to look up the correct
trust root material is that we can still error out if the signature is invalid.

Ref: #43

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

* Address comments

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

* Add option to unify signed and log timestamps

This adds the WithObserverTimestamp option to verify that a threshold is
met using both RFC3161 signed timestamps and log integrated timestamps.

This updates the verification API for the log to only verify log
inclusion proofs or SETs, so that log and timestamp verification are not
conflated.

This also fixes a bug where the integrated time is used with an
inclusion proof. This is not safe to do, since the integrated time is
not authenticated metadata without a SignedEntryTimestamp signature.

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

* Fix conformance test

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

* Add WithIntegratedTimestamps

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

* Complete TODOs, add tests

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>

---------

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
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.

3 participants