-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Description
When verifying a bundle, the Verifier will reject any data wrapped in a DSSE envelope that is not an intoto attestation (ie the DSSE payloadType != application/vnd.in-toto+json):
sigstore-go/pkg/bundle/signature_content.go
Lines 55 to 57 in d20c39f
| if e.PayloadType != IntotoMediaType { | |
| return nil, ErrUnsupportedMediaType | |
| } |
This makes it impossible to verify bundles wrapping other kinds of data
Proposal
I would like to modify the verification logic to verify any other types of payload. If it's something else, than an attestation, the VerificationResult Statement field would empty:
sigstore-go/pkg/verify/signed_entity.go
Lines 211 to 217 in d20c39f
| type VerificationResult struct { | |
| MediaType string `json:"mediaType"` | |
| Statement *in_toto.Statement `json:"statement,omitempty"` | |
| Signature *SignatureVerificationResult `json:"signature,omitempty"` | |
| VerifiedTimestamps []TimestampVerificationResult `json:"verifiedTimestamps"` | |
| VerifiedIdentity *CertificateIdentity `json:"verifiedIdentity,omitempty"` | |
| } |
... or, if we want to return the data in the results, we could include the payload contents in the original base64 blob in a new field.
I'm working on a patch, let me know if there are any objections :)