google-cloud-binary_authorization 1.4.0 → 1.5.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: f8b886235f89cd958e28e1c1eb7a3eac1832a8d62378d555542957fdb3e29325
4
- data.tar.gz: b5105d66b80078ff30ebb1ec75ff50e323d09e7bcdc73b81f50f2c4b686b6c05
3
+ metadata.gz: a41921afab495b40303ad0d57f11e4c34eca21f72f1c30186fb9b2eb7905ab1c
4
+ data.tar.gz: f9402d444dbce73e4dc08781d8635bc2b6f5897e1b7716236727362747de2d05
5
5
  SHA512:
6
- metadata.gz: cc604dac481e0f313d5b69b06f812cc1b1a1d1993d4b762bc6183f05fb41a34375f9c388e4b3fb2d11e05bdd9c4de604bd720723a174fcc3d1bec997805d23db
7
- data.tar.gz: 362309b19a84754a62d755d4ce81c6072f243f5114271fff34e1eecaacf9967e5f859c03670276fc696216e7c7d3f277a2239c826b49c20a8d81db1c8e104452
6
+ metadata.gz: 705241a05db6572d5cdc23ea0ba954a1065b122803ce91b2ba8fbe73a6f529e4f856f007c5fbce4380c66b420012de7aada424b0380f5fa4e871b483ba30529b
7
+ data.tar.gz: babcb9c6657fd2b21318c41b4afdf2c21d4b7d6e9543f17ebafd36487cbdd322f7571f918be24d4eec99199ca43834fe5401ab6344bd5be0bd65ac7a612e7d4a
data/README.md CHANGED
@@ -35,9 +35,40 @@ In order to use this library, you first need to go through the following steps:
35
35
  1. [Enable the API.](https://console.cloud.google.com/apis/library/binaryauthorization.googleapis.com)
36
36
  1. {file:AUTHENTICATION.md Set up authentication.}
37
37
 
38
+ ## Debug Logging
39
+
40
+ This library comes with opt-in Debug Logging that can help you troubleshoot
41
+ your application's integration with the API. When logging is activated, key
42
+ events such as requests and responses, along with data payloads and metadata
43
+ such as headers and client configuration, are logged to the standard error
44
+ stream.
45
+
46
+ **WARNING:** Client Library Debug Logging includes your data payloads in
47
+ plaintext, which could include sensitive data such as PII for yourself or your
48
+ customers, private keys, or other security data that could be compromising if
49
+ leaked. Always practice good data hygiene with your application logs, and follow
50
+ the principle of least access. Google also recommends that Client Library Debug
51
+ Logging be enabled only temporarily during active debugging, and not used
52
+ permanently in production.
53
+
54
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
55
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
56
+ list of client library gem names. This will select the default logging behavior,
57
+ which writes logs to the standard error stream. On a local workstation, this may
58
+ result in logs appearing on the console. When running on a Google Cloud hosting
59
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
60
+ results in logs appearing alongside your application logs in the
61
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
62
+
63
+ Debug logging also requires that the versioned clients for this service be
64
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
65
+ working, try updating the versioned clients in your bundle or installed gems:
66
+ [google-cloud-binary_authorization-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1/latest),
67
+ [google-cloud-binary_authorization-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest).
68
+
38
69
  ## Supported Ruby Versions
39
70
 
40
- This library is supported on Ruby 2.7+.
71
+ This library is supported on Ruby 3.0+.
41
72
 
42
73
  Google provides official support for Ruby versions that are actively supported
43
74
  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.0"
23
+ VERSION = "1.5.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,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-binary_authorization
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.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-02-26 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-binary_authorization-v1
@@ -83,7 +82,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
83
82
  licenses:
84
83
  - Apache-2.0
85
84
  metadata: {}
86
- post_install_message:
87
85
  rdoc_options: []
88
86
  require_paths:
89
87
  - lib
@@ -91,15 +89,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
89
  requirements:
92
90
  - - ">="
93
91
  - !ruby/object:Gem::Version
94
- version: '2.7'
92
+ version: '3.0'
95
93
  required_rubygems_version: !ruby/object:Gem::Requirement
96
94
  requirements:
97
95
  - - ">="
98
96
  - !ruby/object:Gem::Version
99
97
  version: '0'
100
98
  requirements: []
101
- rubygems_version: 3.5.6
102
- signing_key:
99
+ rubygems_version: 3.6.2
103
100
  specification_version: 4
104
101
  summary: API Client library for the Binary Authorization API
105
102
  test_files: []