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

Remove conformance tests that use detached materials #173

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

steiza
Copy link
Member

@steiza steiza commented Dec 6, 2024

Summary

For #122. All the clients (including cosign!) are moving away from detached materials in favor of bundles.

This will help unblock things like sigstore/sigstore-go#277.

Release Note

  • Removed sign and verify from conformance test protocol; all tests use sign-bundle and verify-bundle.

Documentation

N/Aish; already updated docs/cli_protocol.md as part of this pull request.

For sigstore#122

Signed-off-by: Zach Steindler <steiza@github.com>
woodruffw
woodruffw previously approved these changes Dec 6, 2024
Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

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

Good riddance!

@loosebazooka
Copy link
Member

loosebazooka commented Dec 6, 2024

Could it make sense to organize these into their own test file and let people explicitly include it? Could it help prevent a regression in cosign while we are transitioning it?

Although "good riddance" is a pretty strong argument

@woodruffw
Copy link
Member

Could it make sense to organize these into their own test file and let people explicitly include it? Could it help prevent a regression in cosign while we are transitioning it?

I'm OK with this, if we want to keep them around: IMO having the disabled by default and then allowing integrators to do with-nonstandard-detached-material-tests: true would probably be sufficient 🙂

OTOH I think this is all 100% unstandardized, so having them in the conformance suite at all isn't fantastic, especially if it's dragging down efforts to get other things added. So if cosign et al. want these for regression testing, it might make sense to copy/vendor them directly into the test suite there.

@steiza
Copy link
Member Author

steiza commented Dec 6, 2024

Could it help prevent a regression in cosign while we are transitioning it?

Cosign's current conformance test integration uses sigstore-go for bundles, and for non-bundles it first assembles the detached materials into a bundle so it can use sigstore-go: https://github.com/sigstore/cosign/blob/e7667bd9d71d99aaa9ad3489241f5abe92fe0c9c/cmd/conformance/main.go#L114-L120

It's possible that after sigstore/cosign#3844 lands (which is currently a draft), we could update cosign's conformance test to exercise the detached materials case. On the other hand, the conformance detached materials support is blocking other work, like sigstore/sigstore-go#277.

loosebazooka
loosebazooka previously approved these changes Dec 6, 2024
@loosebazooka
Copy link
Member

loosebazooka commented Dec 6, 2024

Alright, sgtm, let's go!

haydentherapper
haydentherapper previously approved these changes Dec 6, 2024
Copy link
Collaborator

@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.

Have we verified that all tests here are covered by the bundle tests?

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

steiza commented Dec 9, 2024

Have we verified that all tests here are covered by the bundle tests?

There is a surprising amount of subtlety here.

I added a test back in that checks that the ctlog public key is correct. The other test on mismatched artifacts which should be covered by test_verify_rejects_mismatched_hashedrekord. The empty tests are checking for mismatched signatures (or certificates), which should be covered by test_verify_rejects_invalid_signature.

I don't think we're substantially losing coverage with this change, although the way some cases are tested are changing slightly.

@woodruffw
Copy link
Member

Thanks a ton @steiza!

@woodruffw woodruffw merged commit 76bd3d2 into sigstore:main Dec 9, 2024
5 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.

4 participants