Draft PEP: PEP 740 – Index support for digital attestations | peps.python.org
Other context: Pre-PEP: Exposing Trusted Publisher provenance on PyPI
To summarize the rationale and motivation:
-
Previous efforts to host digital signatures on the index have been largely ad-hoc and not subject to any constraints or invariants other than “there might be a
.asc
file adjacent to the distribution”. This proposes a structured attestation storage and presentation scheme, and also provides for stronger invariants between release files (if a release file comes with an attestation, all other files in the release must have similarly typed attestations). -
This PEP is intentionally agnostic towards the set of attestation formats, prescribing only that they need to be:
- Uniquely identified with human-readable identifiers
- Verifiable by the index itself
This is done to prevent compatibility or longevity risks: the expectation with this PEP is that, upon acceptance, PyPA will standardize one or more attestation formats as part of the PyPA Specifications, which will then form the initial set of attestation formats accepted by PyPI.
Summary of the proposed changes:
- When uploading release files, each file may be accompanied by an
attestations
JSON blob that contains key-value pairs ofattestation-type
,attestation-object
. A contrived example of this is provided in the draft PEP. - The simple index (PEP 503) and simple JSON API (PEP 691) will both serve these uploaded attestations, as part of a larger “provenance” object that also contains Trusted Publisher metadata. A contrived example of this is also provided in the draft PEP.
I look forward to all feedback here! And thanks, in advance, to everybody who comments below.
CC @dstufft (as sponsor/delegate) and @sethmlarson (as SDIR)