Skip to content

Attestations API ​

5 endpoints. Request and response schemas are described on the schemas page; the other tags are listed in the API index.

Endpoints ​

GET /api/v1/repositories/{name}/attestation-trust ​

Get the attestation trust configuration

Returns the keys, Fulcio roots and identities a repository's attestations are verified against. Needs manage, or maintainer/owner of the repository's project.

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Responses

StatusDescriptionBody
200Trust configuration (empty when none is set)application/json: AttestationTrust
403Errorapplication/json: Error
404Repository not found-

PUT /api/v1/repositories/{name}/attestation-trust ​

Set the attestation trust configuration

Replaces the trust configuration of a docker repository. Keys and roots are PEM documents; Fulcio needs both roots and identities; every identity needs an issuer and exactly one of subject and subject_regexp (matched against the whole subject). Already indexed attestations keep their verdict until reverified. Needs manage, or maintainer/owner of the repository's project.

Parameters

NameInTypeRequiredDescription
namepathstringyes-

Request body (required)

application/json: AttestationTrust

Responses

StatusDescriptionBody
200Stored trust configurationapplication/json: AttestationTrust
400Errorapplication/json: Error
403Errorapplication/json: Error
404Repository not found-

GET /api/v1/repositories/{name}/attestations ​

List the attestations of an image

Lists the signatures, attestations (SLSA provenance and others) and SBOMs indexed for an image digest of a docker repository, with their verification outcome against the repository's attestation trust configuration. Needs read access to the repository.

Security: bearerAuth or cookieAuth or .

Parameters

NameInTypeRequiredDescription
namepathstringyes-
subjectquerystringyesImage manifest digest (sha256:<64 hex>). Pattern: ^sha256:[a-f0-9]{64}$.
imagequerystringnoImage name inside the repository

Responses

StatusDescriptionBody
200Attestations of the imageapplication/json: object
400Errorapplication/json: Error
403Errorapplication/json: Error
404Repository not found-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
attestationsarray of OCIAttestationyes-

POST /api/v1/repositories/{name}/attestations/reverify ​

Verify the attestations of an image again

Re-reads the cosign tags (.sig, .att, .sbom) and the referrers of the image digest and judges them against the current trust configuration; without subject every indexed image of the repository is re-verified. With subject and image it also re-indexes an image whose rows are gone. Needs manage, or maintainer/owner of the repository's project.

Parameters

NameInTypeRequiredDescription
namepathstringyes-
subjectquerystringnoImage manifest digest (sha256:<64 hex>). Pattern: ^sha256:[a-f0-9]{64}$.
imagequerystringnoImage name inside the repository

Responses

StatusDescriptionBody
200Number of attachment manifests processedapplication/json: object
400Errorapplication/json: Error
403Errorapplication/json: Error
404Repository not found-

Fields of the 200 response (application/json):

FieldTypeRequiredDescription
reverifiedintegeryes-

GET /api/v1/repositories/{name}/attestations/{digest} ​

Get the statement of an attestation

Returns the decoded in-toto statement of an indexed attachment (an SBOM or signature payload is wrapped as the predicate of a statement about the image). The statement is returned as stored, whether or not it verified. Needs read access to the repository.

Security: bearerAuth or cookieAuth or .

Parameters

NameInTypeRequiredDescription
namepathstringyes-
digestpathstringyesAttestation digest as listed (sha256:<64 hex>)
imagequerystringnoImage name inside the repository

Responses

StatusDescriptionBody
200in-toto statementapplication/json: InTotoStatement
400Errorapplication/json: Error
403Errorapplication/json: Error
404Repository or attestation not found, or the attachment carries no readable statementapplication/json: Error

Free software under the AGPL-3.0-or-later.