google-cloud-kms 2.7.0 → 2.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +3 -3
- data/lib/google/cloud/kms/version.rb +1 -1
- data/lib/google/cloud/kms.rb +90 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1e551be096777f2ecb02162c4b9d795878f5efe670b678690da9a752a203b91
|
4
|
+
data.tar.gz: 14442fcf7a283893bdee930df36a51ee2944d3b9311e5d75ee3cd41ee5f7dd4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21cba4044019856a2573aea076d5e3506d56aa125c37fcccac4c1a3cecd2657a2b544eeec352927175f2576024b0fba33a01c30b504b125f54b0aeba13b44e48
|
7
|
+
data.tar.gz: 2e17db9eb842587733599cf2aac876b813bf64c06759faab7431ce742c88b2a1444cd8243fbee976b7ef26ecbb9dc6e61d2474f94721ebca6e11e0f0643c742e
|
data/AUTHENTICATION.md
CHANGED
@@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
|
|
56
56
|
```ruby
|
57
57
|
require "google/cloud/kms"
|
58
58
|
|
59
|
-
client = Google::Cloud::Kms.
|
59
|
+
client = Google::Cloud::Kms.autokey do |config|
|
60
60
|
config.credentials = "path/to/credentialfile.json"
|
61
61
|
end
|
62
62
|
```
|
@@ -70,7 +70,7 @@ Google::Cloud::Kms.configure do |config|
|
|
70
70
|
config.credentials = "path/to/credentialfile.json"
|
71
71
|
end
|
72
72
|
|
73
|
-
client = Google::Cloud::Kms.
|
73
|
+
client = Google::Cloud::Kms.autokey
|
74
74
|
```
|
75
75
|
|
76
76
|
### Environment Variables
|
@@ -100,7 +100,7 @@ require "google/cloud/kms"
|
|
100
100
|
|
101
101
|
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
|
102
102
|
|
103
|
-
client = Google::Cloud::Kms.
|
103
|
+
client = Google::Cloud::Kms.autokey
|
104
104
|
```
|
105
105
|
|
106
106
|
### Local ADC file
|
data/lib/google/cloud/kms.rb
CHANGED
@@ -45,6 +45,96 @@ end
|
|
45
45
|
module Google
|
46
46
|
module Cloud
|
47
47
|
module Kms
|
48
|
+
##
|
49
|
+
# Create a new client object for Autokey.
|
50
|
+
#
|
51
|
+
# By default, this returns an instance of
|
52
|
+
# [Google::Cloud::Kms::V1::Autokey::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-Autokey-Client)
|
53
|
+
# for a gRPC client for version V1 of the API.
|
54
|
+
# However, you can specify a different API version by passing it in the
|
55
|
+
# `version` parameter. If the Autokey service is
|
56
|
+
# supported by that API version, and the corresponding gem is available, the
|
57
|
+
# appropriate versioned client will be returned.
|
58
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
59
|
+
# the `transport` parameter.
|
60
|
+
#
|
61
|
+
# ## About Autokey
|
62
|
+
#
|
63
|
+
# Provides interfaces for using Cloud KMS Autokey to provision new
|
64
|
+
# CryptoKeys, ready for Customer Managed
|
65
|
+
# Encryption Key (CMEK) use, on-demand. To support certain client tooling, this
|
66
|
+
# feature is modeled around a KeyHandle
|
67
|
+
# resource: creating a KeyHandle in a resource
|
68
|
+
# project and given location triggers Cloud KMS Autokey to provision a
|
69
|
+
# CryptoKey in the configured key project and
|
70
|
+
# the same location.
|
71
|
+
#
|
72
|
+
# Prior to use in a given resource project,
|
73
|
+
# UpdateAutokeyConfig
|
74
|
+
# should have been called on an ancestor folder, setting the key project where
|
75
|
+
# Cloud KMS Autokey should create new
|
76
|
+
# CryptoKeys. See documentation for additional
|
77
|
+
# prerequisites. To check what key project, if any, is currently configured on
|
78
|
+
# a resource project's ancestor folder, see
|
79
|
+
# ShowEffectiveAutokeyConfig.
|
80
|
+
#
|
81
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
82
|
+
# Defaults to `:v1`.
|
83
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
84
|
+
# @return [::Object] A client object for the specified version.
|
85
|
+
#
|
86
|
+
def self.autokey version: :v1, transport: :grpc, &block
|
87
|
+
require "google/cloud/kms/#{version.to_s.downcase}"
|
88
|
+
|
89
|
+
package_name = Google::Cloud::Kms
|
90
|
+
.constants
|
91
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
92
|
+
.first
|
93
|
+
service_module = Google::Cloud::Kms.const_get(package_name).const_get(:Autokey)
|
94
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
95
|
+
service_module.const_get(:Client).new(&block)
|
96
|
+
end
|
97
|
+
|
98
|
+
##
|
99
|
+
# Create a new client object for AutokeyAdmin.
|
100
|
+
#
|
101
|
+
# By default, this returns an instance of
|
102
|
+
# [Google::Cloud::Kms::V1::AutokeyAdmin::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AutokeyAdmin-Client)
|
103
|
+
# for a gRPC client for version V1 of the API.
|
104
|
+
# However, you can specify a different API version by passing it in the
|
105
|
+
# `version` parameter. If the AutokeyAdmin service is
|
106
|
+
# supported by that API version, and the corresponding gem is available, the
|
107
|
+
# appropriate versioned client will be returned.
|
108
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
109
|
+
# the `transport` parameter.
|
110
|
+
#
|
111
|
+
# ## About AutokeyAdmin
|
112
|
+
#
|
113
|
+
# Provides interfaces for managing Cloud KMS Autokey folder-level
|
114
|
+
# configurations. A configuration is inherited by all descendent projects. A
|
115
|
+
# configuration at one folder overrides any other configurations in its
|
116
|
+
# ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS
|
117
|
+
# Autokey, so that users working in a descendant project can request
|
118
|
+
# provisioned CryptoKeys, ready for Customer
|
119
|
+
# Managed Encryption Key (CMEK) use, on-demand.
|
120
|
+
#
|
121
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
122
|
+
# Defaults to `:v1`.
|
123
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
124
|
+
# @return [::Object] A client object for the specified version.
|
125
|
+
#
|
126
|
+
def self.autokey_admin version: :v1, transport: :grpc, &block
|
127
|
+
require "google/cloud/kms/#{version.to_s.downcase}"
|
128
|
+
|
129
|
+
package_name = Google::Cloud::Kms
|
130
|
+
.constants
|
131
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
132
|
+
.first
|
133
|
+
service_module = Google::Cloud::Kms.const_get(package_name).const_get(:AutokeyAdmin)
|
134
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
135
|
+
service_module.const_get(:Client).new(&block)
|
136
|
+
end
|
137
|
+
|
48
138
|
##
|
49
139
|
# Create a new client object for EkmService.
|
50
140
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.26'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 2.a
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0.
|
43
|
+
version: '0.26'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.a
|