google-cloud-binary_authorization-v1 0.1.0 → 0.2.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 +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +11 -6
- data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb +146 -21
- data/lib/google/cloud/binary_authorization/v1/system_policy/client.rb +20 -3
- data/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb +20 -3
- data/lib/google/cloud/binary_authorization/v1/version.rb +1 -1
- data/lib/google/cloud/binary_authorization/v1.rb +2 -0
- data/lib/google/cloud/binaryauthorization/v1/resources_pb.rb +1 -0
- data/lib/google/cloud/binaryauthorization/v1/service_pb.rb +1 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/grafeas/v1/attestation.rb +21 -0
- data/proto_docs/grafeas/v1/common.rb +69 -2
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 987cac862d928d450a37aad781c0fd2fd4377c4b6680a3dc363e36f1790a4f1f
|
4
|
+
data.tar.gz: 34964903dd9d790a7c425b26a8d2082ca763f4330832adf293f45cdf21f8abfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4ea7f7a0d442ab3087a042130e4e871fc4c6ed7900c02baf16db21b056ffeb0dc95fc1f8e7e7950248d4085d9aed55fa7c79f15184bfe5b6e46d2dc7ccfcc36
|
7
|
+
data.tar.gz: 7739a6a891d340198cea4da199ff45a7be7ba850b2a9a65cc1cc4f1e551f154d5addfb51759e975989991887ddb3155d44a29a285e78f9e14923f12ee61ca2df
|
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::V1::GetPolicyRequest.new # (requ
|
|
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-v1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/binary-authorization/)
|
@@ -69,16 +69,21 @@ 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
|
-
This library is supported on Ruby 2.
|
79
|
+
This library is supported on Ruby 2.6+.
|
75
80
|
|
76
81
|
Google provides official support for Ruby versions that are actively supported
|
77
82
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
78
|
-
in security maintenance, and not end of life.
|
79
|
-
|
80
|
-
|
81
|
-
|
83
|
+
in security maintenance, and not end of life. Older versions of Ruby _may_
|
84
|
+
still work, but are unsupported and not recommended. See
|
85
|
+
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
86
|
+
support schedule.
|
82
87
|
|
83
88
|
## Which client should I use?
|
84
89
|
|
@@ -218,6 +218,21 @@ module Google
|
|
218
218
|
#
|
219
219
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
220
220
|
#
|
221
|
+
# @example Basic example
|
222
|
+
# require "google/cloud/binary_authorization/v1"
|
223
|
+
#
|
224
|
+
# # Create a client object. The client can be reused for multiple calls.
|
225
|
+
# client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new
|
226
|
+
#
|
227
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
228
|
+
# request = Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new
|
229
|
+
#
|
230
|
+
# # Call the get_policy method.
|
231
|
+
# result = client.get_policy request
|
232
|
+
#
|
233
|
+
# # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy.
|
234
|
+
# p result
|
235
|
+
#
|
221
236
|
def get_policy request, options = nil
|
222
237
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
223
238
|
|
@@ -235,9 +250,11 @@ module Google
|
|
235
250
|
gapic_version: ::Google::Cloud::BinaryAuthorization::V1::VERSION
|
236
251
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
237
252
|
|
238
|
-
header_params = {
|
239
|
-
|
240
|
-
|
253
|
+
header_params = {}
|
254
|
+
if request.name
|
255
|
+
header_params["name"] = request.name
|
256
|
+
end
|
257
|
+
|
241
258
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
242
259
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
243
260
|
|
@@ -292,6 +309,21 @@ module Google
|
|
292
309
|
#
|
293
310
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
294
311
|
#
|
312
|
+
# @example Basic example
|
313
|
+
# require "google/cloud/binary_authorization/v1"
|
314
|
+
#
|
315
|
+
# # Create a client object. The client can be reused for multiple calls.
|
316
|
+
# client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new
|
317
|
+
#
|
318
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
319
|
+
# request = Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new
|
320
|
+
#
|
321
|
+
# # Call the update_policy method.
|
322
|
+
# result = client.update_policy request
|
323
|
+
#
|
324
|
+
# # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy.
|
325
|
+
# p result
|
326
|
+
#
|
295
327
|
def update_policy request, options = nil
|
296
328
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
297
329
|
|
@@ -309,9 +341,11 @@ module Google
|
|
309
341
|
gapic_version: ::Google::Cloud::BinaryAuthorization::V1::VERSION
|
310
342
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
311
343
|
|
312
|
-
header_params = {
|
313
|
-
|
314
|
-
|
344
|
+
header_params = {}
|
345
|
+
if request.policy&.name
|
346
|
+
header_params["policy.name"] = request.policy.name
|
347
|
+
end
|
348
|
+
|
315
349
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
316
350
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
317
351
|
|
@@ -369,6 +403,21 @@ module Google
|
|
369
403
|
#
|
370
404
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
371
405
|
#
|
406
|
+
# @example Basic example
|
407
|
+
# require "google/cloud/binary_authorization/v1"
|
408
|
+
#
|
409
|
+
# # Create a client object. The client can be reused for multiple calls.
|
410
|
+
# client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new
|
411
|
+
#
|
412
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
413
|
+
# request = Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new
|
414
|
+
#
|
415
|
+
# # Call the create_attestor method.
|
416
|
+
# result = client.create_attestor request
|
417
|
+
#
|
418
|
+
# # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor.
|
419
|
+
# p result
|
420
|
+
#
|
372
421
|
def create_attestor request, options = nil
|
373
422
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
374
423
|
|
@@ -386,9 +435,11 @@ module Google
|
|
386
435
|
gapic_version: ::Google::Cloud::BinaryAuthorization::V1::VERSION
|
387
436
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
388
437
|
|
389
|
-
header_params = {
|
390
|
-
|
391
|
-
|
438
|
+
header_params = {}
|
439
|
+
if request.parent
|
440
|
+
header_params["parent"] = request.parent
|
441
|
+
end
|
442
|
+
|
392
443
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
393
444
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
394
445
|
|
@@ -439,6 +490,21 @@ module Google
|
|
439
490
|
#
|
440
491
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
441
492
|
#
|
493
|
+
# @example Basic example
|
494
|
+
# require "google/cloud/binary_authorization/v1"
|
495
|
+
#
|
496
|
+
# # Create a client object. The client can be reused for multiple calls.
|
497
|
+
# client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new
|
498
|
+
#
|
499
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
500
|
+
# request = Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new
|
501
|
+
#
|
502
|
+
# # Call the get_attestor method.
|
503
|
+
# result = client.get_attestor request
|
504
|
+
#
|
505
|
+
# # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor.
|
506
|
+
# p result
|
507
|
+
#
|
442
508
|
def get_attestor request, options = nil
|
443
509
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
444
510
|
|
@@ -456,9 +522,11 @@ module Google
|
|
456
522
|
gapic_version: ::Google::Cloud::BinaryAuthorization::V1::VERSION
|
457
523
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
458
524
|
|
459
|
-
header_params = {
|
460
|
-
|
461
|
-
|
525
|
+
header_params = {}
|
526
|
+
if request.name
|
527
|
+
header_params["name"] = request.name
|
528
|
+
end
|
529
|
+
|
462
530
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
463
531
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
464
532
|
|
@@ -510,6 +578,21 @@ module Google
|
|
510
578
|
#
|
511
579
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
512
580
|
#
|
581
|
+
# @example Basic example
|
582
|
+
# require "google/cloud/binary_authorization/v1"
|
583
|
+
#
|
584
|
+
# # Create a client object. The client can be reused for multiple calls.
|
585
|
+
# client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new
|
586
|
+
#
|
587
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
588
|
+
# request = Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new
|
589
|
+
#
|
590
|
+
# # Call the update_attestor method.
|
591
|
+
# result = client.update_attestor request
|
592
|
+
#
|
593
|
+
# # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor.
|
594
|
+
# p result
|
595
|
+
#
|
513
596
|
def update_attestor request, options = nil
|
514
597
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
515
598
|
|
@@ -527,9 +610,11 @@ module Google
|
|
527
610
|
gapic_version: ::Google::Cloud::BinaryAuthorization::V1::VERSION
|
528
611
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
529
612
|
|
530
|
-
header_params = {
|
531
|
-
|
532
|
-
|
613
|
+
header_params = {}
|
614
|
+
if request.attestor&.name
|
615
|
+
header_params["attestor.name"] = request.attestor.name
|
616
|
+
end
|
617
|
+
|
533
618
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
534
619
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
535
620
|
|
@@ -587,6 +672,27 @@ module Google
|
|
587
672
|
#
|
588
673
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
589
674
|
#
|
675
|
+
# @example Basic example
|
676
|
+
# require "google/cloud/binary_authorization/v1"
|
677
|
+
#
|
678
|
+
# # Create a client object. The client can be reused for multiple calls.
|
679
|
+
# client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new
|
680
|
+
#
|
681
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
682
|
+
# request = Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new
|
683
|
+
#
|
684
|
+
# # Call the list_attestors method.
|
685
|
+
# result = client.list_attestors request
|
686
|
+
#
|
687
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
688
|
+
# # iterate over all elements by calling #each, and the enumerable
|
689
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
690
|
+
# # methods are also available for managing paging directly.
|
691
|
+
# result.each do |response|
|
692
|
+
# # Each element is of type ::Google::Cloud::BinaryAuthorization::V1::Attestor.
|
693
|
+
# p response
|
694
|
+
# end
|
695
|
+
#
|
590
696
|
def list_attestors request, options = nil
|
591
697
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
592
698
|
|
@@ -604,9 +710,11 @@ module Google
|
|
604
710
|
gapic_version: ::Google::Cloud::BinaryAuthorization::V1::VERSION
|
605
711
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
606
712
|
|
607
|
-
header_params = {
|
608
|
-
|
609
|
-
|
713
|
+
header_params = {}
|
714
|
+
if request.parent
|
715
|
+
header_params["parent"] = request.parent
|
716
|
+
end
|
717
|
+
|
610
718
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
611
719
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
612
720
|
|
@@ -658,6 +766,21 @@ module Google
|
|
658
766
|
#
|
659
767
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
660
768
|
#
|
769
|
+
# @example Basic example
|
770
|
+
# require "google/cloud/binary_authorization/v1"
|
771
|
+
#
|
772
|
+
# # Create a client object. The client can be reused for multiple calls.
|
773
|
+
# client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new
|
774
|
+
#
|
775
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
776
|
+
# request = Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new
|
777
|
+
#
|
778
|
+
# # Call the delete_attestor method.
|
779
|
+
# result = client.delete_attestor request
|
780
|
+
#
|
781
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
782
|
+
# p result
|
783
|
+
#
|
661
784
|
def delete_attestor request, options = nil
|
662
785
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
663
786
|
|
@@ -675,9 +798,11 @@ module Google
|
|
675
798
|
gapic_version: ::Google::Cloud::BinaryAuthorization::V1::VERSION
|
676
799
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
677
800
|
|
678
|
-
header_params = {
|
679
|
-
|
680
|
-
|
801
|
+
header_params = {}
|
802
|
+
if request.name
|
803
|
+
header_params["name"] = request.name
|
804
|
+
end
|
805
|
+
|
681
806
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
682
807
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
683
808
|
|
@@ -174,6 +174,21 @@ module Google
|
|
174
174
|
#
|
175
175
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
176
176
|
#
|
177
|
+
# @example Basic example
|
178
|
+
# require "google/cloud/binary_authorization/v1"
|
179
|
+
#
|
180
|
+
# # Create a client object. The client can be reused for multiple calls.
|
181
|
+
# client = Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new
|
182
|
+
#
|
183
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
184
|
+
# request = Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new
|
185
|
+
#
|
186
|
+
# # Call the get_system_policy method.
|
187
|
+
# result = client.get_system_policy request
|
188
|
+
#
|
189
|
+
# # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy.
|
190
|
+
# p result
|
191
|
+
#
|
177
192
|
def get_system_policy request, options = nil
|
178
193
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
179
194
|
|
@@ -191,9 +206,11 @@ module Google
|
|
191
206
|
gapic_version: ::Google::Cloud::BinaryAuthorization::V1::VERSION
|
192
207
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
193
208
|
|
194
|
-
header_params = {
|
195
|
-
|
196
|
-
|
209
|
+
header_params = {}
|
210
|
+
if request.name
|
211
|
+
header_params["name"] = request.name
|
212
|
+
end
|
213
|
+
|
197
214
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
198
215
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
199
216
|
|
@@ -185,6 +185,21 @@ module Google
|
|
185
185
|
#
|
186
186
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
187
187
|
#
|
188
|
+
# @example Basic example
|
189
|
+
# require "google/cloud/binary_authorization/v1"
|
190
|
+
#
|
191
|
+
# # Create a client object. The client can be reused for multiple calls.
|
192
|
+
# client = Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new
|
193
|
+
#
|
194
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
195
|
+
# request = Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new
|
196
|
+
#
|
197
|
+
# # Call the validate_attestation_occurrence method.
|
198
|
+
# result = client.validate_attestation_occurrence request
|
199
|
+
#
|
200
|
+
# # The returned object is of type Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse.
|
201
|
+
# p result
|
202
|
+
#
|
188
203
|
def validate_attestation_occurrence request, options = nil
|
189
204
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
190
205
|
|
@@ -202,9 +217,11 @@ module Google
|
|
202
217
|
gapic_version: ::Google::Cloud::BinaryAuthorization::V1::VERSION
|
203
218
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
204
219
|
|
205
|
-
header_params = {
|
206
|
-
|
207
|
-
|
220
|
+
header_params = {}
|
221
|
+
if request.attestor
|
222
|
+
header_params["attestor"] = request.attestor
|
223
|
+
end
|
224
|
+
|
208
225
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
209
226
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
210
227
|
|
@@ -27,6 +27,8 @@ module Google
|
|
27
27
|
##
|
28
28
|
# To load this package, including all its services, and instantiate a client:
|
29
29
|
#
|
30
|
+
# @example
|
31
|
+
#
|
30
32
|
# require "google/cloud/binary_authorization/v1"
|
31
33
|
# client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new
|
32
34
|
#
|
@@ -7,6 +7,7 @@ require 'google/api/field_behavior_pb'
|
|
7
7
|
require 'google/api/resource_pb'
|
8
8
|
require 'google/protobuf/timestamp_pb'
|
9
9
|
require 'google/api/annotations_pb'
|
10
|
+
|
10
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
12
|
add_file("google/cloud/binaryauthorization/v1/resources.proto", :syntax => :proto3) do
|
12
13
|
add_message "google.cloud.binaryauthorization.v1.Policy" do
|
@@ -10,6 +10,7 @@ require 'google/api/resource_pb'
|
|
10
10
|
require 'google/cloud/binaryauthorization/v1/resources_pb'
|
11
11
|
require 'google/protobuf/empty_pb'
|
12
12
|
require 'grafeas/v1/attestation_pb'
|
13
|
+
|
13
14
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
15
|
add_file("google/cloud/binaryauthorization/v1/service.proto", :syntax => :proto3) do
|
15
16
|
add_message "google.cloud.binaryauthorization.v1.GetPolicyRequest" do
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
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
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
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"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
@@ -51,6 +51,16 @@ module Grafeas
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
# @!attribute [rw] compact_jwt
|
55
|
+
# @return [::String]
|
56
|
+
# The compact encoding of a JWS, which is always three base64 encoded strings
|
57
|
+
# joined by periods. For details, see:
|
58
|
+
# https://tools.ietf.org/html/rfc7515.html#section-3.1
|
59
|
+
class Jwt
|
60
|
+
include ::Google::Protobuf::MessageExts
|
61
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
62
|
+
end
|
63
|
+
|
54
64
|
# Occurrence that represents a single "attestation". The authenticity of an
|
55
65
|
# attestation can be verified using the attached signature. If the verifier
|
56
66
|
# trusts the public key of the signer, then verifying the signature is
|
@@ -69,6 +79,17 @@ module Grafeas
|
|
69
79
|
# should consider this attestation message verified if at least one
|
70
80
|
# `signature` verifies `serialized_payload`. See `Signature` in common.proto
|
71
81
|
# for more details on signature structure and verification.
|
82
|
+
# @!attribute [rw] jwts
|
83
|
+
# @return [::Array<::Grafeas::V1::Jwt>]
|
84
|
+
# One or more JWTs encoding a self-contained attestation.
|
85
|
+
# Each JWT encodes the payload that it verifies within the JWT itself.
|
86
|
+
# Verifier implementation SHOULD ignore the `serialized_payload` field
|
87
|
+
# when verifying these JWTs.
|
88
|
+
# If only JWTs are present on this AttestationOccurrence, then the
|
89
|
+
# `serialized_payload` SHOULD be left empty.
|
90
|
+
# Each JWT SHOULD encode a claim specific to the `resource_uri` of this
|
91
|
+
# Occurrence, but this is not validated by Grafeas metadata API
|
92
|
+
# implementations. The JWT itself is opaque to Grafeas.
|
72
93
|
class AttestationOccurrence
|
73
94
|
include ::Google::Protobuf::MessageExts
|
74
95
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -65,7 +65,7 @@ module Grafeas
|
|
65
65
|
# @return [::String]
|
66
66
|
# The identifier for the public key that verifies this signature.
|
67
67
|
# * The `public_key_id` is required.
|
68
|
-
# * The `public_key_id`
|
68
|
+
# * The `public_key_id` SHOULD be an RFC3986 conformant URI.
|
69
69
|
# * When possible, the `public_key_id` SHOULD be an immutable reference,
|
70
70
|
# such as a cryptographic digest.
|
71
71
|
#
|
@@ -85,9 +85,70 @@ module Grafeas
|
|
85
85
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
86
86
|
end
|
87
87
|
|
88
|
+
# MUST match
|
89
|
+
# https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
|
90
|
+
# authenticated message of arbitrary type.
|
91
|
+
# @!attribute [rw] payload
|
92
|
+
# @return [::String]
|
93
|
+
# @!attribute [rw] payload_type
|
94
|
+
# @return [::String]
|
95
|
+
# @!attribute [rw] signatures
|
96
|
+
# @return [::Array<::Grafeas::V1::EnvelopeSignature>]
|
97
|
+
class Envelope
|
98
|
+
include ::Google::Protobuf::MessageExts
|
99
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
100
|
+
end
|
101
|
+
|
102
|
+
# @!attribute [rw] sig
|
103
|
+
# @return [::String]
|
104
|
+
# @!attribute [rw] keyid
|
105
|
+
# @return [::String]
|
106
|
+
class EnvelopeSignature
|
107
|
+
include ::Google::Protobuf::MessageExts
|
108
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
109
|
+
end
|
110
|
+
|
111
|
+
# Indicates the location at which a package was found.
|
112
|
+
# @!attribute [rw] file_path
|
113
|
+
# @return [::String]
|
114
|
+
# For jars that are contained inside .war files, this filepath
|
115
|
+
# can indicate the path to war file combined with the path to jar file.
|
116
|
+
class FileLocation
|
117
|
+
include ::Google::Protobuf::MessageExts
|
118
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
119
|
+
end
|
120
|
+
|
121
|
+
# License information.
|
122
|
+
# @!attribute [rw] expression
|
123
|
+
# @return [::String]
|
124
|
+
# Often a single license can be used to represent the licensing terms.
|
125
|
+
# Sometimes it is necessary to include a choice of one or more licenses
|
126
|
+
# or some combination of license identifiers.
|
127
|
+
# Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
|
128
|
+
# "GPL-2.0-or-later WITH Bison-exception-2.2".
|
129
|
+
# @!attribute [rw] comments
|
130
|
+
# @return [::String]
|
131
|
+
# Comments
|
132
|
+
class License
|
133
|
+
include ::Google::Protobuf::MessageExts
|
134
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
135
|
+
end
|
136
|
+
|
137
|
+
# Digest information.
|
138
|
+
# @!attribute [rw] algo
|
139
|
+
# @return [::String]
|
140
|
+
# `SHA1`, `SHA512` etc.
|
141
|
+
# @!attribute [rw] digest_bytes
|
142
|
+
# @return [::String]
|
143
|
+
# Value of the digest.
|
144
|
+
class Digest
|
145
|
+
include ::Google::Protobuf::MessageExts
|
146
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
147
|
+
end
|
148
|
+
|
88
149
|
# Kind represents the kinds of notes supported.
|
89
150
|
module NoteKind
|
90
|
-
#
|
151
|
+
# Default value. This value is unused.
|
91
152
|
NOTE_KIND_UNSPECIFIED = 0
|
92
153
|
|
93
154
|
# The note and occurrence represent a package vulnerability.
|
@@ -113,6 +174,12 @@ module Grafeas
|
|
113
174
|
|
114
175
|
# This represents an available package upgrade.
|
115
176
|
UPGRADE = 8
|
177
|
+
|
178
|
+
# This represents a Compliance Note
|
179
|
+
COMPLIANCE = 9
|
180
|
+
|
181
|
+
# This represents a DSSE attestation Note
|
182
|
+
DSSE_ATTESTATION = 10
|
116
183
|
end
|
117
184
|
end
|
118
185
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-binary_authorization-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.10'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.10'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -70,28 +70,28 @@ dependencies:
|
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: 1.
|
73
|
+
version: 1.26.1
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: 1.
|
80
|
+
version: 1.26.1
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: minitest
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
85
|
- - "~>"
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version: '5.
|
87
|
+
version: '5.16'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
92
|
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version: '5.
|
94
|
+
version: '5.16'
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: minitest-focus
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,14 +126,14 @@ dependencies:
|
|
126
126
|
requirements:
|
127
127
|
- - ">="
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: '
|
129
|
+
version: '13.0'
|
130
130
|
type: :development
|
131
131
|
prerelease: false
|
132
132
|
version_requirements: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
134
|
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: '
|
136
|
+
version: '13.0'
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: redcarpet
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
@@ -228,14 +228,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
228
228
|
requirements:
|
229
229
|
- - ">="
|
230
230
|
- !ruby/object:Gem::Version
|
231
|
-
version: '2.
|
231
|
+
version: '2.6'
|
232
232
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - ">="
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
requirements: []
|
238
|
-
rubygems_version: 3.
|
238
|
+
rubygems_version: 3.3.14
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: API Client library for the Binary Authorization V1 API
|