google-cloud-kms 2.7.0 → 2.8.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/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: c52a7423e6c993949cb86447c598e0bb219319e1ac3ea6d43978e2534b5d29fb
|
4
|
+
data.tar.gz: 888e15d2f262253165b0222d24a4d0f11e1644b6c92bcc71f187947bb42a3268
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83cb9d75a5b418f7a5980a0bdd4411834da481029e9ef5b8c0b62d4c17140ed5a51b9ab3b885245fbf0d1a9d4c5822b66d1fa70721dc872c413c6c8d28a041ef
|
7
|
+
data.tar.gz: 991e642568e425b480767236a5b03768281bfbdbb36382307192f20894a09c4a0688161d43c1f71898e55c73bec4985f27ba0b2991823173e13c6e694f00a6b2
|
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.0
|
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-05-23 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
|