google-cloud-binary_authorization-v1beta1 0.1.0 → 0.3.1

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.
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -0,0 +1,104 @@
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 V1beta1
24
+ # Represents an auditing event from Continuous Validation.
25
+ # @!attribute [rw] pod_event
26
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent]
27
+ # Pod event.
28
+ # @!attribute [rw] unsupported_policy_event
29
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::UnsupportedPolicyEvent]
30
+ # Unsupported policy event.
31
+ class ContinuousValidationEvent
32
+ include ::Google::Protobuf::MessageExts
33
+ extend ::Google::Protobuf::MessageExts::ClassMethods
34
+
35
+ # An auditing event for one Pod.
36
+ # @!attribute [rw] pod
37
+ # @return [::String]
38
+ # The name of the Pod.
39
+ # @!attribute [rw] deploy_time
40
+ # @return [::Google::Protobuf::Timestamp]
41
+ # Deploy time of the Pod from k8s.
42
+ # @!attribute [rw] end_time
43
+ # @return [::Google::Protobuf::Timestamp]
44
+ # Termination time of the Pod from k8s, or nothing if still running.
45
+ # @!attribute [rw] verdict
46
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::PolicyConformanceVerdict]
47
+ # Auditing verdict for this Pod.
48
+ # @!attribute [rw] images
49
+ # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails>]
50
+ # List of images with auditing details.
51
+ class ContinuousValidationPodEvent
52
+ include ::Google::Protobuf::MessageExts
53
+ extend ::Google::Protobuf::MessageExts::ClassMethods
54
+
55
+ # Container image with auditing details.
56
+ # @!attribute [rw] image
57
+ # @return [::String]
58
+ # The name of the image.
59
+ # @!attribute [rw] result
60
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::AuditResult]
61
+ # The result of the audit for this image.
62
+ # @!attribute [rw] description
63
+ # @return [::String]
64
+ # Description of the above result.
65
+ class ImageDetails
66
+ include ::Google::Protobuf::MessageExts
67
+ extend ::Google::Protobuf::MessageExts::ClassMethods
68
+
69
+ # Result of the audit.
70
+ module AuditResult
71
+ # Unspecified result. This is an error.
72
+ AUDIT_RESULT_UNSPECIFIED = 0
73
+
74
+ # Image is allowed.
75
+ ALLOW = 1
76
+
77
+ # Image is denied.
78
+ DENY = 2
79
+ end
80
+ end
81
+
82
+ # Audit time policy conformance verdict.
83
+ module PolicyConformanceVerdict
84
+ # We should always have a verdict. This is an error.
85
+ POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0
86
+
87
+ # The pod violates the policy.
88
+ VIOLATES_POLICY = 1
89
+ end
90
+ end
91
+
92
+ # An event describing that the project policy is unsupported by CV.
93
+ # @!attribute [rw] description
94
+ # @return [::String]
95
+ # A description of the unsupported policy.
96
+ class UnsupportedPolicyEvent
97
+ include ::Google::Protobuf::MessageExts
98
+ extend ::Google::Protobuf::MessageExts::ClassMethods
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -21,7 +21,8 @@ module Google
21
21
  module Cloud
22
22
  module BinaryAuthorization
23
23
  module V1beta1
24
- # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for container image binary authorization.
24
+ # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for container
25
+ # image binary authorization.
25
26
  # @!attribute [r] name
26
27
  # @return [::String]
27
28
  # Output only. The resource name, in the format `projects/*/policy`. There is
@@ -37,7 +38,7 @@ module Google
37
38
  # has no effect when specified inside a global admission policy.
38
39
  # @!attribute [rw] admission_whitelist_patterns
39
40
  # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern>]
40
- # Optional. Admission policy whitelisting. A matching admission request will
41
+ # Optional. Admission policy allowlisting. A matching admission request will
41
42
  # always be permitted. This feature is typically used to exclude Google or
42
43
  # third-party infrastructure images from Binary Authorization policies.
43
44
  # @!attribute [rw] cluster_admission_rules
@@ -81,11 +82,13 @@ module Google
81
82
  end
82
83
  end
83
84
 
84
- # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern admission whitelist pattern} exempts images
85
- # from checks by {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rules}.
85
+ # An [admission allowlist
86
+ # pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern]
87
+ # exempts images from checks by [admission
88
+ # rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule].
86
89
  # @!attribute [rw] name_pattern
87
90
  # @return [::String]
88
- # An image name pattern to whitelist, in the form `registry/path/to/image`.
91
+ # An image name pattern to allow, in the form `registry/path/to/image`.
89
92
  # This supports a trailing `*` as a wildcard, but this is allowed only in
90
93
  # text after the `registry/` part.
91
94
  class AdmissionWhitelistPattern
@@ -93,12 +96,14 @@ module Google
93
96
  extend ::Google::Protobuf::MessageExts::ClassMethods
94
97
  end
95
98
 
96
- # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rule} specifies either that all container images
97
- # used in a pod creation request must be attested to by one or more
98
- # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, that all pod creations will be allowed, or that all
99
- # pod creations will be denied.
99
+ # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rule}
100
+ # specifies either that all container images used in a pod creation request
101
+ # must be attested to by one or more
102
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, that all pod
103
+ # creations will be allowed, or that all pod creations will be denied.
100
104
  #
101
- # Images matching an {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern admission whitelist pattern}
105
+ # Images matching an [admission allowlist
106
+ # pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern]
102
107
  # are exempted from admission rules and will never block a pod creation.
103
108
  # @!attribute [rw] evaluation_mode
104
109
  # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EvaluationMode]
@@ -151,9 +156,9 @@ module Google
151
156
  end
152
157
  end
153
158
 
154
- # An {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} that attests to container image
155
- # artifacts. An existing attestor cannot be modified except where
156
- # indicated.
159
+ # An {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} that attests
160
+ # to container image artifacts. An existing attestor cannot be modified except
161
+ # where indicated.
157
162
  # @!attribute [rw] name
158
163
  # @return [::String]
159
164
  # Required. The resource name, in the format:
@@ -173,8 +178,9 @@ module Google
173
178
  extend ::Google::Protobuf::MessageExts::ClassMethods
174
179
  end
175
180
 
176
- # An {::Google::Cloud::BinaryAuthorization::V1beta1::UserOwnedDrydockNote user owned drydock note} references a Drydock
177
- # ATTESTATION_AUTHORITY Note created by the user.
181
+ # An [user owned drydock
182
+ # note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote]
183
+ # references a Drydock ATTESTATION_AUTHORITY Note created by the user.
178
184
  # @!attribute [rw] note_reference
179
185
  # @return [::String]
180
186
  # Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
@@ -275,8 +281,9 @@ module Google
275
281
  end
276
282
  end
277
283
 
278
- # An {::Google::Cloud::BinaryAuthorization::V1beta1::AttestorPublicKey attestor public key} that will be used to verify
279
- # attestations signed by this attestor.
284
+ # An [attestor public
285
+ # key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be
286
+ # used to verify attestations signed by this attestor.
280
287
  # @!attribute [rw] comment
281
288
  # @return [::String]
282
289
  # Optional. A descriptive comment. This field may be updated.
@@ -24,8 +24,9 @@ module Google
24
24
  # Request message for [BinauthzManagementService.GetPolicy][].
25
25
  # @!attribute [rw] name
26
26
  # @return [::String]
27
- # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve,
28
- # in the format `projects/*/policy`.
27
+ # Required. The resource name of the
28
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, in
29
+ # the format `projects/*/policy`.
29
30
  class GetPolicyRequest
30
31
  include ::Google::Protobuf::MessageExts
31
32
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -34,9 +35,11 @@ module Google
34
35
  # Request message for [BinauthzManagementService.UpdatePolicy][].
35
36
  # @!attribute [rw] policy
36
37
  # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy]
37
- # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will
38
- # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in
39
- # the request URL, in the format `projects/*/policy`.
38
+ # Required. A new or updated
39
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The
40
+ # service will overwrite the [policy
41
+ # name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
42
+ # resource name in the request URL, in the format `projects/*/policy`.
40
43
  class UpdatePolicyRequest
41
44
  include ::Google::Protobuf::MessageExts
42
45
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -45,15 +48,19 @@ module Google
45
48
  # Request message for [BinauthzManagementService.CreateAttestor][].
46
49
  # @!attribute [rw] parent
47
50
  # @return [::String]
48
- # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}.
51
+ # Required. The parent of this
52
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}.
49
53
  # @!attribute [rw] attestor_id
50
54
  # @return [::String]
51
- # Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID.
55
+ # Required. The
56
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID.
52
57
  # @!attribute [rw] attestor
53
58
  # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor]
54
- # Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will
55
- # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name,
56
- # in the format `projects/*/attestors/*`.
59
+ # Required. The initial
60
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The
61
+ # service will overwrite the [attestor
62
+ # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
63
+ # the resource name, in the format `projects/*/attestors/*`.
57
64
  class CreateAttestorRequest
58
65
  include ::Google::Protobuf::MessageExts
59
66
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -62,8 +69,9 @@ module Google
62
69
  # Request message for [BinauthzManagementService.GetAttestor][].
63
70
  # @!attribute [rw] name
64
71
  # @return [::String]
65
- # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format
66
- # `projects/*/attestors/*`.
72
+ # Required. The name of the
73
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve,
74
+ # in the format `projects/*/attestors/*`.
67
75
  class GetAttestorRequest
68
76
  include ::Google::Protobuf::MessageExts
69
77
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -72,9 +80,12 @@ module Google
72
80
  # Request message for [BinauthzManagementService.UpdateAttestor][].
73
81
  # @!attribute [rw] attestor
74
82
  # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor]
75
- # Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will
76
- # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name
77
- # in the request URL, in the format `projects/*/attestors/*`.
83
+ # Required. The updated
84
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The
85
+ # service will overwrite the [attestor
86
+ # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
87
+ # the resource name in the request URL, in the format
88
+ # `projects/*/attestors/*`.
78
89
  class UpdateAttestorRequest
79
90
  include ::Google::Protobuf::MessageExts
80
91
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -84,7 +95,8 @@ module Google
84
95
  # @!attribute [rw] parent
85
96
  # @return [::String]
86
97
  # Required. The resource name of the project associated with the
87
- # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`.
98
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the
99
+ # format `projects/*`.
88
100
  # @!attribute [rw] page_size
89
101
  # @return [::Integer]
90
102
  # Requested page size. The server may return fewer results than requested. If
@@ -92,8 +104,9 @@ module Google
92
104
  # @!attribute [rw] page_token
93
105
  # @return [::String]
94
106
  # A token identifying a page of results the server should return. Typically,
95
- # this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned
96
- # from the previous call to the `ListAttestors` method.
107
+ # this is the value of
108
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token}
109
+ # returned from the previous call to the `ListAttestors` method.
97
110
  class ListAttestorsRequest
98
111
  include ::Google::Protobuf::MessageExts
99
112
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -106,8 +119,9 @@ module Google
106
119
  # @!attribute [rw] next_page_token
107
120
  # @return [::String]
108
121
  # A token to retrieve the next page of results. Pass this value in the
109
- # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest#page_token ListAttestorsRequest.page_token} field in the subsequent call to the
110
- # `ListAttestors` method to retrieve the next page of results.
122
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest#page_token ListAttestorsRequest.page_token}
123
+ # field in the subsequent call to the `ListAttestors` method to retrieve the
124
+ # next page of results.
111
125
  class ListAttestorsResponse
112
126
  include ::Google::Protobuf::MessageExts
113
127
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -116,8 +130,9 @@ module Google
116
130
  # Request message for [BinauthzManagementService.DeleteAttestor][].
117
131
  # @!attribute [rw] name
118
132
  # @return [::String]
119
- # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format
120
- # `projects/*/attestors/*`.
133
+ # Required. The name of the
134
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete,
135
+ # in the format `projects/*/attestors/*`.
121
136
  class DeleteAttestorRequest
122
137
  include ::Google::Protobuf::MessageExts
123
138
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -70,7 +70,16 @@ module Google
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
72
  #
73
- # Example 5: Compute Timestamp from current time in Python.
73
+ # Example 5: Compute Timestamp from Java `Instant.now()`.
74
+ #
75
+ # Instant now = Instant.now();
76
+ #
77
+ # Timestamp timestamp =
78
+ # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
+ # .setNanos(now.getNano()).build();
80
+ #
81
+ #
82
+ # Example 6: Compute Timestamp from current time in Python.
74
83
  #
75
84
  # timestamp = Timestamp()
76
85
  # timestamp.GetCurrentTime()
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-binary_authorization-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-04 00:00:00.000000000 Z
11
+ date: 2021-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.5'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.3'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.5'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.3'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +50,14 @@ dependencies:
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: 1.24.0
53
+ version: 1.25.1
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: 1.24.0
60
+ version: 1.25.1
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: minitest
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -152,7 +158,10 @@ dependencies:
152
158
  version: '0.9'
153
159
  description: Binary Authorization is a service on Google Cloud that provides centralized
154
160
  software supply-chain security for applications that run on Google Kubernetes Engine
155
- (GKE) and GKE on-prem.
161
+ (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1beta1 is a
162
+ version-specific client library. For most uses, we recommend installing the main
163
+ client library google-cloud-binary_authorization instead. See the readme for more
164
+ details.
156
165
  email: googleapis-packages@google.com
157
166
  executables: []
158
167
  extensions: []
@@ -169,12 +178,14 @@ files:
169
178
  - lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb
170
179
  - lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb
171
180
  - lib/google/cloud/binary_authorization/v1beta1/version.rb
181
+ - lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb
172
182
  - lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb
173
183
  - lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb
174
184
  - lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb
175
185
  - proto_docs/README.md
176
186
  - proto_docs/google/api/field_behavior.rb
177
187
  - proto_docs/google/api/resource.rb
188
+ - proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb
178
189
  - proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb
179
190
  - proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb
180
191
  - proto_docs/google/protobuf/empty.rb
@@ -191,14 +202,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
202
  requirements:
192
203
  - - ">="
193
204
  - !ruby/object:Gem::Version
194
- version: '2.4'
205
+ version: '2.5'
195
206
  required_rubygems_version: !ruby/object:Gem::Requirement
196
207
  requirements:
197
208
  - - ">="
198
209
  - !ruby/object:Gem::Version
199
210
  version: '0'
200
211
  requirements: []
201
- rubygems_version: 3.1.4
212
+ rubygems_version: 3.2.17
202
213
  signing_key:
203
214
  specification_version: 4
204
215
  summary: API Client library for the Binary Authorization V1beta1 API