google-cloud-kms 2.8.1 → 2.9.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/README.md +31 -1
- data/lib/google/cloud/kms/version.rb +1 -1
- data/lib/google/cloud/kms.rb +148 -2
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24073816531885649865cc94d1e0d4eeb4c30b73eb7d9e647e98a7c10c1718dc
|
4
|
+
data.tar.gz: 20fd872302eac220b61fb961e51a04bb1264c491ea0f8f108e2e2292539dfd7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 299d5e2d0cd02f5d711b01976110db62872a949010a5e9d054f3faed5b84df7e8f2d3479a4318933ef6b4ff535ee0a49f7d2a9392b3490a866e3877b7eaa6618
|
7
|
+
data.tar.gz: 5a26492613cbdbf49952649fc002c1a350c791003d8c5a0f8d932c168f50bf3befac256c48c86816f79b27b8dfbce9d264259da6cacbf9dc5afce125aae4f7dd
|
data/README.md
CHANGED
@@ -42,9 +42,39 @@ and includes substantial interface changes. Existing code written for earlier
|
|
42
42
|
versions of this library will likely require updates to use this version.
|
43
43
|
See the {file:MIGRATING.md MIGRATING.md} document for more information.
|
44
44
|
|
45
|
+
## Debug Logging
|
46
|
+
|
47
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
48
|
+
your application's integration with the API. When logging is activated, key
|
49
|
+
events such as requests and responses, along with data payloads and metadata
|
50
|
+
such as headers and client configuration, are logged to the standard error
|
51
|
+
stream.
|
52
|
+
|
53
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
54
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
55
|
+
customers, private keys, or other security data that could be compromising if
|
56
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
57
|
+
the principle of least access. Google also recommends that Client Library Debug
|
58
|
+
Logging be enabled only temporarily during active debugging, and not used
|
59
|
+
permanently in production.
|
60
|
+
|
61
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
62
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
63
|
+
list of client library gem names. This will select the default logging behavior,
|
64
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
65
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
66
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
67
|
+
results in logs appearing alongside your application logs in the
|
68
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
69
|
+
|
70
|
+
Debug logging also requires that the versioned clients for this service be
|
71
|
+
sufficiently recent, released after about Dec 10, 2024. If logging is not
|
72
|
+
working, try updating the versioned clients in your bundle or installed gems:
|
73
|
+
[google-cloud-kms-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest).
|
74
|
+
|
45
75
|
## Supported Ruby Versions
|
46
76
|
|
47
|
-
This library is supported on Ruby
|
77
|
+
This library is supported on Ruby 3.0+.
|
48
78
|
|
49
79
|
Google provides official support for Ruby versions that are actively supported
|
50
80
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
data/lib/google/cloud/kms.rb
CHANGED
@@ -58,9 +58,15 @@ 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 Autokey service.
|
63
|
+
# You can determine whether the method will succeed by calling
|
64
|
+
# {Google::Cloud::Kms.autokey_available?}.
|
65
|
+
#
|
61
66
|
# ## About Autokey
|
62
67
|
#
|
63
|
-
# Provides interfaces for using Cloud KMS
|
68
|
+
# Provides interfaces for using [Cloud KMS
|
69
|
+
# Autokey](https://cloud.google.com/kms/help/autokey) to provision new
|
64
70
|
# CryptoKeys, ready for Customer Managed
|
65
71
|
# Encryption Key (CMEK) use, on-demand. To support certain client tooling, this
|
66
72
|
# feature is modeled around a KeyHandle
|
@@ -95,6 +101,37 @@ module Google
|
|
95
101
|
service_module.const_get(:Client).new(&block)
|
96
102
|
end
|
97
103
|
|
104
|
+
##
|
105
|
+
# Determines whether the Autokey service is supported by the current client.
|
106
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Kms.autokey}.
|
107
|
+
# If false, that method will raise an exception. This could happen if the given
|
108
|
+
# API version does not exist or does not support the Autokey service,
|
109
|
+
# or if the versioned client gem needs an update to support the Autokey service.
|
110
|
+
#
|
111
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
112
|
+
# Defaults to `:v1`.
|
113
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
114
|
+
# @return [boolean] Whether the service is available.
|
115
|
+
#
|
116
|
+
def self.autokey_available? version: :v1, transport: :grpc
|
117
|
+
require "google/cloud/kms/#{version.to_s.downcase}"
|
118
|
+
package_name = Google::Cloud::Kms
|
119
|
+
.constants
|
120
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
121
|
+
.first
|
122
|
+
return false unless package_name
|
123
|
+
service_module = Google::Cloud::Kms.const_get package_name
|
124
|
+
return false unless service_module.const_defined? :Autokey
|
125
|
+
service_module = service_module.const_get :Autokey
|
126
|
+
if transport == :rest
|
127
|
+
return false unless service_module.const_defined? :Rest
|
128
|
+
service_module = service_module.const_get :Rest
|
129
|
+
end
|
130
|
+
service_module.const_defined? :Client
|
131
|
+
rescue ::LoadError
|
132
|
+
false
|
133
|
+
end
|
134
|
+
|
98
135
|
##
|
99
136
|
# Create a new client object for AutokeyAdmin.
|
100
137
|
#
|
@@ -108,9 +145,15 @@ module Google
|
|
108
145
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
109
146
|
# the `transport` parameter.
|
110
147
|
#
|
148
|
+
# Raises an exception if the currently installed versioned client gem for the
|
149
|
+
# given API version does not support the given transport of the AutokeyAdmin service.
|
150
|
+
# You can determine whether the method will succeed by calling
|
151
|
+
# {Google::Cloud::Kms.autokey_admin_available?}.
|
152
|
+
#
|
111
153
|
# ## About AutokeyAdmin
|
112
154
|
#
|
113
|
-
# Provides interfaces for managing Cloud KMS
|
155
|
+
# Provides interfaces for managing [Cloud KMS
|
156
|
+
# Autokey](https://cloud.google.com/kms/help/autokey) folder-level
|
114
157
|
# configurations. A configuration is inherited by all descendent projects. A
|
115
158
|
# configuration at one folder overrides any other configurations in its
|
116
159
|
# ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS
|
@@ -135,6 +178,37 @@ module Google
|
|
135
178
|
service_module.const_get(:Client).new(&block)
|
136
179
|
end
|
137
180
|
|
181
|
+
##
|
182
|
+
# Determines whether the AutokeyAdmin service is supported by the current client.
|
183
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Kms.autokey_admin}.
|
184
|
+
# If false, that method will raise an exception. This could happen if the given
|
185
|
+
# API version does not exist or does not support the AutokeyAdmin service,
|
186
|
+
# or if the versioned client gem needs an update to support the AutokeyAdmin service.
|
187
|
+
#
|
188
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
189
|
+
# Defaults to `:v1`.
|
190
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
191
|
+
# @return [boolean] Whether the service is available.
|
192
|
+
#
|
193
|
+
def self.autokey_admin_available? version: :v1, transport: :grpc
|
194
|
+
require "google/cloud/kms/#{version.to_s.downcase}"
|
195
|
+
package_name = Google::Cloud::Kms
|
196
|
+
.constants
|
197
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
198
|
+
.first
|
199
|
+
return false unless package_name
|
200
|
+
service_module = Google::Cloud::Kms.const_get package_name
|
201
|
+
return false unless service_module.const_defined? :AutokeyAdmin
|
202
|
+
service_module = service_module.const_get :AutokeyAdmin
|
203
|
+
if transport == :rest
|
204
|
+
return false unless service_module.const_defined? :Rest
|
205
|
+
service_module = service_module.const_get :Rest
|
206
|
+
end
|
207
|
+
service_module.const_defined? :Client
|
208
|
+
rescue ::LoadError
|
209
|
+
false
|
210
|
+
end
|
211
|
+
|
138
212
|
##
|
139
213
|
# Create a new client object for EkmService.
|
140
214
|
#
|
@@ -148,6 +222,11 @@ module Google
|
|
148
222
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
149
223
|
# the `transport` parameter.
|
150
224
|
#
|
225
|
+
# Raises an exception if the currently installed versioned client gem for the
|
226
|
+
# given API version does not support the given transport of the EkmService service.
|
227
|
+
# You can determine whether the method will succeed by calling
|
228
|
+
# {Google::Cloud::Kms.ekm_service_available?}.
|
229
|
+
#
|
151
230
|
# ## About EkmService
|
152
231
|
#
|
153
232
|
# Google Cloud Key Management EKM Service
|
@@ -173,6 +252,37 @@ module Google
|
|
173
252
|
service_module.const_get(:Client).new(&block)
|
174
253
|
end
|
175
254
|
|
255
|
+
##
|
256
|
+
# Determines whether the EkmService service is supported by the current client.
|
257
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Kms.ekm_service}.
|
258
|
+
# If false, that method will raise an exception. This could happen if the given
|
259
|
+
# API version does not exist or does not support the EkmService service,
|
260
|
+
# or if the versioned client gem needs an update to support the EkmService service.
|
261
|
+
#
|
262
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
263
|
+
# Defaults to `:v1`.
|
264
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
265
|
+
# @return [boolean] Whether the service is available.
|
266
|
+
#
|
267
|
+
def self.ekm_service_available? version: :v1, transport: :grpc
|
268
|
+
require "google/cloud/kms/#{version.to_s.downcase}"
|
269
|
+
package_name = Google::Cloud::Kms
|
270
|
+
.constants
|
271
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
272
|
+
.first
|
273
|
+
return false unless package_name
|
274
|
+
service_module = Google::Cloud::Kms.const_get package_name
|
275
|
+
return false unless service_module.const_defined? :EkmService
|
276
|
+
service_module = service_module.const_get :EkmService
|
277
|
+
if transport == :rest
|
278
|
+
return false unless service_module.const_defined? :Rest
|
279
|
+
service_module = service_module.const_get :Rest
|
280
|
+
end
|
281
|
+
service_module.const_defined? :Client
|
282
|
+
rescue ::LoadError
|
283
|
+
false
|
284
|
+
end
|
285
|
+
|
176
286
|
##
|
177
287
|
# Create a new client object for KeyManagementService.
|
178
288
|
#
|
@@ -186,6 +296,11 @@ module Google
|
|
186
296
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
187
297
|
# the `transport` parameter.
|
188
298
|
#
|
299
|
+
# Raises an exception if the currently installed versioned client gem for the
|
300
|
+
# given API version does not support the given transport of the KeyManagementService service.
|
301
|
+
# You can determine whether the method will succeed by calling
|
302
|
+
# {Google::Cloud::Kms.key_management_service_available?}.
|
303
|
+
#
|
189
304
|
# ## About KeyManagementService
|
190
305
|
#
|
191
306
|
# Google Cloud Key Management Service
|
@@ -218,6 +333,37 @@ module Google
|
|
218
333
|
service_module.const_get(:Client).new(&block)
|
219
334
|
end
|
220
335
|
|
336
|
+
##
|
337
|
+
# Determines whether the KeyManagementService service is supported by the current client.
|
338
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Kms.key_management_service}.
|
339
|
+
# If false, that method will raise an exception. This could happen if the given
|
340
|
+
# API version does not exist or does not support the KeyManagementService service,
|
341
|
+
# or if the versioned client gem needs an update to support the KeyManagementService service.
|
342
|
+
#
|
343
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
344
|
+
# Defaults to `:v1`.
|
345
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
346
|
+
# @return [boolean] Whether the service is available.
|
347
|
+
#
|
348
|
+
def self.key_management_service_available? version: :v1, transport: :grpc
|
349
|
+
require "google/cloud/kms/#{version.to_s.downcase}"
|
350
|
+
package_name = Google::Cloud::Kms
|
351
|
+
.constants
|
352
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
353
|
+
.first
|
354
|
+
return false unless package_name
|
355
|
+
service_module = Google::Cloud::Kms.const_get package_name
|
356
|
+
return false unless service_module.const_defined? :KeyManagementService
|
357
|
+
service_module = service_module.const_get :KeyManagementService
|
358
|
+
if transport == :rest
|
359
|
+
return false unless service_module.const_defined? :Rest
|
360
|
+
service_module = service_module.const_get :Rest
|
361
|
+
end
|
362
|
+
service_module.const_defined? :Client
|
363
|
+
rescue ::LoadError
|
364
|
+
false
|
365
|
+
end
|
366
|
+
|
221
367
|
##
|
222
368
|
# Configure the google-cloud-kms library.
|
223
369
|
#
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-kms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: google-cloud-core
|
@@ -64,7 +63,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
64
63
|
licenses:
|
65
64
|
- Apache-2.0
|
66
65
|
metadata: {}
|
67
|
-
post_install_message:
|
68
66
|
rdoc_options: []
|
69
67
|
require_paths:
|
70
68
|
- lib
|
@@ -72,15 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
70
|
requirements:
|
73
71
|
- - ">="
|
74
72
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
73
|
+
version: '3.0'
|
76
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
75
|
requirements:
|
78
76
|
- - ">="
|
79
77
|
- !ruby/object:Gem::Version
|
80
78
|
version: '0'
|
81
79
|
requirements: []
|
82
|
-
rubygems_version: 3.
|
83
|
-
signing_key:
|
80
|
+
rubygems_version: 3.6.2
|
84
81
|
specification_version: 4
|
85
82
|
summary: API Client library for the Cloud Key Management Service (KMS) API
|
86
83
|
test_files: []
|