NAME

Google::Cloud::Binaryauthorization::V1::Resources - Compiled Protocol Buffers messages for google/cloud/binaryauthorization/v1/resources.proto

SYNOPSIS

use Google::Cloud::Binaryauthorization::V1::Resources;

my $msg = Google::Cloud::Binaryauthorization::V1::Resources::Policy->new({
    name => $name,
    description => $description,
    global_policy_evaluation_mode => $global_policy_evaluation_mode,
    admission_whitelist_patterns => $admission_whitelist_patterns,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Binaryauthorization::V1::Resources::Policy->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/binaryauthorization/v1/resources.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Binaryauthorization::V1::Resources::Policy

A [policy][google.cloud.binaryauthorization.v1.Policy] for container image binary authorization.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

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

  • $msg->description() / $msg->description($value)

    Type: String

    Optional. A descriptive comment.

  • $msg->global_policy_evaluation_mode() / $msg->global_policy_evaluation_mode($value)

    Type: Enum (Google::Cloud::Binaryauthorization::V1::Policy::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.

  • $msg->admission_whitelist_patterns() / $msg->admission_whitelist_patterns($value)

    Type: Message (Google::Cloud::Binaryauthorization::V1::Resources::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.

  • $msg->cluster_admission_rules() / $msg->cluster_admission_rules($value)

    Type: Message (Google::Cloud::Binaryauthorization::V1::Resources::Policy::ClusterAdmissionRulesEntry)

    Optional. A valid policy has only one of the following rule maps non-empty, i.e. only one of `cluster_admission_rules`, `kubernetes_namespace_admission_rules`, `kubernetes_service_account_admission_rules`, or `istio_service_identity_admission_rules` can be non-empty. 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.

  • $msg->kubernetes_namespace_admission_rules() / $msg->kubernetes_namespace_admission_rules($value)

    Type: Message (Google::Cloud::Binaryauthorization::V1::Resources::Policy::KubernetesNamespaceAdmissionRulesEntry)

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

  • $msg->kubernetes_service_account_admission_rules() / $msg->kubernetes_service_account_admission_rules($value)

    Type: Message (Google::Cloud::Binaryauthorization::V1::Resources::Policy::KubernetesServiceAccountAdmissionRulesEntry)

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

  • $msg->istio_service_identity_admission_rules() / $msg->istio_service_identity_admission_rules($value)

    Type: Message (Google::Cloud::Binaryauthorization::V1::Resources::Policy::IstioServiceIdentityAdmissionRulesEntry)

    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`

  • $msg->default_admission_rule() / $msg->default_admission_rule($value)

    Type: Message (Google::Cloud::Binaryauthorization::V1::Resources::AdmissionRule)

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

  • $msg->update_time() / $msg->update_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. Time when the policy was last updated.

  • $msg->etag() / $msg->etag($value)

    Type: 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.

Enum: Policy::GlobalPolicyEvaluationMode

  • GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED => 0

  • ENABLE => 1

  • DISABLE => 2

Google::Cloud::Binaryauthorization::V1::Resources::AdmissionWhitelistPattern

An [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] exempts images from checks by [admission rules][google.cloud.binaryauthorization.v1.AdmissionRule].

Inherits from Protobuf::Message.

Accessors

  • $msg->name_pattern() / $msg->name_pattern($value)

    Type: 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.

Google::Cloud::Binaryauthorization::V1::Resources::AdmissionRule

An [admission rule][google.cloud.binaryauthorization.v1.AdmissionRule] specifies either that all container images used in a pod creation request must be attested to by one or more [attestors][google.cloud.binaryauthorization.v1.Attestor], that all pod creations will be allowed, or that all pod creations will be denied.

Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] are exempted from admission rules and will never block a pod creation.

Inherits from Protobuf::Message.

Accessors

  • $msg->evaluation_mode() / $msg->evaluation_mode($value)

    Type: Enum (Google::Cloud::Binaryauthorization::V1::AdmissionRule::EvaluationMode)

    Required. How this admission rule will be evaluated.

  • $msg->require_attestations_by() / $msg->require_attestations_by($value)

    Type: 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.

  • $msg->enforcement_mode() / $msg->enforcement_mode($value)

    Type: Enum (Google::Cloud::Binaryauthorization::V1::AdmissionRule::EnforcementMode)

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

Enum: AdmissionRule::EvaluationMode

  • EVALUATION_MODE_UNSPECIFIED => 0

  • ALWAYS_ALLOW => 1

  • REQUIRE_ATTESTATION => 2

  • ALWAYS_DENY => 3

Enum: AdmissionRule::EnforcementMode

  • ENFORCEMENT_MODE_UNSPECIFIED => 0

  • ENFORCED_BLOCK_AND_AUDIT_LOG => 1

  • DRYRUN_AUDIT_LOG_ONLY => 2

Google::Cloud::Binaryauthorization::V1::Resources::Attestor

An [attestor][google.cloud.binaryauthorization.v1.Attestor] that attests to container image artifacts. An existing attestor cannot be modified except where indicated.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

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

  • $msg->description() / $msg->description($value)

    Type: String

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

  • $msg->user_owned_grafeas_note() / $msg->user_owned_grafeas_note($value)

    Type: Message (Google::Cloud::Binaryauthorization::V1::Resources::UserOwnedGrafeasNote)

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

  • $msg->update_time() / $msg->update_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. Time when the attestor was last updated.

  • $msg->etag() / $msg->etag($value)

    Type: 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.

Google::Cloud::Binaryauthorization::V1::Resources::UserOwnedGrafeasNote

An [user owned Grafeas note][google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote] references a Grafeas Attestation.Authority Note created by the user.

Inherits from Protobuf::Message.

Accessors

  • $msg->note_reference() / $msg->note_reference($value)

    Type: 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.

  • $msg->public_keys() / $msg->public_keys($value)

    Type: Message (Google::Cloud::Binaryauthorization::V1::Resources::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.

  • $msg->delegation_service_account_email() / $msg->delegation_service_account_email($value)

    Type: 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][google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote.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.

Google::Cloud::Binaryauthorization::V1::Resources::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.

Inherits from Protobuf::Message.

Accessors

  • $msg->public_key_pem() / $msg->public_key_pem($value)

    Type: String

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

  • $msg->signature_algorithm() / $msg->signature_algorithm($value)

    Type: Enum (Google::Cloud::Binaryauthorization::V1::PkixPublicKey::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).

  • $msg->key_id() / $msg->key_id($value)

    Type: 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.

Enum: PkixPublicKey::SignatureAlgorithm

  • SIGNATURE_ALGORITHM_UNSPECIFIED => 0

  • RSA_PSS_2048_SHA256 => 1

  • RSA_SIGN_PSS_2048_SHA256 => 1

  • RSA_PSS_3072_SHA256 => 2

  • RSA_SIGN_PSS_3072_SHA256 => 2

  • RSA_PSS_4096_SHA256 => 3

  • RSA_SIGN_PSS_4096_SHA256 => 3

  • RSA_PSS_4096_SHA512 => 4

  • RSA_SIGN_PSS_4096_SHA512 => 4

  • RSA_SIGN_PKCS1_2048_SHA256 => 5

  • RSA_SIGN_PKCS1_3072_SHA256 => 6

  • RSA_SIGN_PKCS1_4096_SHA256 => 7

  • RSA_SIGN_PKCS1_4096_SHA512 => 8

  • ECDSA_P256_SHA256 => 9

  • EC_SIGN_P256_SHA256 => 9

  • ECDSA_P384_SHA384 => 10

  • EC_SIGN_P384_SHA384 => 10

  • ECDSA_P521_SHA512 => 11

  • EC_SIGN_P521_SHA512 => 11

  • ML_DSA_65 => 13

Google::Cloud::Binaryauthorization::V1::Resources::AttestorPublicKey

An [attestor public key][google.cloud.binaryauthorization.v1.AttestorPublicKey] that will be used to verify attestations signed by this attestor.

Inherits from Protobuf::Message.

Accessors

  • $msg->comment() / $msg->comment($value)

    Type: String

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

  • $msg->id() / $msg->id($value)

    Type: 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.

  • $msg->ascii_armored_pgp_public_key() / $msg->ascii_armored_pgp_public_key($value)

    Type: 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.

  • $msg->pkix_public_key() / $msg->pkix_public_key($value)

    Type: Message (Google::Cloud::Binaryauthorization::V1::Resources::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.

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Binaryauthorization::V1::Resources::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.