-
Notifications
You must be signed in to change notification settings - Fork 1k
Initial PEP 740 documentation #16398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
9390173
initial attestations user docs
woodruffw 01ee51a
more background, use preview
woodruffw e4cd67f
docs: more improvements
woodruffw a53df03
docs: attestation internals
woodruffw 8a69bed
Merge branch 'main' into ww/attestations-docs
woodruffw 18f7f25
Update docs/user/attestations/internals.md
woodruffw 18adc03
publish/v1: clarify the signing target
woodruffw 67e308c
Merge branch 'main' into ww/attestations-docs
woodruffw 6220f33
Apply suggestions from code review
woodruffw 3d82765
Merge branch 'main' into ww/attestations-docs
woodruffw 647307b
v1: be explicit about payload
woodruffw 9cb9d43
Merge branch 'main' into ww/attestations-docs
woodruffw 0c38630
attestations: avoid "index attestations"
woodruffw 8c8ac18
attestations/internals: remove another confusing phrase
woodruffw 8bd8d10
Merge branch 'main' into ww/attestations-docs
woodruffw d243656
Merge branch 'main' into ww/attestations-docs
woodruffw 5e3da1b
Merge branch 'main' into ww/attestations-docs
woodruffw 56a8f29
Apply suggestions from code review
woodruffw 2f26c08
docs: move internals doc to dev-docs
woodruffw 42ad14b
dev: fix backticks
woodruffw 23fdb5f
lintage, add note about trust
woodruffw 012b2c6
Merge branch 'main' into ww/attestations-docs
woodruffw 96e0d01
docs/dev: add callout for user docs
woodruffw 52b004c
Update attestation-internals.rst
woodruffw a0bdd34
Update attestation-internals.rst
woodruffw 1fbb3e0
Merge branch 'main' into ww/attestations-docs
woodruffw 9de4a8d
Merge branch 'main' into ww/attestations-docs
woodruffw 9dafec3
Merge branch 'main' into ww/attestations-docs
woodruffw a087dd9
Merge remote-tracking branch 'upstream/main' into ww/attestations-docs
woodruffw be5cd1a
Merge remote-tracking branch 'upstream/main' into ww/attestations-docs
woodruffw 095987d
Merge branch 'main' into ww/attestation-docs-bump
woodruffw 24ca75a
Merge branch 'main' into ww/attestation-docs-bump
woodruffw 4624014
Merge branch 'main' into ww/attestation-docs-bump
woodruffw 583dfe1
tweak index attestations warning
woodruffw 0e78ae0
Merge branch 'main' into ww/attestation-docs-bump
woodruffw 4de896a
Merge branch 'main' into ww/attestation-docs-bump
woodruffw 86cb0f9
docs: more PEP 740 docs, begin migrating user API docs
woodruffw 15e1fbf
docs: integrity API, details
woodruffw c995260
api/integrity: fill in example
woodruffw 3c8d7d8
document status code
woodruffw 6ec51e0
docs/dev: add note about api docs migration
woodruffw dee1102
Merge branch 'main' into ww/attestation-docs-bump
woodruffw 42755c1
Merge branch 'main' into ww/attestation-docs-bump
woodruffw 2f3ee23
Merge branch 'main' into ww/attestation-docs-bump
woodruffw 60cb6b4
Apply suggestions from code review
woodruffw 877751b
api/integrity: avoid weird formatting
woodruffw 2dd3fa3
Apply suggestions from code review
woodruffw c36d5f4
docs: link to #17001
woodruffw 746463a
docs/dev: use sampleproject for attestation docs
woodruffw 90a466b
dev-docs: more attestation internals to security/
woodruffw 8b7719e
dev-docs: remove old index ref
woodruffw a3c7d6d
dev-docs: fix two more broken refs
woodruffw 3263704
user-docs: use a real provenance example
woodruffw acbfd42
remove incorrect header
woodruffw d00da2a
make toctree placement less confusing
woodruffw 594a7d1
Merge branch 'main' into ww/attestation-docs-bump
di File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Introduction | ||
|
||
<!--[[ preview('user-api-docs') ]]--> | ||
|
||
PyPI has several API endpoints, each of which is referenced in the table | ||
of contents for this hierarchy. | ||
|
||
## API policies | ||
|
||
Please be aware of these PyPI API policies: | ||
|
||
### Caching | ||
|
||
All API requests are cached. Requests to the JSON, RSS or Legacy APIs are | ||
cached by our CDN provider. You can determine if you've hit the cache based on | ||
the ``X-Cache`` and ``X-Cache-Hits`` headers in the response. | ||
|
||
Requests to the JSON, RSS and Legacy APIs also provide an ``ETag`` header. If | ||
you're making a lot of repeated requests, ensure your API consumer will respect | ||
this header to determine whether to actually repeat a request or not. | ||
|
||
The XML-RPC API does not have the ability to indicate cached responses. | ||
|
||
### Rate limiting | ||
|
||
Due to the heavy caching and CDN use, there is currently no rate limiting of | ||
PyPI APIs at the edge. The XML-RPC API may be rate limited if usage is causing | ||
degradation of service. | ||
|
||
In addition, PyPI reserves the right to temporarily or permanently prohibit a | ||
consumer based on irresponsible activity. | ||
|
||
If you plan to make a lot of requests to a PyPI API, adhere to these | ||
suggestions: | ||
|
||
* Set your consumer's ``User-Agent`` header to uniquely identify your requests. | ||
Adding your contact information to this value would be helpful as well. | ||
* Try not to make a lot of requests (thousands) in a short amount of time | ||
(minutes). Generally PyPI can handle it, but it's preferred to make requests | ||
in serial over a longer amount of time if possible. | ||
* If your consumer is actually an organization or service that will be | ||
downloading a lot of packages from PyPI, consider `using your own index | ||
mirror or cache | ||
<https://packaging.python.org/guides/index-mirrors-and-caches/>`_. | ||
|
||
### API Preference | ||
|
||
For periodically checking for new packages or updates to existing packages, | ||
use our RSS feeds. | ||
|
||
No new integrations should use the XML-RPC APIs as they are planned for | ||
deprecation. Existing consumers should migrate to JSON/RSS/Legacy APIs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Integrity API | ||
|
||
<!--[[ preview('user-api-docs') ]]--> | ||
|
||
The Integrity API provides access to PyPI's implementation of [PEP 740]. | ||
|
||
## Concepts | ||
|
||
The concepts and objects in the Integrity API closely mirror [PEP 740]: | ||
|
||
* **Attestation objects** encapsulate a single "attestation" for a single file, | ||
such as a [publish attestation] or [SLSA Provenance]. | ||
|
||
* **Provenance objects** encapsulate *one or more* attestations for a given | ||
file, bundling them with the *identity* that produced them. | ||
|
||
The Integrity API deals in provenance objects; users should extract and verify | ||
individual attestations from a file's provenance, as appropriate. | ||
|
||
## Routes | ||
|
||
### Get provenance for file | ||
|
||
Route: `GET /integrity/<project>/<version>/<filename>/provenance` | ||
|
||
Get the provenance object for the given `<filename>`. | ||
|
||
This endpoint is currently only available as JSON. | ||
|
||
Example JSON request (default if no `Accept` header is passed): | ||
|
||
```http | ||
GET /integrity/sampleproject/4.0.0/sampleproject-4.0.0.tar.gz/provenance HTTP/1.1 | ||
Host: pypi.org | ||
Accept: application/vnd.pypi.integrity.v1+json | ||
``` | ||
|
||
??? note "Example JSON response" | ||
|
||
This is an example response, demonstrating a provenance object containing | ||
one attestation and its Trusted Publishing identity. | ||
|
||
```json | ||
{ | ||
"attestation_bundles": [ | ||
{ | ||
"attestations": [ | ||
{ | ||
"envelope": { | ||
"signature": "MEUCIQD1JCA8lWR9na44+zY2tr13sEuMCIu+FLS6eDkwESP5KgIgQDNG+eA5PiLSvVd+0AJn3Nk1V3CpRjRoz59L/MMTxyM=", | ||
"statement": "eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjEiLCJzdWJqZWN0IjpbeyJuYW1lIjoic2FtcGxlcHJvamVjdC00LjAuMC50YXIuZ3oiLCJkaWdlc3QiOnsic2hhMjU2IjoiMGFjZTc5ODBmODJjNTgxNWVkZTRjZDdiZjlmNjY5MzY4NGNlYzJhZTQ3YjliN2FkZTlhZGQ1MzNiODYyN2M2YiJ9fV0sInByZWRpY2F0ZVR5cGUiOiJodHRwczovL2RvY3MucHlwaS5vcmcvYXR0ZXN0YXRpb25zL3B1Ymxpc2gvdjEiLCJwcmVkaWNhdGUiOm51bGx9" | ||
}, | ||
"verification_material": { | ||
"certificate": "MIIGoTCCBiigAwIBAgITFai+PDKak1xA1HLq0mskqhDV5zAKBggqhkjOPQQDAzA3MRUwEwYDVQQKEwxzaWdzdG9yZS5kZXYxHjAcBgNVBAMTFXNpZ3N0b3JlLWludGVybWVkaWF0ZTAeFw0yNDExMDYyMjM3MDdaFw0yNDExMDYyMjQ3MDdaMAAwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARbx1Fse2Ln00On5aFaL+lHNGFYLaqeKDduplZDPJS+w2PjYfNPL0g/n4sDWEQFZfyIExEWKulZ2GKNzAc0+SmUo4IFSDCCBUQwDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMB0GA1UdDgQWBBT/uSEIXmQzuRkppWXrTKVkfZFJbzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBhBgNVHREBAf8EVzBVhlNodHRwczovL2dpdGh1Yi5jb20vcHlwYS9zYW1wbGVwcm9qZWN0Ly5naXRodWIvd29ya2Zsb3dzL3Jl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4T1hRNWFYcEJUVlJyU21WeGFGRkNjekpQVldsNVNVcGFhWEJqWlVRMWRncEJRVVV2VG1ablpDODVkVXN3VFZwQlNFWnpUR2RoYkhGUFFtdzRDaTB0TFMwdFJVNUVJRU5GVWxSSlJrbERRVlJGTFMwdExTMEsifV19fQ==", | ||
"inclusionPromise": { | ||
"signedEntryTimestamp": "MEQCIGzFZon9/joNsiQOL1uoIP/gtz7/A6eAB+50oX3M0CBaAiAZmLVxcgknlWls6R1FswJWCHY0vkwQ/jE5dSkcY43jWA==" | ||
}, | ||
"inclusionProof": { | ||
"checkpoint": { | ||
"envelope": "rekor.sigstore.dev - 1193050959916656506\n25232879\nQrnMowJnGj9hZkL1UOvkg7w+KuG27PEDcsdaEqCtoDM=\n\n— rekor.sigstore.dev wNI9ajBFAiEAshgj30XTIU+L6UyYL0yzLXJbLFmxPEc8ZRmS1R3N1sQCIFCjFEqe9J+Et9sWzJp6SE3p7Eh/+97zON7mwX6unCem\n" | ||
}, | ||
"hashes": [ | ||
"Bc4heeKQhKCr6/ZtuEHmAyp8AzvP4N1ROusEacAmfFQ=", | ||
"ZTeyp2wk6H1Bgz3SZOqQWoQvCmkiltfFstDiy1WaR9Y=", | ||
"vnHPC5XIhbYQib86Hi6M4OaEOFGFMlOip8+5mxZd8cs=", | ||
"BEONTVFois+c47/YA7vzwZG7fbNLBkVLz1hUM/WMb1k=", | ||
"PWqRmPYAwa1fq6R1qSrYlOxCtiKnFZq9hnNt7XwCIA8=", | ||
"KHxYP0XNSf1yKjp+xY/5Kkckw0Yweyjx9Z6qn2+pnZM=", | ||
"8/b9kmTAbALhl4EaKIH4uMXhES9ILB0XQkuH44FltJY=", | ||
"mXfX9NDkaWje6HpniWis2CBELUGjv8LiW2jeMOclCs0=", | ||
"jRPOva2IEma7ZE7mPN3xHtEnXtMF/HNvrmbC5TKTy14=", | ||
"s8vUdxeRlxXWTCMdSLhiSzRiYM3eGsVvrm+5HWkTNBc=", | ||
"4lUF0YOu9XkIDXKXA0wMSzd6VeDY3TZAgmoOeWmS2+Y=", | ||
"gf+9m552B3PnkWnO0o4KdVvjcT3WVHLrCbf1DoVYKFw=" | ||
], | ||
"logIndex": "25232877", | ||
"rootHash": "QrnMowJnGj9hZkL1UOvkg7w+KuG27PEDcsdaEqCtoDM=", | ||
"treeSize": "25232879" | ||
}, | ||
"integratedTime": "1730932627", | ||
"kindVersion": { | ||
"kind": "dsse", | ||
"version": "0.0.1" | ||
}, | ||
"logId": { | ||
"keyId": "wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0=" | ||
}, | ||
"logIndex": "147137139" | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
} | ||
], | ||
"publisher": { | ||
"claims": null, | ||
"environment": "", | ||
"kind": "GitHub", | ||
"repository": "pypa/sampleproject", | ||
"workflow": "release.yml" | ||
} | ||
} | ||
], | ||
"version": 1 | ||
} | ||
``` | ||
|
||
#### Status codes | ||
|
||
* `200 OK` - no error, provenance is available | ||
* `403 Forbidden` - access is temporarily disabled by the PyPI administrators | ||
* `404 Not Found` - file has no provenance | ||
* `406 Not Acceptable` - `Accept:` header not recognized | ||
|
||
[PEP 740]: https://peps.python.org/pep-0740/ | ||
|
||
[publish attestation]: /attestations/publish/v1 | ||
|
||
[SLSA Provenance]: https://slsa.dev/spec/v1.0/provenance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Consuming attestations | ||
|
||
<!--[[ preview('index-attestations') ]]--> | ||
|
||
PyPI makes a file's attestations available via the simple index (HTML) | ||
and simple JSON APIs. | ||
|
||
For a full API reference, see the [Integrity API documentation]. | ||
|
||
[Integrity API documentation]: /api/integrity/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: Introduction | ||
--- | ||
|
||
<!--[[ preview('index-attestations') ]]--> | ||
|
||
These pages document PyPI's implementation of digital attestations ([PEP 740]), | ||
including in-toto attestation predicates specific to PyPI itself. | ||
|
||
## Quick background | ||
|
||
*Digital attestations* enable package maintainers as well as third parties (such | ||
as the index itself, external auditors, etc.) to *cryptographically sign* | ||
for uploaded packages. | ||
|
||
These signatures bind each release distribution (such as an individual sdist or | ||
wheel) to a strong cryptographic digest of its contents, allowing both PyPI | ||
and downstream users to verify that a particular package was attested to by | ||
a particular identity (such as a GitHub Actions workflow). | ||
|
||
These attestations can take multiple forms, including [publish attestations] | ||
for publicly verifiable proof that a package was published via a specific | ||
[Trusted Publisher], or more general [SLSA Provenance] attesting to a package's | ||
original source location. | ||
|
||
## Supported attestations | ||
|
||
PyPI uses the [in-toto Attestation Framework] for the attestations it accepts. | ||
|
||
Currently, PyPI allows the following attestation predicates: | ||
|
||
* [SLSA Provenance] | ||
* [PyPI Publish] | ||
|
||
[in-toto Attestation Framework]: https://github.com/in-toto/attestation/blob/main/spec/README.md | ||
|
||
[PEP 740]: https://peps.python.org/pep-0740/ | ||
|
||
[PyPI Publish]: /attestations/publish/v1/ | ||
|
||
[publish attestations]: /attestations/publish/v1/ | ||
|
||
[Trusted Publisher]: /trusted-publishers/ | ||
|
||
[SLSA Provenance]: https://slsa.dev/spec/v1.0/provenance | ||
|
||
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.