Skip to content

Allow non intoto media types to be verified #509

@puerco

Description

@puerco

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):

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:

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions