-
Notifications
You must be signed in to change notification settings - Fork 58
[DRAFT] Rekor v1 and v2 support via signing-config #1387
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
This reverts commit 79a6d31. Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
This reverts commit e4470a9. Signed-off-by: Ramon Petgrave <[email protected]>
sigstore/sign.py
Outdated
@@ -293,6 +310,43 @@ def sign_artifact( | |||
), | |||
) | |||
|
|||
# Create the proposed hashedrekord entry | |||
if self._signing_ctx._rekor.major_api_version == REKOR_V1_API_MAJOR_VERSION: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about this: RekorClient provides a build_proposed_entry()
that takes artifatc_signature, b64_cert and hashed_input (and dsse/hashedrekord selection) as argument -- then this code (and the dsse code) could just call self._signing_context._rekor.build_proposed_entry()
This way we could keep the differences between the two rekor implementations more contained in the RekorClient(s).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea, especially since this patch is building the request body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed for just hashedrekord. dsse to come later.
I mentioned this elsewhere but for clarity: I would prefer the Rekorv2 changes to not touch the v1 RekorClient code if possible and instead be a separate implementation.
|
@jku Yes, like we discussed offline, it perhaps would be nicer if the V2 changes would not edit the current If not, I also mentioned that subclassing could make more sense. Abstract the common methods of V1 and V2 into another base class. If that, I don't think removing V1 support in the future after the estimated 18 months would be difficult. |
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Signed-off-by: Ramon Petgrave <[email protected]>
Client support for Rekor V2: sigstore-python #289
Summary
Adds Rekor V2 support, while being compatible with Rekor v1, swicthable with the signing-config, when signing and verify an artifact.
Lots of files in this PR:
_to_rekor()
for optional inclusion promise #1382Testing
Unit tests pass
locally with python 3.12.9. CI tests fails on python 3.9. And linters are not yet expected to pass.Signing and verifying both work.
Invoke with
TODO
Lots of items, so the last few items regarding testing will probably come in a separate PR.
v1.Service
in their constructors, which has bothurl
andmajor_api_version
. trust: Provide a better way to select service versions #1396Release Note
Documentation