Skip to content

Ambiguity between inputs and outputs in v1 #457

@trishankatdatadog

Description

@trishankatdatadog

Today with Attestation v1, it’s impossible to objectively tease apart inputs from outputs in a standard, predicate-agnostic way. This is made worse by the fact that it is also unclear whether subjects are inputs and/or outputs.

As such, one unfortunate consequence is that querying attestations by ResourceDescriptors (RDs) can be tricky. Indexing attestations by RDs is straightforward enough1, so that is not the problem. The problem is that if you don't know which RDs are inputs vs outputs, it is impossible to answer queries such as, "Give me all Build Provenance attestations with this git commit tree as its input."

Another use case where the distinction between inputs and outputs need to be clear is any implementation of ITE-10.

One workaround is for attestation users to hardcode this knowledge per predicate type, but I think it's safe to say that this is clearly inelegant and unscalable. We have few enough standardized predicate types right now that it’s not awful to communicate this knowledge out-of-band to attestation verifiers, but it doesn’t feel right long-term.

This need not be the case. With links as in the in-toto v1 spec, inputs and outputs were clearly and explicitly marked as materials and products respectively.

One obvious constraint to keep in mind is certainly backwards-compatibility: we can’t suddenly be changing the semantics of subjects. So what are some good options going forward?

Footnotes

  1. You just need to index all the RDs in the subjects as well as the others you find by recursively walking through individual predicates.

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