Fix keyless verification of openvex attesatations #147
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TLDR
This is a large PR that fixes keyless verification of the OpenVEX attestations as reported in #143
This is a solid but temporary fix, the functionality in this PR will be moved to
openvex/discoery
and an upcoming trust module but it should do the work while we finish those new modules.The summary of changes
Commit 4e44f21: Refactor attestation.Sign() + Tlog append
The main goal is to add two missing features:
Register the signature data to Rekor
After signing, we now register the signature in the sigstore transparency
log. This is essential to allow for keyless verification.
New SignatureData Field
The attestation now has a new SignatureData field that captures the results
of the signing operation. This is required to make data like the cert and the
proof of inclusion available externally (eg to record them in oci annotations).
The
attestation.Sign()
method has been heavily refactored but should be simppleras the work it does is now broken into three internal functions:
initSigning
: creates context and optionssignAttestation
: Performs the actual signingappendSignatureDataToTLog
: Uploads data to rekorCommit 5aa0d44: OCI Annotations
This commit modifies the attachAttestation function of the vexctl
implementation to add the OCI annotations required to keylessly
verify OpenVEX attestations.
/cc @cpanato
Fixes #143
Signed-off-by: Adolfo García Veytia (Puerco) [email protected]