google-cloud-binary_authorization-v1beta1 0.3.5 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +6 -1
- data/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb +37 -65
- data/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb +24 -5
- data/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb +388 -0
- data/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb +51 -0
- data/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb +66 -0
- data/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb +49 -0
- data/lib/google/cloud/binary_authorization/v1beta1/version.rb +1 -1
- data/lib/google/cloud/binary_authorization/v1beta1.rb +3 -0
- data/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb +3 -1
- data/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb +9 -2
- data/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb +6 -1
- data/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb +34 -33
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb +3 -0
- data/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb +73 -25
- data/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb +32 -37
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7148ca7069deee5a3e40cddb609a9bbabaab15332746a023fcf31faa2fbff139
|
4
|
+
data.tar.gz: 30023037c857b13d326b9616678f02780e5fd39a77227c766a2aa0d4a298aefe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8297b403d9bb70586542d462342002a5887d0e76c17ec0da5715f31d2c4ce7c78892d9a7bbc6878aa6fc5d37e23996a154f1cf960d15258e439eae5af5d4d3b
|
7
|
+
data.tar.gz: 3f81eeb430dddbe465382abc82116babf1b559c0a26d4d1397b04d2fcf13a07858f0dd1ded577136a8f0d569d3d61544deba104e8d0e9bae839aa85768b9986d
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new #
|
|
37
37
|
response = client.get_policy request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/binary-authorization/)
|
@@ -69,6 +69,11 @@ module GRPC
|
|
69
69
|
end
|
70
70
|
```
|
71
71
|
|
72
|
+
|
73
|
+
## Google Cloud Samples
|
74
|
+
|
75
|
+
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
|
+
|
72
77
|
## Supported Ruby Versions
|
73
78
|
|
74
79
|
This library is supported on Ruby 2.5+.
|
@@ -183,16 +183,13 @@ module Google
|
|
183
183
|
# Service calls
|
184
184
|
|
185
185
|
##
|
186
|
-
# A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the
|
187
|
-
#
|
188
|
-
# attest to a container image, before the project is allowed to deploy that
|
186
|
+
# A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must attest to
|
187
|
+
# a container image, before the project is allowed to deploy that
|
189
188
|
# image. There is at most one policy per project. All image admission
|
190
189
|
# requests are permitted if a project has no policy.
|
191
190
|
#
|
192
|
-
# Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this
|
193
|
-
# project
|
194
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project
|
195
|
-
# does not have one.
|
191
|
+
# Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this project. Returns a default
|
192
|
+
# {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project does not have one.
|
196
193
|
#
|
197
194
|
# @overload get_policy(request, options = nil)
|
198
195
|
# Pass arguments to `get_policy` via a request object, either of type
|
@@ -210,9 +207,8 @@ module Google
|
|
210
207
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
211
208
|
#
|
212
209
|
# @param name [::String]
|
213
|
-
# Required. The resource name of the
|
214
|
-
#
|
215
|
-
# the format `projects/*/policy`.
|
210
|
+
# Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve,
|
211
|
+
# in the format `projects/*/policy`.
|
216
212
|
#
|
217
213
|
# @yield [response, operation] Access the result along with the RPC operation
|
218
214
|
# @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy]
|
@@ -279,13 +275,11 @@ module Google
|
|
279
275
|
end
|
280
276
|
|
281
277
|
##
|
282
|
-
# Creates or updates a project's
|
283
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy},
|
284
|
-
#
|
285
|
-
#
|
286
|
-
#
|
287
|
-
# if the project does not exist, INVALID_ARGUMENT if the request is
|
288
|
-
# malformed.
|
278
|
+
# Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a copy of the
|
279
|
+
# new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. A policy is always updated as a whole, to avoid race
|
280
|
+
# conditions with concurrent policy enforcement (or management!)
|
281
|
+
# requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
|
282
|
+
# if the request is malformed.
|
289
283
|
#
|
290
284
|
# @overload update_policy(request, options = nil)
|
291
285
|
# Pass arguments to `update_policy` via a request object, either of type
|
@@ -303,11 +297,9 @@ module Google
|
|
303
297
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
304
298
|
#
|
305
299
|
# @param policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash]
|
306
|
-
# Required. A new or updated
|
307
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}
|
308
|
-
#
|
309
|
-
# name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
|
310
|
-
# resource name in the request URL, in the format `projects/*/policy`.
|
300
|
+
# Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will
|
301
|
+
# overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in
|
302
|
+
# the request URL, in the format `projects/*/policy`.
|
311
303
|
#
|
312
304
|
# @yield [response, operation] Access the result along with the RPC operation
|
313
305
|
# @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy]
|
@@ -374,13 +366,10 @@ module Google
|
|
374
366
|
end
|
375
367
|
|
376
368
|
##
|
377
|
-
# Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor},
|
378
|
-
#
|
379
|
-
#
|
380
|
-
#
|
381
|
-
# malformed, ALREADY_EXISTS if the
|
382
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already
|
383
|
-
# exists.
|
369
|
+
# Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, and returns a copy of the new
|
370
|
+
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the project does not exist,
|
371
|
+
# INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
|
372
|
+
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already exists.
|
384
373
|
#
|
385
374
|
# @overload create_attestor(request, options = nil)
|
386
375
|
# Pass arguments to `create_attestor` via a request object, either of type
|
@@ -398,17 +387,13 @@ module Google
|
|
398
387
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
399
388
|
#
|
400
389
|
# @param parent [::String]
|
401
|
-
# Required. The parent of this
|
402
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}.
|
390
|
+
# Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}.
|
403
391
|
# @param attestor_id [::String]
|
404
|
-
# Required. The
|
405
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID.
|
392
|
+
# Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID.
|
406
393
|
# @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash]
|
407
|
-
# Required. The initial
|
408
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}
|
409
|
-
#
|
410
|
-
# name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
|
411
|
-
# the resource name, in the format `projects/*/attestors/*`.
|
394
|
+
# Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will
|
395
|
+
# overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name,
|
396
|
+
# in the format `projects/*/attestors/*`.
|
412
397
|
#
|
413
398
|
# @yield [response, operation] Access the result along with the RPC operation
|
414
399
|
# @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor]
|
@@ -476,9 +461,7 @@ module Google
|
|
476
461
|
|
477
462
|
##
|
478
463
|
# Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}.
|
479
|
-
# Returns NOT_FOUND if the
|
480
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not
|
481
|
-
# exist.
|
464
|
+
# Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist.
|
482
465
|
#
|
483
466
|
# @overload get_attestor(request, options = nil)
|
484
467
|
# Pass arguments to `get_attestor` via a request object, either of type
|
@@ -496,9 +479,8 @@ module Google
|
|
496
479
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
497
480
|
#
|
498
481
|
# @param name [::String]
|
499
|
-
# Required. The name of the
|
500
|
-
#
|
501
|
-
# in the format `projects/*/attestors/*`.
|
482
|
+
# Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format
|
483
|
+
# `projects/*/attestors/*`.
|
502
484
|
#
|
503
485
|
# @yield [response, operation] Access the result along with the RPC operation
|
504
486
|
# @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor]
|
@@ -566,9 +548,7 @@ module Google
|
|
566
548
|
|
567
549
|
##
|
568
550
|
# Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}.
|
569
|
-
# Returns NOT_FOUND if the
|
570
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not
|
571
|
-
# exist.
|
551
|
+
# Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist.
|
572
552
|
#
|
573
553
|
# @overload update_attestor(request, options = nil)
|
574
554
|
# Pass arguments to `update_attestor` via a request object, either of type
|
@@ -586,12 +566,9 @@ module Google
|
|
586
566
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
587
567
|
#
|
588
568
|
# @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash]
|
589
|
-
# Required. The updated
|
590
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}
|
591
|
-
#
|
592
|
-
# name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
|
593
|
-
# the resource name in the request URL, in the format
|
594
|
-
# `projects/*/attestors/*`.
|
569
|
+
# Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will
|
570
|
+
# overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name
|
571
|
+
# in the request URL, in the format `projects/*/attestors/*`.
|
595
572
|
#
|
596
573
|
# @yield [response, operation] Access the result along with the RPC operation
|
597
574
|
# @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor]
|
@@ -678,16 +655,14 @@ module Google
|
|
678
655
|
#
|
679
656
|
# @param parent [::String]
|
680
657
|
# Required. The resource name of the project associated with the
|
681
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the
|
682
|
-
# format `projects/*`.
|
658
|
+
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`.
|
683
659
|
# @param page_size [::Integer]
|
684
660
|
# Requested page size. The server may return fewer results than requested. If
|
685
661
|
# unspecified, the server will pick an appropriate default.
|
686
662
|
# @param page_token [::String]
|
687
663
|
# A token identifying a page of results the server should return. Typically,
|
688
|
-
# this is the value of
|
689
|
-
#
|
690
|
-
# returned from the previous call to the `ListAttestors` method.
|
664
|
+
# this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned
|
665
|
+
# from the previous call to the `ListAttestors` method.
|
691
666
|
#
|
692
667
|
# @yield [response, operation] Access the result along with the RPC operation
|
693
668
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>]
|
@@ -761,10 +736,8 @@ module Google
|
|
761
736
|
end
|
762
737
|
|
763
738
|
##
|
764
|
-
# Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}.
|
765
|
-
#
|
766
|
-
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not
|
767
|
-
# exist.
|
739
|
+
# Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the
|
740
|
+
# {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist.
|
768
741
|
#
|
769
742
|
# @overload delete_attestor(request, options = nil)
|
770
743
|
# Pass arguments to `delete_attestor` via a request object, either of type
|
@@ -782,9 +755,8 @@ module Google
|
|
782
755
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
783
756
|
#
|
784
757
|
# @param name [::String]
|
785
|
-
# Required. The name of the
|
786
|
-
#
|
787
|
-
# in the format `projects/*/attestors/*`.
|
758
|
+
# Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format
|
759
|
+
# `projects/*/attestors/*`.
|
788
760
|
#
|
789
761
|
# @yield [response, operation] Access the result along with the RPC operation
|
790
762
|
# @yieldparam response [::Google::Protobuf::Empty]
|
@@ -44,15 +44,34 @@ module Google
|
|
44
44
|
##
|
45
45
|
# Create a fully-qualified Policy resource string.
|
46
46
|
#
|
47
|
-
#
|
47
|
+
# @overload policy_path(project:)
|
48
|
+
# The resource will be in the following format:
|
48
49
|
#
|
49
|
-
#
|
50
|
+
# `projects/{project}/policy`
|
50
51
|
#
|
51
|
-
#
|
52
|
+
# @param project [String]
|
53
|
+
#
|
54
|
+
# @overload policy_path(location:)
|
55
|
+
# The resource will be in the following format:
|
56
|
+
#
|
57
|
+
# `locations/{location}/policy`
|
58
|
+
#
|
59
|
+
# @param location [String]
|
52
60
|
#
|
53
61
|
# @return [::String]
|
54
|
-
def policy_path
|
55
|
-
|
62
|
+
def policy_path **args
|
63
|
+
resources = {
|
64
|
+
"project" => (proc do |project:|
|
65
|
+
"projects/#{project}/policy"
|
66
|
+
end),
|
67
|
+
"location" => (proc do |location:|
|
68
|
+
"locations/#{location}/policy"
|
69
|
+
end)
|
70
|
+
}
|
71
|
+
|
72
|
+
resource = resources[args.keys.sort.join(":")]
|
73
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
74
|
+
resource.call(**args)
|
56
75
|
end
|
57
76
|
|
58
77
|
##
|