google-cloud-kms 2.8.2 → 2.9.1
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 +32 -2
- data/lib/google/cloud/kms/version.rb +1 -1
- data/lib/google/cloud/kms.rb +144 -0
- 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: 3645e40062feae8a42f872bbd80477a73b77434dbf3ed23a3de4ddeb8955cd55
|
4
|
+
data.tar.gz: 153d167982a2c3fe0d18f2fe40ec1a695d8193e090518fc68fe7cac5d27ae1c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f65c8fad86a2303a668b20ad2d224d018e3b8542ee2e5a690d3ad3dd6be94d864b91593371afdfbbf076b933adf62533edf678f36b21d16dc08fd98964bfde32
|
7
|
+
data.tar.gz: 7129ad58a717df21c4dc4128693d41ebbb06362ff17e4762bb614b0ef6f1f89846641a785a03a71f3879bce87d2611dd47aed95bc6d8aba85d7abb2f190644f4
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Manages keys and performs cryptographic operations in a central cloud service, f
|
|
7
7
|
Actual client classes for the various versions of this API are defined in
|
8
8
|
_versioned_ client gems, with names of the form `google-cloud-kms-v*`.
|
9
9
|
The gem `google-cloud-kms` is the main client library that brings the
|
10
|
-
|
10
|
+
versioned gems in as dependencies, and provides high-level methods for
|
11
11
|
constructing clients. More information on versioned clients can be found below
|
12
12
|
in the section titled *Which client should I use?*.
|
13
13
|
|
@@ -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,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 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
68
|
# Provides interfaces for using [Cloud KMS
|
@@ -96,6 +101,37 @@ module Google
|
|
96
101
|
service_module.const_get(:Client).new(&block)
|
97
102
|
end
|
98
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
|
+
|
99
135
|
##
|
100
136
|
# Create a new client object for AutokeyAdmin.
|
101
137
|
#
|
@@ -109,6 +145,11 @@ module Google
|
|
109
145
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
110
146
|
# the `transport` parameter.
|
111
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
|
+
#
|
112
153
|
# ## About AutokeyAdmin
|
113
154
|
#
|
114
155
|
# Provides interfaces for managing [Cloud KMS
|
@@ -137,6 +178,37 @@ module Google
|
|
137
178
|
service_module.const_get(:Client).new(&block)
|
138
179
|
end
|
139
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
|
+
|
140
212
|
##
|
141
213
|
# Create a new client object for EkmService.
|
142
214
|
#
|
@@ -150,6 +222,11 @@ module Google
|
|
150
222
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
151
223
|
# the `transport` parameter.
|
152
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
|
+
#
|
153
230
|
# ## About EkmService
|
154
231
|
#
|
155
232
|
# Google Cloud Key Management EKM Service
|
@@ -175,6 +252,37 @@ module Google
|
|
175
252
|
service_module.const_get(:Client).new(&block)
|
176
253
|
end
|
177
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
|
+
|
178
286
|
##
|
179
287
|
# Create a new client object for KeyManagementService.
|
180
288
|
#
|
@@ -188,6 +296,11 @@ module Google
|
|
188
296
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
189
297
|
# the `transport` parameter.
|
190
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
|
+
#
|
191
304
|
# ## About KeyManagementService
|
192
305
|
#
|
193
306
|
# Google Cloud Key Management Service
|
@@ -220,6 +333,37 @@ module Google
|
|
220
333
|
service_module.const_get(:Client).new(&block)
|
221
334
|
end
|
222
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
|
+
|
223
367
|
##
|
224
368
|
# Configure the google-cloud-kms library.
|
225
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.1
|
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: 1980-01-02 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.8
|
84
81
|
specification_version: 4
|
85
82
|
summary: API Client library for the Cloud Key Management Service (KMS) API
|
86
83
|
test_files: []
|