google-cloud-binary_authorization-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb +897 -0
- data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/credentials.rb +51 -0
- data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb +97 -0
- data/lib/google/cloud/binary_authorization/v1/binauthz_management_service.rb +55 -0
- data/lib/google/cloud/binary_authorization/v1/system_policy/client.rb +371 -0
- data/lib/google/cloud/binary_authorization/v1/system_policy/credentials.rb +51 -0
- data/lib/google/cloud/binary_authorization/v1/system_policy/paths.rb +66 -0
- data/lib/google/cloud/binary_authorization/v1/system_policy.rb +49 -0
- data/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb +382 -0
- data/lib/google/cloud/binary_authorization/v1/validation_helper/credentials.rb +51 -0
- data/lib/google/cloud/binary_authorization/v1/validation_helper.rb +48 -0
- data/lib/google/cloud/binary_authorization/v1/version.rb +28 -0
- data/lib/google/cloud/binary_authorization/v1.rb +40 -0
- data/lib/google/cloud/binaryauthorization/v1/resources_pb.rb +111 -0
- data/lib/google/cloud/binaryauthorization/v1/service_pb.rb +84 -0
- data/lib/google/cloud/binaryauthorization/v1/service_services_pb.rb +115 -0
- data/lib/google-cloud-binary_authorization-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/binaryauthorization/v1/resources.rb +370 -0
- data/proto_docs/google/cloud/binaryauthorization/v1/service.rb +189 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/grafeas/v1/attestation.rb +77 -0
- data/proto_docs/grafeas/v1/common.rb +118 -0
- metadata +242 -0
@@ -0,0 +1,283 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# A simple descriptor of a resource type.
|
23
|
+
#
|
24
|
+
# ResourceDescriptor annotates a resource message (either by means of a
|
25
|
+
# protobuf annotation or use in the service config), and associates the
|
26
|
+
# resource's schema, the resource type, and the pattern of the resource name.
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# message Topic {
|
31
|
+
# // Indicates this message defines a resource schema.
|
32
|
+
# // Declares the resource type in the format of {service}/{kind}.
|
33
|
+
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
|
+
# option (google.api.resource) = {
|
35
|
+
# type: "pubsub.googleapis.com/Topic"
|
36
|
+
# name_descriptor: {
|
37
|
+
# pattern: "projects/{project}/topics/{topic}"
|
38
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
+
# parent_name_extractor: "projects/{project}"
|
40
|
+
# }
|
41
|
+
# };
|
42
|
+
# }
|
43
|
+
#
|
44
|
+
# The ResourceDescriptor Yaml config will look like:
|
45
|
+
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/{project}"
|
52
|
+
#
|
53
|
+
# Sometimes, resources have multiple patterns, typically because they can
|
54
|
+
# live under multiple parents.
|
55
|
+
#
|
56
|
+
# Example:
|
57
|
+
#
|
58
|
+
# message LogEntry {
|
59
|
+
# option (google.api.resource) = {
|
60
|
+
# type: "logging.googleapis.com/LogEntry"
|
61
|
+
# name_descriptor: {
|
62
|
+
# pattern: "projects/{project}/logs/{log}"
|
63
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
64
|
+
# parent_name_extractor: "projects/{project}"
|
65
|
+
# }
|
66
|
+
# name_descriptor: {
|
67
|
+
# pattern: "folders/{folder}/logs/{log}"
|
68
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
+
# parent_name_extractor: "folders/{folder}"
|
70
|
+
# }
|
71
|
+
# name_descriptor: {
|
72
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
+
# parent_name_extractor: "organizations/{organization}"
|
75
|
+
# }
|
76
|
+
# name_descriptor: {
|
77
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
+
# }
|
81
|
+
# };
|
82
|
+
# }
|
83
|
+
#
|
84
|
+
# The ResourceDescriptor Yaml config will look like:
|
85
|
+
#
|
86
|
+
# resources:
|
87
|
+
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
+
# name_descriptor:
|
89
|
+
# - pattern: "projects/{project}/logs/{log}"
|
90
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
91
|
+
# parent_name_extractor: "projects/{project}"
|
92
|
+
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
+
# parent_name_extractor: "folders/{folder}"
|
95
|
+
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
+
# parent_name_extractor: "organizations/{organization}"
|
98
|
+
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
+
#
|
102
|
+
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
+
# the resource itself has parents for policy evaluation.
|
104
|
+
#
|
105
|
+
# Example:
|
106
|
+
#
|
107
|
+
# message Shelf {
|
108
|
+
# option (google.api.resource) = {
|
109
|
+
# type: "library.googleapis.com/Shelf"
|
110
|
+
# name_descriptor: {
|
111
|
+
# pattern: "shelves/{shelf}"
|
112
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
+
# }
|
114
|
+
# name_descriptor: {
|
115
|
+
# pattern: "shelves/{shelf}"
|
116
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
+
# }
|
118
|
+
# };
|
119
|
+
# }
|
120
|
+
#
|
121
|
+
# The ResourceDescriptor Yaml config will look like:
|
122
|
+
#
|
123
|
+
# resources:
|
124
|
+
# - type: 'library.googleapis.com/Shelf'
|
125
|
+
# name_descriptor:
|
126
|
+
# - pattern: "shelves/{shelf}"
|
127
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
+
# - pattern: "shelves/{shelf}"
|
129
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
130
|
+
# @!attribute [rw] type
|
131
|
+
# @return [::String]
|
132
|
+
# The resource type. It must be in the format of
|
133
|
+
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
134
|
+
# singular and must not include version numbers.
|
135
|
+
#
|
136
|
+
# Example: `storage.googleapis.com/Bucket`
|
137
|
+
#
|
138
|
+
# The value of the resource_type_kind must follow the regular expression
|
139
|
+
# /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
140
|
+
# should use PascalCase (UpperCamelCase). The maximum number of
|
141
|
+
# characters allowed for the `resource_type_kind` is 100.
|
142
|
+
# @!attribute [rw] pattern
|
143
|
+
# @return [::Array<::String>]
|
144
|
+
# Optional. The relative resource name pattern associated with this resource
|
145
|
+
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
146
|
+
#
|
147
|
+
# The path pattern must follow the syntax, which aligns with HTTP binding
|
148
|
+
# syntax:
|
149
|
+
#
|
150
|
+
# Template = Segment { "/" Segment } ;
|
151
|
+
# Segment = LITERAL | Variable ;
|
152
|
+
# Variable = "{" LITERAL "}" ;
|
153
|
+
#
|
154
|
+
# Examples:
|
155
|
+
#
|
156
|
+
# - "projects/\\{project}/topics/\\{topic}"
|
157
|
+
# - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
|
158
|
+
#
|
159
|
+
# The components in braces correspond to the IDs for each resource in the
|
160
|
+
# hierarchy. It is expected that, if multiple patterns are provided,
|
161
|
+
# the same component name (e.g. "project") refers to IDs of the same
|
162
|
+
# type of resource.
|
163
|
+
# @!attribute [rw] name_field
|
164
|
+
# @return [::String]
|
165
|
+
# Optional. The field on the resource that designates the resource name
|
166
|
+
# field. If omitted, this is assumed to be "name".
|
167
|
+
# @!attribute [rw] history
|
168
|
+
# @return [::Google::Api::ResourceDescriptor::History]
|
169
|
+
# Optional. The historical or future-looking state of the resource pattern.
|
170
|
+
#
|
171
|
+
# Example:
|
172
|
+
#
|
173
|
+
# // The InspectTemplate message originally only supported resource
|
174
|
+
# // names with organization, and project was added later.
|
175
|
+
# message InspectTemplate {
|
176
|
+
# option (google.api.resource) = {
|
177
|
+
# type: "dlp.googleapis.com/InspectTemplate"
|
178
|
+
# pattern:
|
179
|
+
# "organizations/{organization}/inspectTemplates/{inspect_template}"
|
180
|
+
# pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
181
|
+
# history: ORIGINALLY_SINGLE_PATTERN
|
182
|
+
# };
|
183
|
+
# }
|
184
|
+
# @!attribute [rw] plural
|
185
|
+
# @return [::String]
|
186
|
+
# The plural name used in the resource name and permission names, such as
|
187
|
+
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
188
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
|
189
|
+
# concept of the `plural` field in k8s CRD spec
|
190
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
191
|
+
#
|
192
|
+
# Note: The plural form is required even for singleton resources. See
|
193
|
+
# https://aip.dev/156
|
194
|
+
# @!attribute [rw] singular
|
195
|
+
# @return [::String]
|
196
|
+
# The same concept of the `singular` field in k8s CRD spec
|
197
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
198
|
+
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
199
|
+
# @!attribute [rw] style
|
200
|
+
# @return [::Array<::Google::Api::ResourceDescriptor::Style>]
|
201
|
+
# Style flag(s) for this resource.
|
202
|
+
# These indicate that a resource is expected to conform to a given
|
203
|
+
# style. See the specific style flags for additional information.
|
204
|
+
class ResourceDescriptor
|
205
|
+
include ::Google::Protobuf::MessageExts
|
206
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
207
|
+
|
208
|
+
# A description of the historical or future-looking state of the
|
209
|
+
# resource pattern.
|
210
|
+
module History
|
211
|
+
# The "unset" value.
|
212
|
+
HISTORY_UNSPECIFIED = 0
|
213
|
+
|
214
|
+
# The resource originally had one pattern and launched as such, and
|
215
|
+
# additional patterns were added later.
|
216
|
+
ORIGINALLY_SINGLE_PATTERN = 1
|
217
|
+
|
218
|
+
# The resource has one pattern, but the API owner expects to add more
|
219
|
+
# later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
220
|
+
# that from being necessary once there are multiple patterns.)
|
221
|
+
FUTURE_MULTI_PATTERN = 2
|
222
|
+
end
|
223
|
+
|
224
|
+
# A flag representing a specific style that a resource claims to conform to.
|
225
|
+
module Style
|
226
|
+
# The unspecified value. Do not use.
|
227
|
+
STYLE_UNSPECIFIED = 0
|
228
|
+
|
229
|
+
# This resource is intended to be "declarative-friendly".
|
230
|
+
#
|
231
|
+
# Declarative-friendly resources must be more strictly consistent, and
|
232
|
+
# setting this to true communicates to tools that this resource should
|
233
|
+
# adhere to declarative-friendly expectations.
|
234
|
+
#
|
235
|
+
# Note: This is used by the API linter (linter.aip.dev) to enable
|
236
|
+
# additional checks.
|
237
|
+
DECLARATIVE_FRIENDLY = 1
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
# Defines a proto annotation that describes a string field that refers to
|
242
|
+
# an API resource.
|
243
|
+
# @!attribute [rw] type
|
244
|
+
# @return [::String]
|
245
|
+
# The resource type that the annotated field references.
|
246
|
+
#
|
247
|
+
# Example:
|
248
|
+
#
|
249
|
+
# message Subscription {
|
250
|
+
# string topic = 2 [(google.api.resource_reference) = {
|
251
|
+
# type: "pubsub.googleapis.com/Topic"
|
252
|
+
# }];
|
253
|
+
# }
|
254
|
+
#
|
255
|
+
# Occasionally, a field may reference an arbitrary resource. In this case,
|
256
|
+
# APIs use the special value * in their resource reference.
|
257
|
+
#
|
258
|
+
# Example:
|
259
|
+
#
|
260
|
+
# message GetIamPolicyRequest {
|
261
|
+
# string resource = 2 [(google.api.resource_reference) = {
|
262
|
+
# type: "*"
|
263
|
+
# }];
|
264
|
+
# }
|
265
|
+
# @!attribute [rw] child_type
|
266
|
+
# @return [::String]
|
267
|
+
# The resource type of a child collection that the annotated field
|
268
|
+
# references. This is useful for annotating the `parent` field that
|
269
|
+
# doesn't have a fixed resource type.
|
270
|
+
#
|
271
|
+
# Example:
|
272
|
+
#
|
273
|
+
# message ListLogEntriesRequest {
|
274
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
275
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
276
|
+
# };
|
277
|
+
# }
|
278
|
+
class ResourceReference
|
279
|
+
include ::Google::Protobuf::MessageExts
|
280
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
@@ -0,0 +1,370 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module BinaryAuthorization
|
23
|
+
module V1
|
24
|
+
# A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for container image binary authorization.
|
25
|
+
# @!attribute [r] name
|
26
|
+
# @return [::String]
|
27
|
+
# Output only. The resource name, in the format `projects/*/policy`. There is
|
28
|
+
# at most one policy per project.
|
29
|
+
# @!attribute [rw] description
|
30
|
+
# @return [::String]
|
31
|
+
# Optional. A descriptive comment.
|
32
|
+
# @!attribute [rw] global_policy_evaluation_mode
|
33
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::Policy::GlobalPolicyEvaluationMode]
|
34
|
+
# Optional. Controls the evaluation of a Google-maintained global admission
|
35
|
+
# policy for common system-level images. Images not covered by the global
|
36
|
+
# policy will be subject to the project admission policy. This setting
|
37
|
+
# has no effect when specified inside a global admission policy.
|
38
|
+
# @!attribute [rw] admission_whitelist_patterns
|
39
|
+
# @return [::Array<::Google::Cloud::BinaryAuthorization::V1::AdmissionWhitelistPattern>]
|
40
|
+
# Optional. Admission policy allowlisting. A matching admission request will
|
41
|
+
# always be permitted. This feature is typically used to exclude Google or
|
42
|
+
# third-party infrastructure images from Binary Authorization policies.
|
43
|
+
# @!attribute [rw] cluster_admission_rules
|
44
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}]
|
45
|
+
# Optional. Per-cluster admission rules. Cluster spec format:
|
46
|
+
# `location.clusterId`. There can be at most one admission rule per cluster
|
47
|
+
# spec.
|
48
|
+
# A `location` is either a compute zone (e.g. us-central1-a) or a region
|
49
|
+
# (e.g. us-central1).
|
50
|
+
# For `clusterId` syntax restrictions see
|
51
|
+
# https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
|
52
|
+
# @!attribute [rw] kubernetes_namespace_admission_rules
|
53
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}]
|
54
|
+
# Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
|
55
|
+
# [a-z.-]+, e.g. 'some-namespace'
|
56
|
+
# @!attribute [rw] kubernetes_service_account_admission_rules
|
57
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}]
|
58
|
+
# Optional. Per-kubernetes-service-account admission rules. Service account
|
59
|
+
# spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
|
60
|
+
# @!attribute [rw] istio_service_identity_admission_rules
|
61
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}]
|
62
|
+
# Optional. Per-istio-service-identity admission rules. Istio service
|
63
|
+
# identity spec format:
|
64
|
+
# spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
|
65
|
+
# <domain>/ns/<namespace>/sa/<serviceaccount>
|
66
|
+
# e.g. spiffe://example.com/ns/test-ns/sa/default
|
67
|
+
# @!attribute [rw] default_admission_rule
|
68
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule]
|
69
|
+
# Required. Default admission rule for a cluster without a per-cluster, per-
|
70
|
+
# kubernetes-service-account, or per-istio-service-identity admission rule.
|
71
|
+
# @!attribute [r] update_time
|
72
|
+
# @return [::Google::Protobuf::Timestamp]
|
73
|
+
# Output only. Time when the policy was last updated.
|
74
|
+
class Policy
|
75
|
+
include ::Google::Protobuf::MessageExts
|
76
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
77
|
+
|
78
|
+
# @!attribute [rw] key
|
79
|
+
# @return [::String]
|
80
|
+
# @!attribute [rw] value
|
81
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule]
|
82
|
+
class ClusterAdmissionRulesEntry
|
83
|
+
include ::Google::Protobuf::MessageExts
|
84
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
85
|
+
end
|
86
|
+
|
87
|
+
# @!attribute [rw] key
|
88
|
+
# @return [::String]
|
89
|
+
# @!attribute [rw] value
|
90
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule]
|
91
|
+
class KubernetesNamespaceAdmissionRulesEntry
|
92
|
+
include ::Google::Protobuf::MessageExts
|
93
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
94
|
+
end
|
95
|
+
|
96
|
+
# @!attribute [rw] key
|
97
|
+
# @return [::String]
|
98
|
+
# @!attribute [rw] value
|
99
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule]
|
100
|
+
class KubernetesServiceAccountAdmissionRulesEntry
|
101
|
+
include ::Google::Protobuf::MessageExts
|
102
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
103
|
+
end
|
104
|
+
|
105
|
+
# @!attribute [rw] key
|
106
|
+
# @return [::String]
|
107
|
+
# @!attribute [rw] value
|
108
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule]
|
109
|
+
class IstioServiceIdentityAdmissionRulesEntry
|
110
|
+
include ::Google::Protobuf::MessageExts
|
111
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
112
|
+
end
|
113
|
+
|
114
|
+
module GlobalPolicyEvaluationMode
|
115
|
+
# Not specified: DISABLE is assumed.
|
116
|
+
GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0
|
117
|
+
|
118
|
+
# Enables system policy evaluation.
|
119
|
+
ENABLE = 1
|
120
|
+
|
121
|
+
# Disables system policy evaluation.
|
122
|
+
DISABLE = 2
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
# An {::Google::Cloud::BinaryAuthorization::V1::AdmissionWhitelistPattern admission allowlist pattern} exempts images
|
127
|
+
# from checks by {::Google::Cloud::BinaryAuthorization::V1::AdmissionRule admission rules}.
|
128
|
+
# @!attribute [rw] name_pattern
|
129
|
+
# @return [::String]
|
130
|
+
# An image name pattern to allowlist, in the form `registry/path/to/image`.
|
131
|
+
# This supports a trailing `*` wildcard, but this is allowed only in
|
132
|
+
# text after the `registry/` part. This also supports a trailing `**`
|
133
|
+
# wildcard which matches subdirectories of a given entry.
|
134
|
+
class AdmissionWhitelistPattern
|
135
|
+
include ::Google::Protobuf::MessageExts
|
136
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
137
|
+
end
|
138
|
+
|
139
|
+
# An {::Google::Cloud::BinaryAuthorization::V1::AdmissionRule admission rule} specifies either that all container images
|
140
|
+
# used in a pod creation request must be attested to by one or more
|
141
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, that all pod creations will be allowed, or that all
|
142
|
+
# pod creations will be denied.
|
143
|
+
#
|
144
|
+
# Images matching an {::Google::Cloud::BinaryAuthorization::V1::AdmissionWhitelistPattern admission allowlist pattern}
|
145
|
+
# are exempted from admission rules and will never block a pod creation.
|
146
|
+
# @!attribute [rw] evaluation_mode
|
147
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule::EvaluationMode]
|
148
|
+
# Required. How this admission rule will be evaluated.
|
149
|
+
# @!attribute [rw] require_attestations_by
|
150
|
+
# @return [::Array<::String>]
|
151
|
+
# Optional. The resource names of the attestors that must attest to
|
152
|
+
# a container image, in the format `projects/*/attestors/*`. Each
|
153
|
+
# attestor must exist before a policy can reference it. To add an attestor
|
154
|
+
# to a policy the principal issuing the policy change request must be able
|
155
|
+
# to read the attestor resource.
|
156
|
+
#
|
157
|
+
# Note: this field must be non-empty when the evaluation_mode field specifies
|
158
|
+
# REQUIRE_ATTESTATION, otherwise it must be empty.
|
159
|
+
# @!attribute [rw] enforcement_mode
|
160
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule::EnforcementMode]
|
161
|
+
# Required. The action when a pod creation is denied by the admission rule.
|
162
|
+
class AdmissionRule
|
163
|
+
include ::Google::Protobuf::MessageExts
|
164
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
165
|
+
|
166
|
+
module EvaluationMode
|
167
|
+
# Do not use.
|
168
|
+
EVALUATION_MODE_UNSPECIFIED = 0
|
169
|
+
|
170
|
+
# This rule allows all all pod creations.
|
171
|
+
ALWAYS_ALLOW = 1
|
172
|
+
|
173
|
+
# This rule allows a pod creation if all the attestors listed in
|
174
|
+
# 'require_attestations_by' have valid attestations for all of the
|
175
|
+
# images in the pod spec.
|
176
|
+
REQUIRE_ATTESTATION = 2
|
177
|
+
|
178
|
+
# This rule denies all pod creations.
|
179
|
+
ALWAYS_DENY = 3
|
180
|
+
end
|
181
|
+
|
182
|
+
# Defines the possible actions when a pod creation is denied by an admission
|
183
|
+
# rule.
|
184
|
+
module EnforcementMode
|
185
|
+
# Do not use.
|
186
|
+
ENFORCEMENT_MODE_UNSPECIFIED = 0
|
187
|
+
|
188
|
+
# Enforce the admission rule by blocking the pod creation.
|
189
|
+
ENFORCED_BLOCK_AND_AUDIT_LOG = 1
|
190
|
+
|
191
|
+
# Dryrun mode: Audit logging only. This will allow the pod creation as if
|
192
|
+
# the admission request had specified break-glass.
|
193
|
+
DRYRUN_AUDIT_LOG_ONLY = 2
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
# An {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} that attests to container image
|
198
|
+
# artifacts. An existing attestor cannot be modified except where
|
199
|
+
# indicated.
|
200
|
+
# @!attribute [rw] name
|
201
|
+
# @return [::String]
|
202
|
+
# Required. The resource name, in the format:
|
203
|
+
# `projects/*/attestors/*`. This field may not be updated.
|
204
|
+
# @!attribute [rw] description
|
205
|
+
# @return [::String]
|
206
|
+
# Optional. A descriptive comment. This field may be updated.
|
207
|
+
# The field may be displayed in chooser dialogs.
|
208
|
+
# @!attribute [rw] user_owned_grafeas_note
|
209
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::UserOwnedGrafeasNote]
|
210
|
+
# This specifies how an attestation will be read, and how it will be used
|
211
|
+
# during policy enforcement.
|
212
|
+
# @!attribute [r] update_time
|
213
|
+
# @return [::Google::Protobuf::Timestamp]
|
214
|
+
# Output only. Time when the attestor was last updated.
|
215
|
+
class Attestor
|
216
|
+
include ::Google::Protobuf::MessageExts
|
217
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
218
|
+
end
|
219
|
+
|
220
|
+
# An {::Google::Cloud::BinaryAuthorization::V1::UserOwnedGrafeasNote user owned Grafeas note} references a Grafeas
|
221
|
+
# Attestation.Authority Note created by the user.
|
222
|
+
# @!attribute [rw] note_reference
|
223
|
+
# @return [::String]
|
224
|
+
# Required. The Grafeas resource name of a Attestation.Authority Note,
|
225
|
+
# created by the user, in the format: `projects/*/notes/*`. This field may
|
226
|
+
# not be updated.
|
227
|
+
#
|
228
|
+
# An attestation by this attestor is stored as a Grafeas
|
229
|
+
# Attestation.Authority Occurrence that names a container image and that
|
230
|
+
# links to this Note. Grafeas is an external dependency.
|
231
|
+
# @!attribute [rw] public_keys
|
232
|
+
# @return [::Array<::Google::Cloud::BinaryAuthorization::V1::AttestorPublicKey>]
|
233
|
+
# Optional. Public keys that verify attestations signed by this
|
234
|
+
# attestor. This field may be updated.
|
235
|
+
#
|
236
|
+
# If this field is non-empty, one of the specified public keys must
|
237
|
+
# verify that an attestation was signed by this attestor for the
|
238
|
+
# image specified in the admission request.
|
239
|
+
#
|
240
|
+
# If this field is empty, this attestor always returns that no
|
241
|
+
# valid attestations exist.
|
242
|
+
# @!attribute [r] delegation_service_account_email
|
243
|
+
# @return [::String]
|
244
|
+
# Output only. This field will contain the service account email address
|
245
|
+
# that this Attestor will use as the principal when querying Container
|
246
|
+
# Analysis. Attestor administrators must grant this service account the
|
247
|
+
# IAM role needed to read attestations from the [note_reference][Note] in
|
248
|
+
# Container Analysis (`containeranalysis.notes.occurrences.viewer`).
|
249
|
+
#
|
250
|
+
# This email address is fixed for the lifetime of the Attestor, but callers
|
251
|
+
# should not make any other assumptions about the service account email;
|
252
|
+
# future versions may use an email based on a different naming pattern.
|
253
|
+
class UserOwnedGrafeasNote
|
254
|
+
include ::Google::Protobuf::MessageExts
|
255
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
256
|
+
end
|
257
|
+
|
258
|
+
# A public key in the PkixPublicKey format (see
|
259
|
+
# https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details).
|
260
|
+
# Public keys of this type are typically textually encoded using the PEM
|
261
|
+
# format.
|
262
|
+
# @!attribute [rw] public_key_pem
|
263
|
+
# @return [::String]
|
264
|
+
# A PEM-encoded public key, as described in
|
265
|
+
# https://tools.ietf.org/html/rfc7468#section-13
|
266
|
+
# @!attribute [rw] signature_algorithm
|
267
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::PkixPublicKey::SignatureAlgorithm]
|
268
|
+
# The signature algorithm used to verify a message against a signature using
|
269
|
+
# this key.
|
270
|
+
# These signature algorithm must match the structure and any object
|
271
|
+
# identifiers encoded in `public_key_pem` (i.e. this algorithm must match
|
272
|
+
# that of the public key).
|
273
|
+
class PkixPublicKey
|
274
|
+
include ::Google::Protobuf::MessageExts
|
275
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
276
|
+
|
277
|
+
# Represents a signature algorithm and other information necessary to verify
|
278
|
+
# signatures with a given public key.
|
279
|
+
# This is based primarily on the public key types supported by Tink's
|
280
|
+
# PemKeyType, which is in turn based on KMS's supported signing algorithms.
|
281
|
+
# See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz
|
282
|
+
# might support additional public key types independently of Tink and/or KMS.
|
283
|
+
module SignatureAlgorithm
|
284
|
+
# Not specified.
|
285
|
+
SIGNATURE_ALGORITHM_UNSPECIFIED = 0
|
286
|
+
|
287
|
+
# RSASSA-PSS 2048 bit key with a SHA256 digest.
|
288
|
+
RSA_PSS_2048_SHA256 = 1
|
289
|
+
|
290
|
+
# RSASSA-PSS 3072 bit key with a SHA256 digest.
|
291
|
+
RSA_PSS_3072_SHA256 = 2
|
292
|
+
|
293
|
+
# RSASSA-PSS 4096 bit key with a SHA256 digest.
|
294
|
+
RSA_PSS_4096_SHA256 = 3
|
295
|
+
|
296
|
+
# RSASSA-PSS 4096 bit key with a SHA512 digest.
|
297
|
+
RSA_PSS_4096_SHA512 = 4
|
298
|
+
|
299
|
+
# RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
|
300
|
+
RSA_SIGN_PKCS1_2048_SHA256 = 5
|
301
|
+
|
302
|
+
# RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
|
303
|
+
RSA_SIGN_PKCS1_3072_SHA256 = 6
|
304
|
+
|
305
|
+
# RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
|
306
|
+
RSA_SIGN_PKCS1_4096_SHA256 = 7
|
307
|
+
|
308
|
+
# RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
|
309
|
+
RSA_SIGN_PKCS1_4096_SHA512 = 8
|
310
|
+
|
311
|
+
# ECDSA on the NIST P-256 curve with a SHA256 digest.
|
312
|
+
ECDSA_P256_SHA256 = 9
|
313
|
+
|
314
|
+
# ECDSA on the NIST P-256 curve with a SHA256 digest.
|
315
|
+
EC_SIGN_P256_SHA256 = 9
|
316
|
+
|
317
|
+
# ECDSA on the NIST P-384 curve with a SHA384 digest.
|
318
|
+
ECDSA_P384_SHA384 = 10
|
319
|
+
|
320
|
+
# ECDSA on the NIST P-384 curve with a SHA384 digest.
|
321
|
+
EC_SIGN_P384_SHA384 = 10
|
322
|
+
|
323
|
+
# ECDSA on the NIST P-521 curve with a SHA512 digest.
|
324
|
+
ECDSA_P521_SHA512 = 11
|
325
|
+
|
326
|
+
# ECDSA on the NIST P-521 curve with a SHA512 digest.
|
327
|
+
EC_SIGN_P521_SHA512 = 11
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
# An {::Google::Cloud::BinaryAuthorization::V1::AttestorPublicKey attestor public key} that will be used to verify
|
332
|
+
# attestations signed by this attestor.
|
333
|
+
# @!attribute [rw] comment
|
334
|
+
# @return [::String]
|
335
|
+
# Optional. A descriptive comment. This field may be updated.
|
336
|
+
# @!attribute [rw] id
|
337
|
+
# @return [::String]
|
338
|
+
# The ID of this public key.
|
339
|
+
# Signatures verified by BinAuthz must include the ID of the public key that
|
340
|
+
# can be used to verify them, and that ID must match the contents of this
|
341
|
+
# field exactly.
|
342
|
+
# Additional restrictions on this field can be imposed based on which public
|
343
|
+
# key type is encapsulated. See the documentation on `public_key` cases below
|
344
|
+
# for details.
|
345
|
+
# @!attribute [rw] ascii_armored_pgp_public_key
|
346
|
+
# @return [::String]
|
347
|
+
# ASCII-armored representation of a PGP public key, as the entire output by
|
348
|
+
# the command `gpg --export --armor foo@example.com` (either LF or CRLF
|
349
|
+
# line endings).
|
350
|
+
# When using this field, `id` should be left blank. The BinAuthz API
|
351
|
+
# handlers will calculate the ID and fill it in automatically. BinAuthz
|
352
|
+
# computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
|
353
|
+
# upper-case hex. If `id` is provided by the caller, it will be
|
354
|
+
# overwritten by the API-calculated ID.
|
355
|
+
# @!attribute [rw] pkix_public_key
|
356
|
+
# @return [::Google::Cloud::BinaryAuthorization::V1::PkixPublicKey]
|
357
|
+
# A raw PKIX SubjectPublicKeyInfo format public key.
|
358
|
+
#
|
359
|
+
# NOTE: `id` may be explicitly provided by the caller when using this
|
360
|
+
# type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
|
361
|
+
# blank, a default one will be computed based on the digest of the DER
|
362
|
+
# encoding of the public key.
|
363
|
+
class AttestorPublicKey
|
364
|
+
include ::Google::Protobuf::MessageExts
|
365
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
366
|
+
end
|
367
|
+
end
|
368
|
+
end
|
369
|
+
end
|
370
|
+
end
|