class Google::Apis::BinaryauthorizationV1beta1::Policy

A policy for Binary Authorization.

Attributes

admission_whitelist_patterns[RW]

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. Corresponds to the JSON property `admissionWhitelistPatterns` @return [Array<Google::Apis::BinaryauthorizationV1beta1::AdmissionWhitelistPattern>]

cluster_admission_rules[RW]

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 cloud.google.com/ container-engine/reference/rest/v1/projects.zones.clusters. Corresponds to the JSON property `clusterAdmissionRules` @return [Hash<String,Google::Apis::BinaryauthorizationV1beta1::AdmissionRule>]

default_admission_rule[RW]

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. Corresponds to the JSON property `defaultAdmissionRule` @return [Google::Apis::BinaryauthorizationV1beta1::AdmissionRule]

description[RW]

Optional. A descriptive comment. Corresponds to the JSON property `description` @return [String]

global_policy_evaluation_mode[RW]

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. Corresponds to the JSON property `globalPolicyEvaluationMode` @return [String]

istio_service_identity_admission_rules[RW]

Optional. Per-istio-service-identity admission rules. Istio service identity spec format: spiffe:///ns//sa/ or /ns//sa/ e.g. spiffe://example.com/ns/test- ns/sa/default Corresponds to the JSON property `istioServiceIdentityAdmissionRules` @return [Hash<String,Google::Apis::BinaryauthorizationV1beta1::AdmissionRule>]

kubernetes_namespace_admission_rules[RW]

Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: [a-z.-]+, e.g. 'some-namespace' Corresponds to the JSON property `kubernetesNamespaceAdmissionRules` @return [Hash<String,Google::Apis::BinaryauthorizationV1beta1::AdmissionRule>]

kubernetes_service_account_admission_rules[RW]

Optional. Per-kubernetes-service-account admission rules. Service account spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' Corresponds to the JSON property `kubernetesServiceAccountAdmissionRules` @return [Hash<String,Google::Apis::BinaryauthorizationV1beta1::AdmissionRule>]

name[RW]

Output only. The resource name, in the format `projects/*/policy`. There is at most one policy per project. Corresponds to the JSON property `name` @return [String]

update_time[RW]

Output only. Time when the policy was last updated. Corresponds to the JSON property `updateTime` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/binaryauthorization_v1beta1/classes.rb, line 603
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/binaryauthorization_v1beta1/classes.rb, line 608
def update!(**args)
  @admission_whitelist_patterns = args[:admission_whitelist_patterns] if args.key?(:admission_whitelist_patterns)
  @cluster_admission_rules = args[:cluster_admission_rules] if args.key?(:cluster_admission_rules)
  @default_admission_rule = args[:default_admission_rule] if args.key?(:default_admission_rule)
  @description = args[:description] if args.key?(:description)
  @global_policy_evaluation_mode = args[:global_policy_evaluation_mode] if args.key?(:global_policy_evaluation_mode)
  @istio_service_identity_admission_rules = args[:istio_service_identity_admission_rules] if args.key?(:istio_service_identity_admission_rules)
  @kubernetes_namespace_admission_rules = args[:kubernetes_namespace_admission_rules] if args.key?(:kubernetes_namespace_admission_rules)
  @kubernetes_service_account_admission_rules = args[:kubernetes_service_account_admission_rules] if args.key?(:kubernetes_service_account_admission_rules)
  @name = args[:name] if args.key?(:name)
  @update_time = args[:update_time] if args.key?(:update_time)
end