google-cloud-binary_authorization 1.4.1 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d35324d7f0cc9a682a0bb85672d984a38b0ebce52b98ed1c049ce3200b88014
4
- data.tar.gz: af5c9136c34ddb05335fbd6e379ec5420b76f70a3a87a406a2af44ef184bd55f
3
+ metadata.gz: 6dfd3992f196112e0fe1e4ea2b7db2d3c60172fc96128ada4da4d8c5ae99e136
4
+ data.tar.gz: 42d52557baf75e0e7359ece5bd7c381b94db042d2e19adbd444f5a0759ef78db
5
5
  SHA512:
6
- metadata.gz: 8e0e907f8f6e353800d6977d1c6716176428f92545ed6bba6b32ba931c790baac55311b13f45ad5cacbeac46cdc46ba0e6498932c175bd3b7a9f86fda5a1ef1a
7
- data.tar.gz: 87d9e040cba3d01b5e214d14671d6463250e45883832704920a7bde9a85fa680dd5ddeda6995eb816e84a5cb359f3ee7974d1feb911fbc2902dc75b088f3e533
6
+ metadata.gz: e3747e54b97cd469636fb37bac3478eb15d759d48ee63253bdc8a6e5e013225be6abd70ffdd24b923481c757968290503233ea705520f0065f131db51f9ceadb
7
+ data.tar.gz: 4ca5fd32e1ed10e1da7a52bea2f3a8c83ced15af45d954e8a077464decdca3abb068600039cb2e6eeef4adcb1117cd7276a592588878c7d5d310d14f351883e9
data/README.md CHANGED
@@ -16,8 +16,7 @@ for this library, google-cloud-binary_authorization, to see the convenience meth
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-binary_authorization-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1/latest),
20
- [google-cloud-binary_authorization-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest).
19
+ [google-cloud-binary_authorization-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/binary-authorization/)
23
22
  for more usage information.
@@ -35,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
35
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/binaryauthorization.googleapis.com)
36
35
  1. {file:AUTHENTICATION.md Set up authentication.}
37
36
 
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-cloud-binary_authorization-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1/latest).
66
+
38
67
  ## Supported Ruby Versions
39
68
 
40
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
41
70
 
42
71
  Google provides official support for Ruby versions that are actively supported
43
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module BinaryAuthorization
23
- VERSION = "1.4.1"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
@@ -58,6 +58,11 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the BinauthzManagementService service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::BinaryAuthorization.binauthz_management_service_available?}.
65
+ #
61
66
  # ## About BinauthzManagementService
62
67
  #
63
68
  # Google Cloud Management Service for Binary Authorization admission policies
@@ -85,6 +90,37 @@ module Google
85
90
  service_module.const_get(:Client).new(&block)
86
91
  end
87
92
 
93
+ ##
94
+ # Determines whether the BinauthzManagementService service is supported by the current client.
95
+ # If true, you can retrieve a client object by calling {Google::Cloud::BinaryAuthorization.binauthz_management_service}.
96
+ # If false, that method will raise an exception. This could happen if the given
97
+ # API version does not exist or does not support the BinauthzManagementService service,
98
+ # or if the versioned client gem needs an update to support the BinauthzManagementService service.
99
+ #
100
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
101
+ # Defaults to `:v1`.
102
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
103
+ # @return [boolean] Whether the service is available.
104
+ #
105
+ def self.binauthz_management_service_available? version: :v1, transport: :grpc
106
+ require "google/cloud/binary_authorization/#{version.to_s.downcase}"
107
+ package_name = Google::Cloud::BinaryAuthorization
108
+ .constants
109
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
110
+ .first
111
+ return false unless package_name
112
+ service_module = Google::Cloud::BinaryAuthorization.const_get package_name
113
+ return false unless service_module.const_defined? :BinauthzManagementService
114
+ service_module = service_module.const_get :BinauthzManagementService
115
+ if transport == :rest
116
+ return false unless service_module.const_defined? :Rest
117
+ service_module = service_module.const_get :Rest
118
+ end
119
+ service_module.const_defined? :Client
120
+ rescue ::LoadError
121
+ false
122
+ end
123
+
88
124
  ##
89
125
  # Create a new client object for SystemPolicy.
90
126
  #
@@ -98,6 +134,11 @@ module Google
98
134
  # You can also specify a different transport by passing `:rest` or `:grpc` in
99
135
  # the `transport` parameter.
100
136
  #
137
+ # Raises an exception if the currently installed versioned client gem for the
138
+ # given API version does not support the given transport of the SystemPolicy service.
139
+ # You can determine whether the method will succeed by calling
140
+ # {Google::Cloud::BinaryAuthorization.system_policy_available?}.
141
+ #
101
142
  # ## About SystemPolicy
102
143
  #
103
144
  # API for working with the system policy.
@@ -119,6 +160,37 @@ module Google
119
160
  service_module.const_get(:Client).new(&block)
120
161
  end
121
162
 
163
+ ##
164
+ # Determines whether the SystemPolicy service is supported by the current client.
165
+ # If true, you can retrieve a client object by calling {Google::Cloud::BinaryAuthorization.system_policy}.
166
+ # If false, that method will raise an exception. This could happen if the given
167
+ # API version does not exist or does not support the SystemPolicy service,
168
+ # or if the versioned client gem needs an update to support the SystemPolicy service.
169
+ #
170
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
171
+ # Defaults to `:v1`.
172
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
173
+ # @return [boolean] Whether the service is available.
174
+ #
175
+ def self.system_policy_available? version: :v1, transport: :grpc
176
+ require "google/cloud/binary_authorization/#{version.to_s.downcase}"
177
+ package_name = Google::Cloud::BinaryAuthorization
178
+ .constants
179
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
180
+ .first
181
+ return false unless package_name
182
+ service_module = Google::Cloud::BinaryAuthorization.const_get package_name
183
+ return false unless service_module.const_defined? :SystemPolicy
184
+ service_module = service_module.const_get :SystemPolicy
185
+ if transport == :rest
186
+ return false unless service_module.const_defined? :Rest
187
+ service_module = service_module.const_get :Rest
188
+ end
189
+ service_module.const_defined? :Client
190
+ rescue ::LoadError
191
+ false
192
+ end
193
+
122
194
  ##
123
195
  # Create a new client object for ValidationHelper.
124
196
  #
@@ -132,6 +204,11 @@ module Google
132
204
  # You can also specify a different transport by passing `:rest` or `:grpc` in
133
205
  # the `transport` parameter.
134
206
  #
207
+ # Raises an exception if the currently installed versioned client gem for the
208
+ # given API version does not support the given transport of the ValidationHelper service.
209
+ # You can determine whether the method will succeed by calling
210
+ # {Google::Cloud::BinaryAuthorization.validation_helper_available?}.
211
+ #
135
212
  # ## About ValidationHelper
136
213
  #
137
214
  # BinAuthz Attestor verification
@@ -153,6 +230,37 @@ module Google
153
230
  service_module.const_get(:Client).new(&block)
154
231
  end
155
232
 
233
+ ##
234
+ # Determines whether the ValidationHelper service is supported by the current client.
235
+ # If true, you can retrieve a client object by calling {Google::Cloud::BinaryAuthorization.validation_helper}.
236
+ # If false, that method will raise an exception. This could happen if the given
237
+ # API version does not exist or does not support the ValidationHelper service,
238
+ # or if the versioned client gem needs an update to support the ValidationHelper service.
239
+ #
240
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
241
+ # Defaults to `:v1`.
242
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
243
+ # @return [boolean] Whether the service is available.
244
+ #
245
+ def self.validation_helper_available? version: :v1, transport: :grpc
246
+ require "google/cloud/binary_authorization/#{version.to_s.downcase}"
247
+ package_name = Google::Cloud::BinaryAuthorization
248
+ .constants
249
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
250
+ .first
251
+ return false unless package_name
252
+ service_module = Google::Cloud::BinaryAuthorization.const_get package_name
253
+ return false unless service_module.const_defined? :ValidationHelper
254
+ service_module = service_module.const_get :ValidationHelper
255
+ if transport == :rest
256
+ return false unless service_module.const_defined? :Rest
257
+ service_module = service_module.const_get :Rest
258
+ end
259
+ service_module.const_defined? :Client
260
+ rescue ::LoadError
261
+ false
262
+ end
263
+
156
264
  ##
157
265
  # Configure the google-cloud-binary_authorization library.
158
266
  #
metadata CHANGED
@@ -1,55 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-binary_authorization
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-09 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-binary_authorization-v1
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0.6'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: 2.a
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '0.6'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: 2.a
33
- - !ruby/object:Gem::Dependency
34
- name: google-cloud-binary_authorization-v1beta1
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '0.12'
40
- - - "<"
16
+ - - "~>"
41
17
  - !ruby/object:Gem::Version
42
- version: 2.a
18
+ version: '1.2'
43
19
  type: :runtime
44
20
  prerelease: false
45
21
  version_requirements: !ruby/object:Gem::Requirement
46
22
  requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: '0.12'
50
- - - "<"
23
+ - - "~>"
51
24
  - !ruby/object:Gem::Version
52
- version: 2.a
25
+ version: '1.2'
53
26
  - !ruby/object:Gem::Dependency
54
27
  name: google-cloud-core
55
28
  requirement: !ruby/object:Gem::Requirement
@@ -83,7 +56,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
83
56
  licenses:
84
57
  - Apache-2.0
85
58
  metadata: {}
86
- post_install_message:
87
59
  rdoc_options: []
88
60
  require_paths:
89
61
  - lib
@@ -91,15 +63,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
63
  requirements:
92
64
  - - ">="
93
65
  - !ruby/object:Gem::Version
94
- version: '2.7'
66
+ version: '3.0'
95
67
  required_rubygems_version: !ruby/object:Gem::Requirement
96
68
  requirements:
97
69
  - - ">="
98
70
  - !ruby/object:Gem::Version
99
71
  version: '0'
100
72
  requirements: []
101
- rubygems_version: 3.5.6
102
- signing_key:
73
+ rubygems_version: 3.6.3
103
74
  specification_version: 4
104
75
  summary: API Client library for the Binary Authorization API
105
76
  test_files: []