Skip to content

Backport verified time changes #1492

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

Merged
merged 4 commits into from
Aug 6, 2025

Conversation

jku
Copy link
Member

@jku jku commented Aug 6, 2025

This backports #1489 into 3.6.x: the point is to make sure that sigstore-python 3.6.x can verify a bundle created by sigstore-python 4.0 (if that bundle contains a rekor v1 entry and an additional timestamp). Currently the verification fails on staging because

  • signing code in 4.0 will include a timestamp in the bundle
  • the timestamp certificate happens to use a keytype we do not support in 3.6.x (meaning the timestamp in the bundle is not considered valid).
  • the verification code currently requires at least one timestamp to be valid (if any timestamps are included in the bundle) even if the integrated time should suffice

This PR changes the last point: integrated time is enough.

I can add the release changes in this PR as well if there's nothing else for 3.6.5

jku added 4 commits August 6, 2025 14:46
* Clean verified time handling

Try to handle TSA timestamps and rekor v1 integrated time in a sensible
manner:
* no special cases for when TSA timestamps are present
* require one verified time by default
* Only allow integrated time to be a verified time if entry is from rekor v1
* VERIFY_TIMESTAMP_THRESHOLD now refers to "number of verified times",
  not just TSA timestamps
* Tests use a rekor v1 bundle but expect it to be invalid if the
  timestamp is invalid -- but the integrated time is
  enough. Fix this by monkeypatching VERIFY_TIMESTAMP_THRESHOLD

Signed-off-by: Jussi Kukkonen <[email protected]>

* verify: Rename VERIFY_TIMESTAMP_THRESHOLD

VERIFIED_TIME_THRESHOLD makes more sense since integrated time is also
in this threshold.

Strictly speaking this is an API change but since the meaning
has (slightly) changed already that makes sense.

Signed-off-by: Jussi Kukkonen <[email protected]>

---------

Signed-off-by: Jussi Kukkonen <[email protected]>
This check came with the backport of verified time fix, but it is not
useful here since we only support 0.0.1 entry types (and is
problematic since the LogEntry does not have the required fields here)

Signed-off-by: Jussi Kukkonen <[email protected]>
This test no longer exists in main branch and the expected result has
changed (valid_for.end is optional).

In 3.6.x  we want to keep testing the same thing we used to, so set
VERIFIED_TIME_THRESHOLD = 2, meaning both integrated time and timestamp
are needed (but expect timestamp to not be used since valid_for.end is not
set)

Signed-off-by: Jussi Kukkonen <[email protected]>
@jku jku requested a review from woodruffw August 6, 2025 12:26
@woodruffw
Copy link
Member

Thanks @jku!

I can add the release changes in this PR as well if there's nothing else for 3.6.5

Yeah, go for it 🙂

@woodruffw woodruffw merged commit baf3a6b into sigstore:series/3.6.x Aug 6, 2025
22 checks passed
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.

2 participants