Skip to main content
Trust attachments are append-only records associated with a published release subject. You upload them through the same two-phase lifecycle used for release archives: create an upload intent, PUT the attachment bytes to the returned URL, then finalize so the bibliotheca can verify the digest, validate subject binding, and make the attachment available through trust discovery. Authentication is required for all trust upload operations.

Endpoints

Upload lifecycle

1

Create an upload intent

Send a POST to the trust uploads endpoint with the release subject, attachment category, format metadata, and declared digest. The bibliotheca returns an uploadId and opaque upload instructions.
The 201 Created response mirrors the schema-backed intent record, including the bound subject, attachment metadata, declared digest, upload instructions, expiration time, and intent state:
2

Upload the attachment bytes

PUT the raw attachment bytes to the upload.url returned in step 1. Include any headers specified in upload.headers.
3

Finalize the upload

Call the finalize endpoint with the uploadId. The bibliotheca verifies the digest, validates subject binding, and makes the attachment available through trust discovery.
The 201 Created response includes the finalized attachment identity, bound subject, artifact digest, status, and detail URL:

Upload intent request fields

object
required
The release subject this attachment is bound to. Must match the release’s published identity exactly.
object
required
Metadata describing the trust attachment you are uploading.
string
required
sha256:<hex> digest of the attachment bytes you will upload. The bibliotheca verifies the uploaded bytes match this value during finalize.
integer
Optional declared byte length of the attachment.

Idempotency

Pass an Idempotency-Key header or a idempotencyKey body field (not both, or they must match exactly) to make the intent creation idempotent.
The header form is the preferred portable API surface. If you pass both the header and the body field, they must be byte-for-byte identical; otherwise the bibliotheca returns a 409 Conflict with the idempotency-conflict problem type.

Upload intent state lifecycle

The http-put upload profile

Every write-capable v0.1 bibliotheca that supports trust attachment uploads must implement the http-put upload profile:
  • upload.instructionType = "http-put"
  • upload.url is the opaque byte-transfer target
  • upload.method is "PUT" when present; default to PUT when omitted
  • upload.headers contains headers you must include on the PUT request
If an upload intent advertises only unsupported profiles, fail locally with an unsupported-upload-profile diagnostic.

What the bibliotheca verifies at finalize

During finalize, the bibliotheca:
  1. Verifies the uploaded bytes match the declaredDigest (and declaredSize when provided)
  2. Validates the release-subject binding — the attachment must bind to the intended release
  3. Checks attachment metadata consistency
  4. Confirms the caller remains authorized
A failed, expired, or conflicting upload will never silently create an active trust attachment.

After finalization

After a successful finalize, the attachment appears in the trust detail view with status.state = "active". From that point on, the attachment follows the same append-only lifecycle as all trust attachments — it can transition to revoked, superseded, or invalid, but it is never deleted.
Trust attachments are append-only. Previously published attachments are never silently replaced or deleted — they remain in the append-only record and are represented through status metadata changes.