Package google.cloud.binaryauthorization.v1

Index

BinauthzManagementServiceV1

Google Cloud Management Service for Binary Authorization admission policies and attestation authorities.

This API implements a REST model with the following objects:

CreateAttestor

rpc CreateAttestor(CreateAttestorRequest) returns (Attestor)

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.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteAttestor

rpc DeleteAttestor(DeleteAttestorRequest) returns (Empty)

Deletes an attestor. Returns NOT_FOUND if the attestor does not exist.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetAttestor

rpc GetAttestor(GetAttestorRequest) returns (Attestor)

Gets an attestor. Returns NOT_FOUND if the attestor does not exist.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetPolicy

rpc GetPolicy(GetPolicyRequest) returns (Policy)

A policy specifies the attestors that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the policy for this project. Returns a default policy if the project does not have one.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListAttestors

rpc ListAttestors(ListAttestorsRequest) returns (ListAttestorsResponse)

Lists attestors. Returns INVALID_ARGUMENT if the project does not exist.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateAttestor

rpc UpdateAttestor(UpdateAttestorRequest) returns (Attestor)

Updates an attestor. Returns NOT_FOUND if the attestor does not exist.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdatePolicy

rpc UpdatePolicy(UpdatePolicyRequest) returns (Policy)

Creates or updates a project's policy, and returns a copy of the new policy. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

PlatformPolicyEvaluationService

Google Cloud Service for evaluating platform policies.

This API implements a REST model with PlatformPolicy objects.

EvaluateGkePolicy

rpc EvaluateGkePolicy(EvaluateGkePolicyRequest) returns (EvaluateGkePolicyResponse)

Evaluates a Kubernetes object versus a GKE platform policy. Returns NOT_FOUND if the policy doesn't exist, INVALID_ARGUMENT if the policy or request is malformed and PERMISSION_DENIED if the client does not have sufficient permissions.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

PlatformPolicyManagementService

Google Cloud Management Service for platform policies.

This API implements a REST model with PlatformPolicy objects.

CreatePlatformPolicy

rpc CreatePlatformPolicy(CreatePlatformPolicyRequest) returns (PlatformPolicy)

Creates a platform policy, and returns a copy of it. Returns NOT_FOUND if the project or platform doesn't exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the policy already exists, and INVALID_ARGUMENT if the policy contains a platform-specific policy that does not match the platform value specified in the URL.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeletePlatformPolicy

rpc DeletePlatformPolicy(DeletePlatformPolicyRequest) returns (Empty)

Deletes a platform policy. Returns NOT_FOUND if the policy doesn't exist.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetPlatformPolicy

rpc GetPlatformPolicy(GetPlatformPolicyRequest) returns (PlatformPolicy)

Gets a platform policy. Returns NOT_FOUND if the policy doesn't exist.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListPlatformPolicies

rpc ListPlatformPolicies(ListPlatformPoliciesRequest) returns (ListPlatformPoliciesResponse)

Lists platform policies owned by a project in the specified platform. Returns INVALID_ARGUMENT if the project or the platform doesn't exist.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ReplacePlatformPolicy

rpc ReplacePlatformPolicy(ReplacePlatformPolicyRequest) returns (PlatformPolicy)

Replaces a platform policy. Returns NOT_FOUND if the policy doesn't exist.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

SystemPolicyV1

API for working with the system policy.

GetSystemPolicy

rpc GetSystemPolicy(GetSystemPolicyRequest) returns (Policy)

Gets the current system policy in the specified location.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ValidationHelperV1

BinAuthz Attestor verification

ValidateAttestationOccurrence

rpc ValidateAttestationOccurrence(ValidateAttestationOccurrenceRequest) returns (ValidateAttestationOccurrenceResponse)

Returns whether the given Attestation for the given image URI was signed by the given Attestor

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

AdmissionRule

An admission rule specifies either that all container images used in a pod creation request must be attested to by one or more attestors, that all pod creations will be allowed, or that all pod creations will be denied.

Images matching an admission allowlist pattern are exempted from admission rules and will never block a pod creation.

Fields
evaluation_mode

EvaluationMode

Required. How this admission rule will be evaluated.

require_attestations_by[]

string

Optional. The resource names of the attestors that must attest to a container image, in the format projects/*/attestors/*. Each attestor must exist before a policy can reference it. To add an attestor to a policy the principal issuing the policy change request must be able to read the attestor resource.

Note: this field must be non-empty when the evaluation_mode field specifies REQUIRE_ATTESTATION, otherwise it must be empty.

enforcement_mode

EnforcementMode

Required. The action when a pod creation is denied by the admission rule.

EnforcementMode

Defines the possible actions when a pod creation is denied by an admission rule.

Enums
ENFORCEMENT_MODE_UNSPECIFIED Do not use.
ENFORCED_BLOCK_AND_AUDIT_LOG Enforce the admission rule by blocking the pod creation.
DRYRUN_AUDIT_LOG_ONLY Dryrun mode: Audit logging only. This will allow the pod creation as if the admission request had specified break-glass.

EvaluationMode

Enums
EVALUATION_MODE_UNSPECIFIED Do not use.
ALWAYS_ALLOW This rule allows all pod creations.
REQUIRE_ATTESTATION This rule allows a pod creation if all the attestors listed in require_attestations_by have valid attestations for all of the images in the pod spec.
ALWAYS_DENY This rule denies all pod creations.

AdmissionWhitelistPattern

An admission allowlist pattern exempts images from checks by admission rules.

Fields
name_pattern

string

An image name pattern to allowlist, in the form registry/path/to/image. This supports a trailing * wildcard, but this is allowed only in text after the registry/ part. This also supports a trailing ** wildcard which matches subdirectories of a given entry.

AllowlistResult

Result of evaluating an image name allowlist.

Fields
matched_pattern

string

The allowlist pattern that the image matched.

AttestationAuthenticator

An attestation authenticator that will be used to verify attestations. Typically this is just a set of public keys.

Conceptually, an authenticator can be treated as always returning either "authenticated" or "not authenticated" when presented with a signed attestation (almost always assumed to be a DSSE attestation). The details of how an authenticator makes this decision are specific to the type of 'authenticator' that this message wraps.

Fields
display_name

string

Optional. A user-provided name for this AttestationAuthenticator. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.

Union field authenticator. The specific type of authentication configured by this authenticator. authenticator can be only one of the following:
pkix_public_key_set

PkixPublicKeySet

Optional. A set of raw PKIX SubjectPublicKeyInfo format public keys. If any public key in the set validates the attestation signature, then the signature is considered authenticated (i.e. any one key is sufficient to authenticate).

Attestor

An attestor that attests to container image artifacts. An existing attestor cannot be modified except where indicated.

Fields
name

string

Required. The resource name, in the format: projects/*/attestors/*. This field may not be updated.

description

string

Optional. A descriptive comment. This field may be updated. The field may be displayed in chooser dialogs.

update_time

Timestamp

Output only. Time when the attestor was last updated.

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.

Union field attestor_type.

attestor_type can be only one of the following:

user_owned_grafeas_note

UserOwnedGrafeasNote

This specifies how an attestation will be read, and how it will be used during policy enforcement.

AttestorPublicKey

An attestor public key that will be used to verify attestations signed by this attestor.

Fields
comment

string

Optional. A descriptive comment. This field may be updated.

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.

Union field public_key.

public_key can be only one of the following:

ascii_armored_pgp_public_key

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.

pkix_public_key

PkixPublicKey

A raw PKIX SubjectPublicKeyInfo format public key.

NOTE: id may be explicitly provided by the caller when using this type of public key, but it MUST be a valid RFC3986 URI. If id is left blank, a default one will be computed based on the digest of the DER encoding of the public key.

Check

A single check to perform against a Pod. Checks are grouped into CheckSet objects, which are defined by the top-level policy.

Fields
display_name

string

Optional. A user-provided name for this check. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.

image_allowlist

ImageAllowlist

Optional. Images exempted from this check. If any of the patterns match the image url, the check will not be evaluated.

Union field check. The specific type and configuration of check to perform. check can be only one of the following:
always_deny

bool

Optional. A special-case check that always denies. Note that this still only applies when the scope of the CheckSet applies and the image isn't exempted by an image allowlist.

This check is primarily useful for testing, or to set the default behavior for all unmatched scopes to "deny".

simple_signing_attestation_check

SimpleSigningAttestationCheck

Optional. Require a SimpleSigning-type attestation for every image in the deployment.

trusted_directory_check

TrustedDirectoryCheck

Optional. Require that an image lives in a trusted directory.

image_freshness_check

ImageFreshnessCheck

Optional. Require that an image is no older than a configured expiration time. Image age is determined by its upload time.

vulnerability_check

VulnerabilityCheck

Optional. Require that an image does not contain vulnerabilities that violate the configured rules, such as based on severity levels.

slsa_check

SlsaCheck

Optional. Require that an image was built by a trusted builder (such as Google Cloud Build), meets requirements for Supply chain Levels for Software Artifacts (SLSA), and was built from a trusted source code repostitory.

sigstore_signature_check

SigstoreSignatureCheck

Optional. Require that an image was signed by Cosign with a trusted key. This check requires that both the image and signature are stored in Artifact Registry.

CheckResult

Result of evaluating one check.

Fields
index

int64

The index of the check.

display_name

string

The name of the check.

type

string

The type of the check.

explanation

string

Explanation of this check result.

Union field result. How the check was evaluated. result can be only one of the following:
allowlist_result

AllowlistResult

If the image was exempted by an allow_pattern in the check, contains the pattern that the image name matched.

evaluation_result

EvaluationResult

If a check was evaluated, contains the result of the check.

EvaluationResult

Result of evaluating one check.

Fields
verdict

CheckVerdict

The result of evaluating this check.

CheckVerdict

Whether the check passed, failed, or couldn't be evaluated.

Enums
CHECK_VERDICT_UNSPECIFIED Not specified. This should never be used.
CONFORMANT The check was successfully evaluated and the image satisfied the check.
NON_CONFORMANT The check was successfully evaluated and the image did not satisfy the check.
ERROR The check was not successfully evaluated.

CheckSet

A conjunction of policy checks, scoped to a particular namespace or Kubernetes service account.

In order for evaluation of a CheckSet to return "allowed" for a given image in a given Pod, one of the following conditions must be satisfied:

  • The image is explicitly exempted by an entry in image_allowlist, OR
  • ALL of the checks evaluate to "allowed".
Fields
display_name

string

Optional. A user-provided name for this CheckSet. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.

scope

Scope

Optional. The scope to which this CheckSet applies. If unset or an empty string (the default), applies to all namespaces and service accounts. See the Scope message documentation for details on scoping rules.

image_allowlist

ImageAllowlist

Optional. Images exempted from this CheckSet. If any of the patterns match the image being evaluated, no checks in the CheckSet will be evaluated.

checks[]

Check

Optional. The checks to apply. The ultimate result of evaluating the check set will be "allow" if and only if every check in checks evaluates to "allow".

If checks is empty, the default behavior is "always allow".

CheckSetResult

Result of evaluating one check set.

Fields
index

int64

The index of the check set.

display_name

string

The name of the check set.

scope

Scope

The scope of the check set.

explanation

string

Explanation of this check set result. Only populated if no checks were evaluated.

Union field result. How the check set was evaluated. result can be only one of the following:
allowlist_result

AllowlistResult

If the image was exempted by an allow_pattern in the check set, contains the pattern that the image name matched.

check_results

CheckResults

If checks were evaluated, contains the results of evaluating each check.

CheckResults

Result of evaluating one or more checks.

Fields
results[]

CheckResult

Per-check details.

CreateAttestorRequest

Request message for BinauthzManagementServiceV1.CreateAttestor.

Fields
parent

string

Required. The parent of this attestor.

Authorization requires the following IAM permission on the specified resource parent:

  • binaryauthorization.attestors.create
attestor_id

string

Required. The attestors ID.

attestor

Attestor

Required. The initial attestor value. The service will overwrite the attestor name field with the resource name, in the format projects/*/attestors/*.

CreatePlatformPolicyRequest

Request message for PlatformPolicyManagementService.CreatePlatformPolicy.

Fields
parent

string

Required. The parent of this platform policy.

Authorization requires the following IAM permission on the specified resource parent:

  • binaryauthorization.platformPolicies.create
policy_id

string

Required. The platform policy ID.

policy

PlatformPolicy

Required. The initial platform policy value. The service will overwrite the policy name field with the resource name using the format projects/*/platforms/*/policies/*.

DeleteAttestorRequest

Request message for BinauthzManagementServiceV1.DeleteAttestor.

Fields
name

string

Required. The name of the attestors to delete, in the format projects/*/attestors/*.

Authorization requires the following IAM permission on the specified resource name:

  • binaryauthorization.attestors.delete

DeletePlatformPolicyRequest

Request message for PlatformPolicyManagementService.DeletePlatformPolicy.

Fields
name

string

Required. The name of the platform policy to delete, in the format projects/*/platforms/*/policies/*.

Authorization requires the following IAM permission on the specified resource name:

  • binaryauthorization.platformPolicies.delete
etag

string

Optional. Used to prevent deleting the policy when another request has updated it since it was retrieved.

EvaluateGkePolicyRequest

Request message for PlatformPolicyEvaluationService.EvaluateGkePolicy.

Fields
name

string

Required. The name of the platform policy to evaluate in the format projects/*/platforms/*/policies/*.

Authorization requires the following IAM permission on the specified resource name:

  • binaryauthorization.platformPolicies.evaluatePolicy
resource

Struct

Required. JSON or YAML blob representing a Kubernetes resource.

EvaluateGkePolicyResponse

Response message for PlatformPolicyEvaluationService.EvaluateGkePolicy.

Fields
verdict

Verdict

The result of evaluating all Pods in the request.

results[]

PodResult

Evaluation result for each Pod contained in the request.

Verdict

Whether the Pods passed, failed, or couldn't be evaluated.

Enums
VERDICT_UNSPECIFIED Not specified. This should never be used.
CONFORMANT All Pods in the request conform to the policy.
NON_CONFORMANT At least one Pod does not conform to the policy.
ERROR Encountered at least one error evaluating a Pod and all other Pods conform to the policy. Non-conformance has precedence over errors.

GetAttestorRequest

Request message for BinauthzManagementServiceV1.GetAttestor.

Fields
name

string

Required. The name of the attestor to retrieve, in the format projects/*/attestors/*.

Authorization requires the following IAM permission on the specified resource name:

  • binaryauthorization.attestors.get

GetPlatformPolicyRequest

Request message for PlatformPolicyManagementService.GetPlatformPolicy.

Fields
name

string

Required. The name of the platform policy to retrieve in the format projects/*/platforms/*/policies/*.

Authorization requires the following IAM permission on the specified resource name:

  • binaryauthorization.platformPolicies.get
etag

string

Optional. Used to prevent retrieving the policy when it has not changed since it was last retrieved.

GetPolicyRequest

Request message for BinauthzManagementServiceV1.GetPolicy.

Fields
name

string

Required. The resource name of the policy to retrieve, in the format projects/*/policy.

Authorization requires the following IAM permission on the specified resource name:

  • binaryauthorization.policy.get

GetSystemPolicyRequest

Request to read the current system policy.

Fields
name

string

Required. The resource name, in the format locations/*/policy. Note that the system policy is not associated with a project.

GkePolicy

A Binary Authorization policy for a GKE cluster. This is one type of policy that can occur as a PlatformPolicy.

Fields
image_allowlist

ImageAllowlist

Optional. Images exempted from this policy. If any of the patterns match the image being evaluated, the rest of the policy will not be evaluated.

check_sets[]

CheckSet

Optional. The CheckSet objects to apply, scoped by namespace or namespace and service account. Exactly one CheckSet will be evaluated for a given Pod (unless the list is empty, in which case the behavior is "always allow"). If multiple CheckSet objects have scopes that match the namespace and service account of the Pod being evaluated, only the CheckSet with the MOST SPECIFIC scope will match.

CheckSet objects must be listed in order of decreasing specificity, i.e. if a scope matches a given service account (which must include the namespace), it must come before a CheckSet with a scope matching just that namespace. This property is enforced by server-side validation. The purpose of this restriction is to ensure that if more than one CheckSet matches a given Pod, the CheckSet that will be evaluated will always be the first in the list to match (because if any other matches, it must be less specific).

If check_sets is empty, the default behavior is to allow all images.

If check_sets is non-empty, the last check_sets entry must always be a CheckSet with no scope set, i.e. a catchall to handle any situation not caught by the preceding CheckSet objects.

ImageAllowlist

Images that are exempted from normal checks based on name pattern only.

Fields
allow_pattern[]

string

Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.

ImageFreshnessCheck

An image freshness check, which rejects images that were uploaded before the set number of days ago to the supported repositories.

Fields
max_upload_age_days

int32

Required. The max number of days that is allowed since the image was uploaded. Must be greater than zero.

ImageResult

Result of evaluating one image.

Fields
image_uri

string

Image URI from the request.

verdict

ImageVerdict

The result of evaluating this image.

explanation

string

Explanation of this image result. Only populated if no check sets were evaluated.

Union field result. How the image was evaluated. result can be only one of the following:
allowlist_result

AllowlistResult

If the image was exempted by a top-level allow_pattern, contains the allowlist pattern that the image name matched.

check_set_result

CheckSetResult

If a check set was evaluated, contains the result of the check set. Empty if there were no check sets.

ImageVerdict

Whether the image passed, failed, or couldn't be evaluated.

Enums
IMAGE_VERDICT_UNSPECIFIED Not specified. This should never be used.
CONFORMANT Image conforms to the policy.
NON_CONFORMANT Image does not conform to the policy.
ERROR Error evaluating the image. Non-conformance has precedence over errors.

ListAttestorsRequest

Request message for BinauthzManagementServiceV1.ListAttestors.

Fields
parent

string

Required. The resource name of the project associated with the attestors, in the format projects/*.

Authorization requires the following IAM permission on the specified resource parent:

  • binaryauthorization.attestors.list
page_size

int32

Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.

page_token

string

A token identifying a page of results the server should return. Typically, this is the value of ListAttestorsResponse.next_page_token returned from the previous call to the ListAttestors method.

ListAttestorsResponse

Response message for BinauthzManagementServiceV1.ListAttestors.

Fields
attestors[]

Attestor

The list of attestors.

next_page_token

string

A token to retrieve the next page of results. Pass this value in the ListAttestorsRequest.page_token field in the subsequent call to the ListAttestors method to retrieve the next page of results.

ListPlatformPoliciesRequest

Request message for PlatformPolicyManagementService.ListPlatformPolicies.

Fields
parent

string

Required. The resource name of the platform associated with the platform policies using the format projects/*/platforms/*.

Authorization requires the following IAM permission on the specified resource parent:

  • binaryauthorization.platformPolicies.list
page_size

int32

Requested page size. The server may return fewer results than requested. If unspecified, the server picks an appropriate default.

page_token

string

A token identifying a page of results the server should return. Typically, this is the value of ListPlatformPoliciesResponse.next_page_token returned from the previous call to the ListPlatformPolicies method.

ListPlatformPoliciesResponse

Response message for PlatformPolicyManagementService.ListPlatformPolicies.

Fields
platform_policies[]

PlatformPolicy

The list of platform policies.

next_page_token

string

A token to retrieve the next page of results. Pass this value in the ListPlatformPoliciesRequest.page_token field in the subsequent call to the ListPlatformPolicies method to retrieve the next page of results.

PkixPublicKey

A public key in the PkixPublicKey format. Public keys of this type are typically textually encoded using the PEM format.

Fields
public_key_pem

string

A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13

signature_algorithm

SignatureAlgorithm

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).

key_id

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.

SignatureAlgorithm

Represents a signature algorithm and other information necessary to verify signatures with a given public key. This is based primarily on the public key types supported by Tink's PemKeyType, which is in turn based on KMS's supported signing algorithms. In the future, Binary Authorization might support additional public key types independently of Tink and/or KMS.

Enums
SIGNATURE_ALGORITHM_UNSPECIFIED Not specified.
RSA_PSS_2048_SHA256 RSASSA-PSS 2048 bit key with a SHA256 digest.
RSA_SIGN_PSS_2048_SHA256 RSASSA-PSS 2048 bit key with a SHA256 digest.
RSA_PSS_3072_SHA256 RSASSA-PSS 3072 bit key with a SHA256 digest.
RSA_SIGN_PSS_3072_SHA256 RSASSA-PSS 3072 bit key with a SHA256 digest.
RSA_PSS_4096_SHA256 RSASSA-PSS 4096 bit key with a SHA256 digest.
RSA_SIGN_PSS_4096_SHA256 RSASSA-PSS 4096 bit key with a SHA256 digest.
RSA_PSS_4096_SHA512 RSASSA-PSS 4096 bit key with a SHA512 digest.
RSA_SIGN_PSS_4096_SHA512 RSASSA-PSS 4096 bit key with a SHA512 digest.
RSA_SIGN_PKCS1_2048_SHA256 RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_3072_SHA256 RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_4096_SHA256 RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_4096_SHA512 RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
ECDSA_P256_SHA256 ECDSA on the NIST P-256 curve with a SHA256 digest.
EC_SIGN_P256_SHA256 ECDSA on the NIST P-256 curve with a SHA256 digest.
ECDSA_P384_SHA384 ECDSA on the NIST P-384 curve with a SHA384 digest.
EC_SIGN_P384_SHA384 ECDSA on the NIST P-384 curve with a SHA384 digest.
ECDSA_P521_SHA512 ECDSA on the NIST P-521 curve with a SHA512 digest.
EC_SIGN_P521_SHA512 ECDSA on the NIST P-521 curve with a SHA512 digest.

PkixPublicKeySet

A bundle of PKIX public keys, used to authenticate attestation signatures.

Generally, a signature is considered to be authenticated by a PkixPublicKeySet if any of the public keys verify it (i.e. it is an "OR" of the keys).

Fields
pkix_public_keys[]

PkixPublicKey

Required. pkix_public_keys must have at least one entry.

PlatformPolicy

A Binary Authorization platform policy for deployments on various platforms.

Fields
name

string

Output only. The relative resource name of the Binary Authorization platform policy, in the form of projects/*/platforms/*/policies/*.

description

string

Optional. A description comment about the policy.

update_time

Timestamp

Output only. Time when the policy was last updated.

etag

string

Optional. Used to prevent updating the policy when another request has updated it since it was retrieved.

Union field policy_details. Platform-specific policy details. The detail should be consistent with the platform value in the URL. policy_details can be only one of the following:
gke_policy

GkePolicy

Optional. GKE platform-specific policy.

PodResult

Result of evaluating the whole GKE policy for one Pod.

Fields
pod_name

string

The name of the Pod.

kubernetes_namespace

string

The Kubernetes namespace of the Pod.

kubernetes_service_account

string

The Kubernetes service account of the Pod.

verdict

PodVerdict

The result of evaluating this Pod.

image_results[]

ImageResult

Per-image details.

PodVerdict

Whether the Pod passed, failed, or couldn't be evaluated.

Enums
POD_VERDICT_UNSPECIFIED Not specified. This should never be used.
CONFORMANT All images conform to the policy.
NON_CONFORMANT At least one image does not conform to the policy.
ERROR Encountered at least one error evaluating an image and all other images with non-error verdicts conform to the policy. Non-conformance has precedence over errors.

Policy

A policy for container image binary authorization.

Fields
name

string

Output only. The resource name, in the format projects/*/policy. There is at most one policy per project.

description

string

Optional. A descriptive comment.

global_policy_evaluation_mode

GlobalPolicyEvaluationMode

Optional. Controls the evaluation of a Google-maintained global admission policy for common system-level images. Images not covered by the global policy will be subject to the project admission policy. This setting has no effect when specified inside a global admission policy.

admission_whitelist_patterns[]

AdmissionWhitelistPattern

Optional. Admission policy allowlisting. A matching admission request will always be permitted. This feature is typically used to exclude Google or third-party infrastructure images from Binary Authorization policies.

cluster_admission_rules

map<string, AdmissionRule>

Optional. Per-cluster admission rules. Cluster spec format: location.clusterId. There can be at most one admission rule per cluster spec. A location is either a compute zone (e.g. us-central1-a) or a region (e.g. us-central1). For clusterId syntax restrictions see https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.

kubernetes_namespace_admission_rules

map<string, AdmissionRule>

Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: [a-z.-]+, e.g. some-namespace

kubernetes_service_account_admission_rules

map<string, AdmissionRule>

Optional. Per-kubernetes-service-account admission rules. Service account spec format: namespace:serviceaccount. e.g. test-ns:default

istio_service_identity_admission_rules

map<string, AdmissionRule>

Optional. Per-istio-service-identity admission rules. Istio service identity spec format: spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or <domain>/ns/<namespace>/sa/<serviceaccount> e.g. spiffe://example.com/ns/test-ns/sa/default

default_admission_rule

AdmissionRule

Required. Default admission rule for a cluster without a per-cluster, per- kubernetes-service-account, or per-istio-service-identity admission rule.

update_time

Timestamp

Output only. Time when the policy was last updated.

etag

string

Optional. A checksum, returned by the server, that can be sent on update requests to ensure the policy has an up-to-date value before attempting to update it. See https://google.aip.dev/154.

GlobalPolicyEvaluationMode

Enums
GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED Not specified: DISABLE is assumed.
ENABLE Enables system policy evaluation.
DISABLE Disables system policy evaluation.

ReplacePlatformPolicyRequest

Request message for PlatformPolicyManagementService.ReplacePlatformPolicy.

Fields
policy

PlatformPolicy

Required. The replacement platform policy value. The service will overwrite the policy name field with the resource name in the request URL using the format projects/*/platforms/*/policies/*.

Authorization requires the following IAM permission on the specified resource policy:

  • binaryauthorization.platformPolicies.replace

Scope

A scope specifier for CheckSet objects.

Fields
Union field scope. A specific type of scope specifier. scope can be only one of the following:
kubernetes_service_account

string

Optional. Matches a single Kubernetes service account, e.g. my-namespace:my-service-account. kubernetes_service_account scope is always more specific than kubernetes_namespace scope for the same namespace.

kubernetes_namespace

string

Optional. Matches all Kubernetes service accounts in the provided namespace, unless a more specific kubernetes_service_account scope already matched.

SigstoreAuthority

A Sigstore authority, used to verify signatures that are created by Sigstore.

An authority is analogous to an attestation authenticator, verifying that a signature is valid or invalid.

Fields
display_name

string

Optional. A user-provided name for this SigstoreAuthority. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.

Union field authority. The specific authority type. authority can be only one of the following:
public_key_set

SigstorePublicKeySet

Required. A simple set of public keys. A signature is considered valid if any keys in the set validate the signature.

SigstorePublicKey

A Sigstore public key.

SigstorePublicKey is the public key material used to authenticate Sigstore signatures.

Fields
public_key_pem

string

The public key material in PEM format.

SigstorePublicKeySet

A bundle of Sigstore public keys, used to verify Sigstore signatures.

A signature is authenticated by a SigstorePublicKeySet if any of the keys verify it.

Fields
public_keys[]

SigstorePublicKey

Required. public_keys must have at least one entry.

SigstoreSignatureCheck

A Sigstore signature check, which verifies the Sigstore signature associated with an image.

Fields
sigstore_authorities[]

SigstoreAuthority

Required. The authorities required by this check to verify the signature. A signature only needs to be verified by one authority to pass the check.

SimpleSigningAttestationCheck

Require a signed DSSE attestation with type SimpleSigning.

Fields
attestation_authenticators[]

AttestationAuthenticator

Required. The authenticators required by this check to verify an attestation. Typically this is one or more PKIX public keys for signature verification.

Only one authenticator needs to consider an attestation verified in order for an attestation to be considered fully authenticated. In otherwords, this list of authenticators is an "OR" of the authenticator results.

At least one authenticator is required.

container_analysis_attestation_projects[]

string

Optional. The projects where attestations are stored as Container Analysis Occurrences, in the format projects/[PROJECT_ID]. Only one attestation needs to successfully verify an image for this check to pass, so a single verified attestation found in any of container_analysis_attestation_projects is sufficient for the check to pass. A project ID must be used, not a project number.

When fetching Occurrences from Container Analysis, only AttestationOccurrence kinds are considered. In the future, additional Occurrence kinds may be added to the query.

Maximum number of container_analysis_attestation_projects allowed in each SimpleSigningAttestationCheck is 10.

SlsaCheck

A SLSA provenance attestation check, which ensures that images are built by a trusted builder using source code from its trusted repositories only.

Fields
rules[]

VerificationRule

Specifies a list of verification rules for the SLSA attestations. An image is considered compliant with the SlsaCheck if any of the rules are satisfied.

AttestationSource

Specifies the locations for fetching the provenance attestations.

Fields
container_analysis_attestation_projects[]

string

The IDs of the Google Cloud projects that store the SLSA attestations as Container Analysis Occurrences, in the format projects/[PROJECT_ID].

Maximum number of container_analysis_attestation_projects allowed in each AttestationSource is 10.

TrustedBuilder

Supported builders (group).

Enums
BUILDER_UNSPECIFIED Should never happen.
GOOGLE_CLOUD_BUILD The whole Google Cloud Build (GCB) builder group, including all GCB builder types.

VerificationRule

Specifies verification rules for evaluating the SLSA attestations including: which builders to trust, where to fetch the SLSA attestations generated by those builders, and other builder-specific evaluation rules such as which source repositories are trusted. An image is considered verified by the rule if any of the fetched SLSA attestations is verified.

Fields
trusted_builder

TrustedBuilder

Each verification rule is used for evaluation against provenances generated by a specific builder (group). For some of the builders, such as the Google Cloud Build, users don't need to explicitly specify their roots of trust in the policy since the evaluation service can automatically fetch them based on the builder (group).

attestation_source

AttestationSource

Specifies where to fetch the provenances attestations generated by the builder (group).

config_based_build_required

bool

If true, require the image to be built from a top-level configuration. trusted_source_repo_patterns specifies the repositories containing this configuration.

trusted_source_repo_patterns[]

string

List of trusted source code repository URL patterns. These patterns match the full repository URL without its scheme (e.g. https://). The patterns must not include schemes. For example, the pattern source.cloud.google.com/my-project/my-repo-name matches the following URLs: - source.cloud.google.com/my-project/my-repo-name - git+ssh://source.cloud.google.com/my-project/my-repo-name - https://source.cloud.google.com/my-project/my-repo-name A pattern matches a URL either exactly or with * wildcards. * can be used in only two ways: 1. trailing * after hosturi/ to match varying endings; 2. trailing ** after hosturi/ to match / as well. * and ** can only be used as wildcards and can only occur at the end of the pattern after a /. (So it's not possible to match a URL that contains literal *.) For example: - github.com/my-project/my-repo is valid to match a single repo - github.com/my-project/* will match all direct repos in my-project - github.com/** matches all repos in GitHub

TrustedDirectoryCheck

A trusted directory check, which rejects images that do not come from the set of user-configured trusted directories.

Fields
trusted_dir_patterns[]

string

Required. List of trusted directory patterns. A pattern is in the form "registry/path/to/directory". The registry domain part is defined as two or more dot-separated words, e.g., us.pkg.dev, or gcr.io. Additionally, * can be used in three ways as wildcards: 1. leading * to match varying prefixes in registry subdomain (useful for location prefixes); 2. trailing * after registry/ to match varying endings; 3. trailing ** after registry/ to match "/" as well. For example: -- gcr.io/my-project/my-repo is valid to match a single directory -- *-docker.pkg.dev/my-project/my-repo or *.gcr.io/my-project are valid to match varying prefixes -- gcr.io/my-project/* will match all direct directories in my-project -- gcr.io/my-project/** would match all directories in my-project -- gcr.i* is not allowed since the registry is not completely specified -- sub*domain.gcr.io/nginx is not valid because only leading * or trailing * are allowed. -- *pkg.dev/my-project/my-repo is not valid because leading * can only match subdomain -- **-docker.pkg.dev is not valid because one leading * is allowed, and that it cannot match /

UpdateAttestorRequest

Request message for BinauthzManagementServiceV1.UpdateAttestor.

Fields
attestor

Attestor

Required. The updated attestor value. The service will overwrite the attestor name field with the resource name in the request URL, in the format projects/*/attestors/*.

Authorization requires the following IAM permission on the specified resource attestor:

  • binaryauthorization.attestors.update

UpdatePolicyRequest

Request message for BinauthzManagementServiceV1.UpdatePolicy.

Fields
policy

Policy

Required. A new or updated policy value. The service will overwrite the policy name field with the resource name in the request URL, in the format projects/*/policy.

Authorization requires the following IAM permission on the specified resource policy:

  • binaryauthorization.policy.update

UserOwnedGrafeasNote

An user owned Grafeas note references a Grafeas Attestation.Authority Note created by the user.

Fields
note_reference

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.

public_keys[]

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.

delegation_service_account_email

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][Note] 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.

ValidateAttestationOccurrenceRequest

Request message for ValidationHelperV1.ValidateAttestationOccurrence.

Fields
attestor

string

Required. The resource name of the Attestor of the [occurrence][grafeas.v1.Occurrence], in the format projects/*/attestors/*.

Authorization requires the following IAM permission on the specified resource attestor:

  • binaryauthorization.attestors.verifyImageAttested
attestation

AttestationOccurrence

Required. An AttestationOccurrence to be checked that it can be verified by the Attestor. It does not have to be an existing entity in Container Analysis. It must otherwise be a valid AttestationOccurrence.

occurrence_note

string

Required. The resource name of the [Note][grafeas.v1.Note] to which the containing [Occurrence][grafeas.v1.Occurrence] is associated.

occurrence_resource_uri

string

Required. The URI of the artifact (e.g. container image) that is the subject of the containing [Occurrence][grafeas.v1.Occurrence].

ValidateAttestationOccurrenceResponse

Response message for ValidationHelperV1.ValidateAttestationOccurrence.

Fields
result

Result

The result of the Attestation validation.

denial_reason

string

The reason for denial if the Attestation couldn't be validated.

Result

The enum returned in the result field.

Enums
RESULT_UNSPECIFIED Unspecified.
VERIFIED The Attestation was able to verified by the Attestor.
ATTESTATION_NOT_VERIFIABLE The Attestation was not able to verified by the Attestor.

VulnerabilityCheck

An image vulnerability check, which rejects images that violate the configured vulnerability rules.

Fields
allowed_cves[]

string

Optional. A list of specific CVEs to ignore even if the vulnerability level violates maximumUnfixableSeverity or maximumFixableSeverity. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of CVE-2021-20305 will allow vulnerabilities with a note name of either projects/goog-vulnz/notes/CVE-2021-20305 or projects/CUSTOM-PROJECT/notes/CVE-2021-20305.

blocked_cves[]

string

Optional. A list of specific CVEs to always raise warnings about even if the vulnerability level meets maximumUnfixableSeverity or maximumFixableSeverity. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of CVE-2021-20305 will block vulnerabilities with a note name of either projects/goog-vulnz/notes/CVE-2021-20305 or projects/CUSTOM-PROJECT/notes/CVE-2021-20305.

maximum_unfixable_severity

MaximumAllowedSeverity

Required. The threshold for severity for which a fix isn't currently available. This field is required and must be set.

maximum_fixable_severity

MaximumAllowedSeverity

Required. The threshold for severity for which a fix is currently available. This field is required and must be set.

container_analysis_vulnerability_projects[]

string

Optional. The projects where vulnerabilities are stored as Container Analysis Occurrences. Each project is expressed in the resource format of projects/[PROJECT_ID], e.g., projects/my-gcp-project. An attempt will be made for each project to fetch vulnerabilities, and all valid vulnerabilities will be used to check against the vulnerability policy. If no valid scan is found in all projects configured here, an error will be returned for the check.

Maximum number of container_analysis_vulnerability_projects allowed in each VulnerabilityCheck is 10.

MaximumAllowedSeverity

Maximum allowed severity level which is compared to an image's effective severity defined by Container Analysis: https://cloud.google.com/container-analysis/docs/container-scanning-overview#sources.

Enums
MAXIMUM_ALLOWED_SEVERITY_UNSPECIFIED Not specified.
BLOCK_ALL Block any vulnerability.
MINIMAL Allow only minimal severity.
LOW Allow only low severity and lower.
MEDIUM Allow medium severity and lower.
HIGH Allow high severity and lower.
CRITICAL Allow critical severity and lower.
ALLOW_ALL Allow all severity, even vulnerability with unspecified severity.