---
title: "POST /v1/{+parent}/attestors"
method: POST
path: "/v1/{+parent}/attestors"
tags: ["projects"]
---

# POST /v1/{+parent}/attestors

`POST /v1/{+parent}/attestors`

Creates an attestor, and returns a copy of the new attestor. Returns `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if the attestor already exists.

## Path parameters

- `parent` string, required

## Query parameters

- `attestorId` string

## Request body

- Attestor — An attestor that attests to container image artifacts. An existing attestor cannot be modified except where indicated.
  - `name` string — Required. The resource name, in the format: `projects/*/attestors/*`. This field may not be updated.
  - `updateTime` string, google-datetime — Output only. Time when the attestor was last updated.
  - `description` string — Optional. A descriptive comment. This field may be updated. The field may be displayed in chooser dialogs.
  - `userOwnedGrafeasNote` UserOwnedGrafeasNote — An user owned Grafeas note references a Grafeas Attestation.Authority Note created by the user.
    - `publicKeys` AttestorPublicKey[] — Optional. Public keys that verify attestations signed by this attestor. This field may be updated. If this field is non-empty, one of the specified public keys must verify that an attestation was signed by this attestor for the image specified in the admission request. If this field is empty, this attestor always returns that no valid attestations exist.
      - `id` string — The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them, and that ID must match the contents of this field exactly. Additional restrictions on this field can be imposed based on which public key type is encapsulated. See the documentation on `public_key` cases below for details.
      - `asciiArmoredPgpPublicKey` string — ASCII-armored representation of a PGP public key, as the entire output by the command `gpg --export --armor foo@example.com` (either LF or CRLF line endings). When using this field, `id` should be left blank. The Binary Authorization API handlers will calculate the ID and fill it in automatically. Binary Authorization computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as upper-case hex. If `id` is provided by the caller, it will be overwritten by the API-calculated ID.
      - `pkixPublicKey` PkixPublicKey — A public key in the PkixPublicKey [format](https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of this type are typically textually encoded using the PEM format.
        - `signatureAlgorithm` 'SIGNATURE_ALGORITHM_UNSPECIFIED' | 'RSA_PSS_2048_SHA256' | 'RSA_SIGN_PSS_2048_SHA256' | 'RSA_PSS_3072_SHA256' | 'RSA_SIGN_PSS_3072_SHA256' | 'RSA_PSS_4096_SHA256' | 'RSA_SIGN_PSS_4096_SHA256' | 'RSA_PSS_4096_SHA512' | 'RSA_SIGN_PSS_4096_SHA512' | 'RSA_SIGN_PKCS1_2048_SHA256' | 'RSA_SIGN_PKCS1_3072_SHA256' | 'RSA_SIGN_PKCS1_4096_SHA256' | 'RSA_SIGN_PKCS1_4096_SHA512' | 'ECDSA_P256_SHA256' | 'EC_SIGN_P256_SHA256' | 'ECDSA_P384_SHA384' | 'EC_SIGN_P384_SHA384' | 'ECDSA_P521_SHA512' | 'EC_SIGN_P521_SHA512' | 'ML_DSA_65' — The signature algorithm used to verify a message against a signature using this key. These signature algorithm must match the structure and any object identifiers encoded in `public_key_pem` (i.e. this algorithm must match that of the public key).
        - `keyId` string — Optional. The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the `key_id` field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If `key_id` is left blank and this `PkixPublicKey` is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this `PkixPublicKey` is used in the context of a wrapper that has its own notion of key ID (e.g. `AttestorPublicKey`), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.
        - `publicKeyPem` string — A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13
      - `comment` string — Optional. A descriptive comment. This field may be updated.
    - `noteReference` string — Required. The Grafeas resource name of a Attestation.Authority Note, created by the user, in the format: `projects/[PROJECT_ID]/notes/*`. This field may not be updated. A project ID must be used, not a project number. An attestation by this attestor is stored as a Grafeas Attestation.Authority Occurrence that names a container image and that links to this Note. Grafeas is an external dependency.
    - `delegationServiceAccountEmail` string — Output only. This field will contain the service account email address that this attestor will use as the principal when querying Container Analysis. Attestor administrators must grant this service account the IAM role needed to read attestations from the note_reference in Container Analysis (`containeranalysis.notes.occurrences.viewer`). This email address is fixed for the lifetime of the attestor, but callers should not make any other assumptions about the service account email; future versions may use an email based on a different naming pattern.
  - `etag` string — Optional. A checksum, returned by the server, that can be sent on update requests to ensure the attestor has an up-to-date value before attempting to update it. See https://google.aip.dev/154.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/binaryauthorization.md) · [All operations](https://skmtc.dev/google/apis/binaryauthorization/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/binaryauthorization/revisions/4e59b7e236cd/schema)
