google-cloud-kms 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/README.md +7 -7
- data/lib/google/cloud/kms.rb +9 -6
- data/lib/google/cloud/kms/v1.rb +10 -6
- data/lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb +210 -12
- data/lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/service.rb +82 -2
- data/lib/google/cloud/kms/v1/key_management_service_client.rb +39 -8
- data/lib/google/cloud/kms/v1/resources_pb.rb +55 -0
- data/lib/google/cloud/kms/v1/service_pb.rb +36 -0
- data/lib/google/cloud/kms/v1/service_services_pb.rb +29 -5
- metadata +5 -6
- data/lib/google/cloud/kms/v1/doc/overview.rb +0 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 443cec7ba32064b6cfc2b3715a78f0563932d642d9ddc224fbce3821a532ea87
|
4
|
+
data.tar.gz: e727cb3923b6cf46da6b7c93cd5dd7e8cd983942567e8d15202174d9948a6a1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 437b87442fb5b3c80bb4ec2b03da2d2c1392290276abe9c726c545053e38a010fd099a91f024f6e57edb683b87ee3d503a15a6cebdc2d97ec640a69df1030865
|
7
|
+
data.tar.gz: 78f133c40894e362eaa47771480fed870f3fe7b6518272d25dee959ac65bbae8a0e7e9084c2c9b189d5bfc589fdccffe2507da28892a131da44e3366c0aca9f7
|
data/.yardopts
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# Ruby Client for
|
1
|
+
# Ruby Client for Cloud Key Management Service (KMS) API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
2
2
|
|
3
|
-
[
|
4
|
-
Manages
|
5
|
-
|
3
|
+
[Cloud Key Management Service (KMS) API][Product Documentation]:
|
4
|
+
Manages keys and performs cryptographic operations in a central cloud
|
5
|
+
service, for direct use by other cloud resources and applications.
|
6
6
|
- [Client Library Documentation][]
|
7
7
|
- [Product Documentation][]
|
8
8
|
|
@@ -12,7 +12,7 @@ steps:
|
|
12
12
|
|
13
13
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
14
14
|
2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
15
|
-
3. [Enable the
|
15
|
+
3. [Enable the Cloud Key Management Service (KMS) API.](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com)
|
16
16
|
4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
17
17
|
|
18
18
|
### Installation
|
@@ -21,9 +21,9 @@ $ gem install google-cloud-kms
|
|
21
21
|
```
|
22
22
|
|
23
23
|
### Next Steps
|
24
|
-
- Read the [Client Library Documentation][] for
|
24
|
+
- Read the [Client Library Documentation][] for Cloud Key Management Service (KMS) API
|
25
25
|
to see other available methods on the client.
|
26
|
-
- Read the [
|
26
|
+
- Read the [Cloud Key Management Service (KMS) API Product documentation][Product Documentation]
|
27
27
|
to learn more about the product and see How-to Guides.
|
28
28
|
- View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
29
29
|
to see the full list of Cloud APIs that we cover.
|
data/lib/google/cloud/kms.rb
CHANGED
@@ -21,11 +21,11 @@ module Google
|
|
21
21
|
# rubocop:disable LineLength
|
22
22
|
|
23
23
|
##
|
24
|
-
# # Ruby Client for
|
24
|
+
# # Ruby Client for Cloud Key Management Service (KMS) API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
25
25
|
#
|
26
|
-
# [
|
27
|
-
# Manages
|
28
|
-
#
|
26
|
+
# [Cloud Key Management Service (KMS) API][Product Documentation]:
|
27
|
+
# Manages keys and performs cryptographic operations in a central cloud
|
28
|
+
# service, for direct use by other cloud resources and applications.
|
29
29
|
# - [Product Documentation][]
|
30
30
|
#
|
31
31
|
# ## Quick Start
|
@@ -34,7 +34,7 @@ module Google
|
|
34
34
|
#
|
35
35
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
36
36
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
37
|
-
# 3. [Enable the
|
37
|
+
# 3. [Enable the Cloud Key Management Service (KMS) API.](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com)
|
38
38
|
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
39
39
|
#
|
40
40
|
# ### Installation
|
@@ -43,7 +43,7 @@ module Google
|
|
43
43
|
# ```
|
44
44
|
#
|
45
45
|
# ### Next Steps
|
46
|
-
# - Read the [
|
46
|
+
# - Read the [Cloud Key Management Service (KMS) API Product documentation][Product Documentation]
|
47
47
|
# to learn more about the product and see How-to Guides.
|
48
48
|
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
49
49
|
# to see the full list of Cloud APIs that we cover.
|
@@ -97,6 +97,9 @@ module Google
|
|
97
97
|
# * {Google::Cloud::Kms::V1::CryptoKey CryptoKey}
|
98
98
|
# * {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}
|
99
99
|
#
|
100
|
+
# If you are using manual gRPC libraries, see
|
101
|
+
# [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc).
|
102
|
+
#
|
100
103
|
# @param version [Symbol, String]
|
101
104
|
# The major version of the service to be used. By default :v1
|
102
105
|
# is used.
|
data/lib/google/cloud/kms/v1.rb
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
|
15
15
|
|
16
16
|
require "google/cloud/kms/v1/key_management_service_client"
|
17
|
+
require "google/cloud/kms/v1/service_pb"
|
17
18
|
|
18
19
|
module Google
|
19
20
|
module Cloud
|
@@ -21,11 +22,11 @@ module Google
|
|
21
22
|
# rubocop:disable LineLength
|
22
23
|
|
23
24
|
##
|
24
|
-
# # Ruby Client for
|
25
|
+
# # Ruby Client for Cloud Key Management Service (KMS) API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
25
26
|
#
|
26
|
-
# [
|
27
|
-
# Manages
|
28
|
-
#
|
27
|
+
# [Cloud Key Management Service (KMS) API][Product Documentation]:
|
28
|
+
# Manages keys and performs cryptographic operations in a central cloud
|
29
|
+
# service, for direct use by other cloud resources and applications.
|
29
30
|
# - [Product Documentation][]
|
30
31
|
#
|
31
32
|
# ## Quick Start
|
@@ -34,7 +35,7 @@ module Google
|
|
34
35
|
#
|
35
36
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
36
37
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
37
|
-
# 3. [Enable the
|
38
|
+
# 3. [Enable the Cloud Key Management Service (KMS) API.](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com)
|
38
39
|
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
39
40
|
#
|
40
41
|
# ### Installation
|
@@ -43,7 +44,7 @@ module Google
|
|
43
44
|
# ```
|
44
45
|
#
|
45
46
|
# ### Next Steps
|
46
|
-
# - Read the [
|
47
|
+
# - Read the [Cloud Key Management Service (KMS) API Product documentation][Product Documentation]
|
47
48
|
# to learn more about the product and see How-to Guides.
|
48
49
|
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
49
50
|
# to see the full list of Cloud APIs that we cover.
|
@@ -89,6 +90,9 @@ module Google
|
|
89
90
|
# * {Google::Cloud::Kms::V1::CryptoKey CryptoKey}
|
90
91
|
# * {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}
|
91
92
|
#
|
93
|
+
# If you are using manual gRPC libraries, see
|
94
|
+
# [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc).
|
95
|
+
#
|
92
96
|
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
93
97
|
# Provides the means for authenticating requests made by the client. This parameter can
|
94
98
|
# be many types.
|
@@ -44,10 +44,13 @@ module Google
|
|
44
44
|
#
|
45
45
|
# The {Google::Cloud::Kms::V1::CryptoKey CryptoKey}'s primary version can be updated via
|
46
46
|
# {Google::Cloud::Kms::V1::KeyManagementService::UpdateCryptoKeyPrimaryVersion UpdateCryptoKeyPrimaryVersion}.
|
47
|
+
#
|
48
|
+
# All keys with {Google::Cloud::Kms::V1::CryptoKey#purpose purpose}
|
49
|
+
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT} have a
|
50
|
+
# primary. For other keys, this field will be omitted.
|
47
51
|
# @!attribute [rw] purpose
|
48
52
|
# @return [Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose]
|
49
|
-
# The immutable purpose of this {Google::Cloud::Kms::V1::CryptoKey CryptoKey}.
|
50
|
-
# purpose is {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
|
53
|
+
# The immutable purpose of this {Google::Cloud::Kms::V1::CryptoKey CryptoKey}.
|
51
54
|
# @!attribute [rw] create_time
|
52
55
|
# @return [Google::Protobuf::Timestamp]
|
53
56
|
# Output only. The time at which this {Google::Cloud::Kms::V1::CryptoKey CryptoKey} was created.
|
@@ -62,20 +65,34 @@ module Google
|
|
62
65
|
# {Google::Cloud::Kms::V1::KeyManagementService::CreateCryptoKeyVersion CreateCryptoKeyVersion} and
|
63
66
|
# {Google::Cloud::Kms::V1::KeyManagementService::UpdateCryptoKeyPrimaryVersion UpdateCryptoKeyPrimaryVersion}
|
64
67
|
# do not affect {Google::Cloud::Kms::V1::CryptoKey#next_rotation_time next_rotation_time}.
|
68
|
+
#
|
69
|
+
# Keys with {Google::Cloud::Kms::V1::CryptoKey#purpose purpose}
|
70
|
+
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT} support
|
71
|
+
# automatic rotation. For other keys, this field must be omitted.
|
65
72
|
# @!attribute [rw] rotation_period
|
66
73
|
# @return [Google::Protobuf::Duration]
|
67
74
|
# {Google::Cloud::Kms::V1::CryptoKey#next_rotation_time next_rotation_time} will be advanced by this period when the service
|
68
75
|
# automatically rotates a key. Must be at least one day.
|
69
76
|
#
|
70
77
|
# If {Google::Cloud::Kms::V1::CryptoKey#rotation_period rotation_period} is set, {Google::Cloud::Kms::V1::CryptoKey#next_rotation_time next_rotation_time} must also be set.
|
78
|
+
#
|
79
|
+
# Keys with {Google::Cloud::Kms::V1::CryptoKey#purpose purpose}
|
80
|
+
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT} support
|
81
|
+
# automatic rotation. For other keys, this field must be omitted.
|
82
|
+
# @!attribute [rw] version_template
|
83
|
+
# @return [Google::Cloud::Kms::V1::CryptoKeyVersionTemplate]
|
84
|
+
# A template describing settings for new {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} instances.
|
85
|
+
# The properties of new {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} instances created by either
|
86
|
+
# {Google::Cloud::Kms::V1::KeyManagementService::CreateCryptoKeyVersion CreateCryptoKeyVersion} or
|
87
|
+
# auto-rotation are controlled by this template.
|
71
88
|
# @!attribute [rw] labels
|
72
89
|
# @return [Hash{String => String}]
|
73
90
|
# Labels with user-defined metadata. For more information, see
|
74
91
|
# [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
|
75
92
|
class CryptoKey
|
76
|
-
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the capabilities of a
|
77
|
-
#
|
78
|
-
#
|
93
|
+
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose CryptoKeyPurpose} describes the cryptographic capabilities of a
|
94
|
+
# {Google::Cloud::Kms::V1::CryptoKey CryptoKey}. A given key can only be used for the operations allowed by
|
95
|
+
# its purpose.
|
79
96
|
module CryptoKeyPurpose
|
80
97
|
# Not specified.
|
81
98
|
CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0
|
@@ -84,20 +101,66 @@ module Google
|
|
84
101
|
# {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt} and
|
85
102
|
# {Google::Cloud::Kms::V1::KeyManagementService::Decrypt Decrypt}.
|
86
103
|
ENCRYPT_DECRYPT = 1
|
104
|
+
|
105
|
+
# {Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
|
106
|
+
# {Google::Cloud::Kms::V1::KeyManagementService::AsymmetricSign AsymmetricSign} and
|
107
|
+
# {Google::Cloud::Kms::V1::KeyManagementService::GetPublicKey GetPublicKey}.
|
108
|
+
ASYMMETRIC_SIGN = 5
|
109
|
+
|
110
|
+
# {Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with this purpose may be used with
|
111
|
+
# {Google::Cloud::Kms::V1::KeyManagementService::AsymmetricDecrypt AsymmetricDecrypt} and
|
112
|
+
# {Google::Cloud::Kms::V1::KeyManagementService::GetPublicKey GetPublicKey}.
|
113
|
+
ASYMMETRIC_DECRYPT = 6
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
# A {Google::Cloud::Kms::V1::CryptoKeyVersionTemplate CryptoKeyVersionTemplate} specifies the properties to use when creating
|
118
|
+
# a new {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, either manually with
|
119
|
+
# {Google::Cloud::Kms::V1::KeyManagementService::CreateCryptoKeyVersion CreateCryptoKeyVersion} or
|
120
|
+
# automatically as a result of auto-rotation.
|
121
|
+
# @!attribute [rw] protection_level
|
122
|
+
# @return [Google::Cloud::Kms::V1::ProtectionLevel]
|
123
|
+
# {Google::Cloud::Kms::V1::ProtectionLevel ProtectionLevel} to use when creating a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} based on
|
124
|
+
# this template. Immutable. Defaults to {Google::Cloud::Kms::V1::ProtectionLevel::SOFTWARE SOFTWARE}.
|
125
|
+
# @!attribute [rw] algorithm
|
126
|
+
# @return [Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm]
|
127
|
+
# Required. {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm Algorithm} to use
|
128
|
+
# when creating a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} based on this template.
|
129
|
+
#
|
130
|
+
# For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
|
131
|
+
# this field is omitted and {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose} is
|
132
|
+
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
|
133
|
+
class CryptoKeyVersionTemplate; end
|
134
|
+
|
135
|
+
# Contains an HSM-generated attestation about a key operation.
|
136
|
+
# @!attribute [rw] format
|
137
|
+
# @return [Google::Cloud::Kms::V1::KeyOperationAttestation::AttestationFormat]
|
138
|
+
# Output only. The format of the attestation data.
|
139
|
+
# @!attribute [rw] content
|
140
|
+
# @return [String]
|
141
|
+
# Output only. The attestation data provided by the HSM when the key
|
142
|
+
# operation was performed.
|
143
|
+
class KeyOperationAttestation
|
144
|
+
# Attestion formats provided by the HSM.
|
145
|
+
module AttestationFormat
|
146
|
+
ATTESTATION_FORMAT_UNSPECIFIED = 0
|
147
|
+
|
148
|
+
# Cavium HSM attestation compressed with gzip. Note that this format is
|
149
|
+
# defined by Cavium and subject to change at any time.
|
150
|
+
CAVIUM_V1_COMPRESSED = 3
|
87
151
|
end
|
88
152
|
end
|
89
153
|
|
90
154
|
# A {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} represents an individual cryptographic key, and the
|
91
155
|
# associated key material.
|
92
156
|
#
|
93
|
-
#
|
94
|
-
#
|
95
|
-
# version for the operation.
|
157
|
+
# An {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED} version can be
|
158
|
+
# used for cryptographic operations.
|
96
159
|
#
|
97
160
|
# For security reasons, the raw cryptographic key material represented by a
|
98
161
|
# {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} can never be viewed or exported. It can only be used to
|
99
|
-
# encrypt or
|
100
|
-
# KMS.
|
162
|
+
# encrypt, decrypt, or sign data when an authorized user or application invokes
|
163
|
+
# Cloud KMS.
|
101
164
|
# @!attribute [rw] name
|
102
165
|
# @return [String]
|
103
166
|
# Output only. The resource name for this {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} in the format
|
@@ -105,9 +168,27 @@ module Google
|
|
105
168
|
# @!attribute [rw] state
|
106
169
|
# @return [Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState]
|
107
170
|
# The current state of the {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}.
|
171
|
+
# @!attribute [rw] protection_level
|
172
|
+
# @return [Google::Cloud::Kms::V1::ProtectionLevel]
|
173
|
+
# Output only. The {Google::Cloud::Kms::V1::ProtectionLevel ProtectionLevel} describing how crypto operations are
|
174
|
+
# performed with this {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}.
|
175
|
+
# @!attribute [rw] algorithm
|
176
|
+
# @return [Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm]
|
177
|
+
# Output only. The {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm CryptoKeyVersionAlgorithm} that this
|
178
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} supports.
|
179
|
+
# @!attribute [rw] attestation
|
180
|
+
# @return [Google::Cloud::Kms::V1::KeyOperationAttestation]
|
181
|
+
# Output only. Statement that was generated and signed by the HSM at key
|
182
|
+
# creation time. Use this statement to verify attributes of the key as stored
|
183
|
+
# on the HSM, independently of Google. Only provided for key versions with
|
184
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersion#protection_level protection_level} {Google::Cloud::Kms::V1::ProtectionLevel::HSM HSM}.
|
108
185
|
# @!attribute [rw] create_time
|
109
186
|
# @return [Google::Protobuf::Timestamp]
|
110
187
|
# Output only. The time at which this {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} was created.
|
188
|
+
# @!attribute [rw] generate_time
|
189
|
+
# @return [Google::Protobuf::Timestamp]
|
190
|
+
# Output only. The time this {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}'s key material was
|
191
|
+
# generated.
|
111
192
|
# @!attribute [rw] destroy_time
|
112
193
|
# @return [Google::Protobuf::Timestamp]
|
113
194
|
# Output only. The time this {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}'s key material is scheduled
|
@@ -119,13 +200,89 @@ module Google
|
|
119
200
|
# destroyed. Only present if {Google::Cloud::Kms::V1::CryptoKeyVersion#state state} is
|
120
201
|
# {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROYED DESTROYED}.
|
121
202
|
class CryptoKeyVersion
|
203
|
+
# The algorithm of the {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating what
|
204
|
+
# parameters must be used for each cryptographic operation.
|
205
|
+
#
|
206
|
+
# The
|
207
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::GOOGLE_SYMMETRIC_ENCRYPTION GOOGLE_SYMMETRIC_ENCRYPTION}
|
208
|
+
# algorithm is usable with {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
|
209
|
+
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
|
210
|
+
#
|
211
|
+
# Algorithms beginning with "RSA_SIGN_" are usable with {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
|
212
|
+
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
|
213
|
+
#
|
214
|
+
# The fields in the name after "RSA_SIGN_" correspond to the following
|
215
|
+
# parameters: padding algorithm, modulus bit length, and digest algorithm.
|
216
|
+
#
|
217
|
+
# For PSS, the salt length used is equal to the length of digest
|
218
|
+
# algorithm. For example,
|
219
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm::RSA_SIGN_PSS_2048_SHA256 RSA_SIGN_PSS_2048_SHA256}
|
220
|
+
# will use PSS with a salt length of 256 bits or 32 bytes.
|
221
|
+
#
|
222
|
+
# Algorithms beginning with "RSA_DECRYPT_" are usable with
|
223
|
+
# {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
|
224
|
+
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_DECRYPT ASYMMETRIC_DECRYPT}.
|
225
|
+
#
|
226
|
+
# The fields in the name after "RSA_DECRYPT_" correspond to the following
|
227
|
+
# parameters: padding algorithm, modulus bit length, and digest algorithm.
|
228
|
+
#
|
229
|
+
# Algorithms beginning with "EC_SIGN_" are usable with {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
|
230
|
+
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ASYMMETRIC_SIGN ASYMMETRIC_SIGN}.
|
231
|
+
#
|
232
|
+
# The fields in the name after "EC_SIGN_" correspond to the following
|
233
|
+
# parameters: elliptic curve, digest algorithm.
|
234
|
+
module CryptoKeyVersionAlgorithm
|
235
|
+
# Not specified.
|
236
|
+
CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0
|
237
|
+
|
238
|
+
# Creates symmetric encryption keys.
|
239
|
+
GOOGLE_SYMMETRIC_ENCRYPTION = 1
|
240
|
+
|
241
|
+
# RSASSA-PSS 2048 bit key with a SHA256 digest.
|
242
|
+
RSA_SIGN_PSS_2048_SHA256 = 2
|
243
|
+
|
244
|
+
# RSASSA-PSS 3072 bit key with a SHA256 digest.
|
245
|
+
RSA_SIGN_PSS_3072_SHA256 = 3
|
246
|
+
|
247
|
+
# RSASSA-PSS 4096 bit key with a SHA256 digest.
|
248
|
+
RSA_SIGN_PSS_4096_SHA256 = 4
|
249
|
+
|
250
|
+
# RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
|
251
|
+
RSA_SIGN_PKCS1_2048_SHA256 = 5
|
252
|
+
|
253
|
+
# RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
|
254
|
+
RSA_SIGN_PKCS1_3072_SHA256 = 6
|
255
|
+
|
256
|
+
# RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
|
257
|
+
RSA_SIGN_PKCS1_4096_SHA256 = 7
|
258
|
+
|
259
|
+
# RSAES-OAEP 2048 bit key with a SHA256 digest.
|
260
|
+
RSA_DECRYPT_OAEP_2048_SHA256 = 8
|
261
|
+
|
262
|
+
# RSAES-OAEP 3072 bit key with a SHA256 digest.
|
263
|
+
RSA_DECRYPT_OAEP_3072_SHA256 = 9
|
264
|
+
|
265
|
+
# RSAES-OAEP 4096 bit key with a SHA256 digest.
|
266
|
+
RSA_DECRYPT_OAEP_4096_SHA256 = 10
|
267
|
+
|
268
|
+
# ECDSA on the NIST P-256 curve with a SHA256 digest.
|
269
|
+
EC_SIGN_P256_SHA256 = 12
|
270
|
+
|
271
|
+
# ECDSA on the NIST P-384 curve with a SHA384 digest.
|
272
|
+
EC_SIGN_P384_SHA384 = 13
|
273
|
+
end
|
274
|
+
|
122
275
|
# The state of a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, indicating if it can be used.
|
123
276
|
module CryptoKeyVersionState
|
124
277
|
# Not specified.
|
125
278
|
CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0
|
126
279
|
|
127
|
-
# This version may be used
|
128
|
-
#
|
280
|
+
# This version is still being generated. It may not be used, enabled,
|
281
|
+
# disabled, or destroyed yet. Cloud KMS will automatically mark this
|
282
|
+
# version {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::ENABLED ENABLED} as soon as the version is ready.
|
283
|
+
PENDING_GENERATION = 5
|
284
|
+
|
285
|
+
# This version may be used for cryptographic operations.
|
129
286
|
ENABLED = 1
|
130
287
|
|
131
288
|
# This version may not be used, but the key material is still available,
|
@@ -142,6 +299,47 @@ module Google
|
|
142
299
|
# to put it back into the {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DISABLED DISABLED} state.
|
143
300
|
DESTROY_SCHEDULED = 4
|
144
301
|
end
|
302
|
+
|
303
|
+
# A view for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}s. Controls the level of detail returned
|
304
|
+
# for {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersions} in
|
305
|
+
# {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions} and
|
306
|
+
# {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeys KeyManagementService::ListCryptoKeys}.
|
307
|
+
module CryptoKeyVersionView
|
308
|
+
# Default view for each {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Does not include
|
309
|
+
# the {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation} field.
|
310
|
+
CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0
|
311
|
+
|
312
|
+
# Provides all fields in each {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}, including the
|
313
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersion#attestation attestation}.
|
314
|
+
FULL = 1
|
315
|
+
end
|
316
|
+
end
|
317
|
+
|
318
|
+
# The public key for a given {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}. Obtained via
|
319
|
+
# {Google::Cloud::Kms::V1::KeyManagementService::GetPublicKey GetPublicKey}.
|
320
|
+
# @!attribute [rw] pem
|
321
|
+
# @return [String]
|
322
|
+
# The public key, encoded in PEM format. For more information, see the
|
323
|
+
# [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for
|
324
|
+
# [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
|
325
|
+
# [Textual Encoding of Subject Public Key Info]
|
326
|
+
# (https://tools.ietf.org/html/rfc7468#section-13).
|
327
|
+
# @!attribute [rw] algorithm
|
328
|
+
# @return [Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm]
|
329
|
+
# The {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm Algorithm} associated
|
330
|
+
# with this key.
|
331
|
+
class PublicKey; end
|
332
|
+
|
333
|
+
# {Google::Cloud::Kms::V1::ProtectionLevel ProtectionLevel} specifies how cryptographic operations are performed.
|
334
|
+
module ProtectionLevel
|
335
|
+
# Not specified.
|
336
|
+
PROTECTION_LEVEL_UNSPECIFIED = 0
|
337
|
+
|
338
|
+
# Crypto operations are performed in software.
|
339
|
+
SOFTWARE = 1
|
340
|
+
|
341
|
+
# Crypto operations are performed in a Hardware Security Module.
|
342
|
+
HSM = 2
|
145
343
|
end
|
146
344
|
end
|
147
345
|
end
|
@@ -49,6 +49,9 @@ module Google
|
|
49
49
|
# @return [String]
|
50
50
|
# Optional pagination token, returned earlier via
|
51
51
|
# {Google::Cloud::Kms::V1::ListCryptoKeysResponse#next_page_token ListCryptoKeysResponse#next_page_token}.
|
52
|
+
# @!attribute [rw] version_view
|
53
|
+
# @return [Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionView]
|
54
|
+
# The fields of the primary version to include in the response.
|
52
55
|
class ListCryptoKeysRequest; end
|
53
56
|
|
54
57
|
# Request message for {Google::Cloud::Kms::V1::KeyManagementService::ListCryptoKeyVersions KeyManagementService::ListCryptoKeyVersions}.
|
@@ -67,6 +70,9 @@ module Google
|
|
67
70
|
# @return [String]
|
68
71
|
# Optional pagination token, returned earlier via
|
69
72
|
# {Google::Cloud::Kms::V1::ListCryptoKeyVersionsResponse#next_page_token ListCryptoKeyVersionsResponse#next_page_token}.
|
73
|
+
# @!attribute [rw] view
|
74
|
+
# @return [Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionView]
|
75
|
+
# The fields to include in the response.
|
70
76
|
class ListCryptoKeyVersionsRequest; end
|
71
77
|
|
72
78
|
# Response message for {Google::Cloud::Kms::V1::KeyManagementService::ListKeyRings KeyManagementService::ListKeyRings}.
|
@@ -128,6 +134,13 @@ module Google
|
|
128
134
|
# The {Google::Cloud::Kms::V1::CryptoKeyVersion#name name} of the {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to get.
|
129
135
|
class GetCryptoKeyVersionRequest; end
|
130
136
|
|
137
|
+
# Request message for {Google::Cloud::Kms::V1::KeyManagementService::GetPublicKey KeyManagementService::GetPublicKey}.
|
138
|
+
# @!attribute [rw] name
|
139
|
+
# @return [String]
|
140
|
+
# The {Google::Cloud::Kms::V1::CryptoKeyVersion#name name} of the {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} public key to
|
141
|
+
# get.
|
142
|
+
class GetPublicKeyRequest; end
|
143
|
+
|
131
144
|
# Request message for {Google::Cloud::Kms::V1::KeyManagementService::CreateKeyRing KeyManagementService::CreateKeyRing}.
|
132
145
|
# @!attribute [rw] parent
|
133
146
|
# @return [String]
|
@@ -195,11 +208,24 @@ module Google
|
|
195
208
|
# @!attribute [rw] plaintext
|
196
209
|
# @return [String]
|
197
210
|
# Required. The data to encrypt. Must be no larger than 64KiB.
|
211
|
+
#
|
212
|
+
# The maximum size depends on the key version's
|
213
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersionTemplate#protection_level protection_level}. For
|
214
|
+
# {Google::Cloud::Kms::V1::ProtectionLevel::SOFTWARE SOFTWARE} keys, the plaintext must be no larger
|
215
|
+
# than 64KiB. For {Google::Cloud::Kms::V1::ProtectionLevel::HSM HSM} keys, the combined length of the
|
216
|
+
# plaintext and additional_authenticated_data fields must be no larger than
|
217
|
+
# 8KiB.
|
198
218
|
# @!attribute [rw] additional_authenticated_data
|
199
219
|
# @return [String]
|
200
220
|
# Optional data that, if specified, must also be provided during decryption
|
201
|
-
# through {Google::Cloud::Kms::V1::DecryptRequest#additional_authenticated_data DecryptRequest#additional_authenticated_data}.
|
202
|
-
#
|
221
|
+
# through {Google::Cloud::Kms::V1::DecryptRequest#additional_authenticated_data DecryptRequest#additional_authenticated_data}.
|
222
|
+
#
|
223
|
+
# The maximum size depends on the key version's
|
224
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersionTemplate#protection_level protection_level}. For
|
225
|
+
# {Google::Cloud::Kms::V1::ProtectionLevel::SOFTWARE SOFTWARE} keys, the AAD must be no larger than
|
226
|
+
# 64KiB. For {Google::Cloud::Kms::V1::ProtectionLevel::HSM HSM} keys, the combined length of the
|
227
|
+
# plaintext and additional_authenticated_data fields must be no larger than
|
228
|
+
# 8KiB.
|
203
229
|
class EncryptRequest; end
|
204
230
|
|
205
231
|
# Request message for {Google::Cloud::Kms::V1::KeyManagementService::Decrypt KeyManagementService::Decrypt}.
|
@@ -217,6 +243,28 @@ module Google
|
|
217
243
|
# {Google::Cloud::Kms::V1::EncryptRequest#additional_authenticated_data EncryptRequest#additional_authenticated_data}.
|
218
244
|
class DecryptRequest; end
|
219
245
|
|
246
|
+
# Request message for {Google::Cloud::Kms::V1::KeyManagementService::AsymmetricSign KeyManagementService::AsymmetricSign}.
|
247
|
+
# @!attribute [rw] name
|
248
|
+
# @return [String]
|
249
|
+
# Required. The resource name of the {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to use for signing.
|
250
|
+
# @!attribute [rw] digest
|
251
|
+
# @return [Google::Cloud::Kms::V1::Digest]
|
252
|
+
# Required. The digest of the data to sign. The digest must be produced with
|
253
|
+
# the same digest algorithm as specified by the key version's
|
254
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersion#algorithm algorithm}.
|
255
|
+
class AsymmetricSignRequest; end
|
256
|
+
|
257
|
+
# Request message for {Google::Cloud::Kms::V1::KeyManagementService::AsymmetricDecrypt KeyManagementService::AsymmetricDecrypt}.
|
258
|
+
# @!attribute [rw] name
|
259
|
+
# @return [String]
|
260
|
+
# Required. The resource name of the {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to use for
|
261
|
+
# decryption.
|
262
|
+
# @!attribute [rw] ciphertext
|
263
|
+
# @return [String]
|
264
|
+
# Required. The data encrypted with the named {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}'s public
|
265
|
+
# key using OAEP.
|
266
|
+
class AsymmetricDecryptRequest; end
|
267
|
+
|
220
268
|
# Response message for {Google::Cloud::Kms::V1::KeyManagementService::Decrypt KeyManagementService::Decrypt}.
|
221
269
|
# @!attribute [rw] plaintext
|
222
270
|
# @return [String]
|
@@ -232,6 +280,18 @@ module Google
|
|
232
280
|
# The encrypted data.
|
233
281
|
class EncryptResponse; end
|
234
282
|
|
283
|
+
# Response message for {Google::Cloud::Kms::V1::KeyManagementService::AsymmetricSign KeyManagementService::AsymmetricSign}.
|
284
|
+
# @!attribute [rw] signature
|
285
|
+
# @return [String]
|
286
|
+
# The created signature.
|
287
|
+
class AsymmetricSignResponse; end
|
288
|
+
|
289
|
+
# Response message for {Google::Cloud::Kms::V1::KeyManagementService::AsymmetricDecrypt KeyManagementService::AsymmetricDecrypt}.
|
290
|
+
# @!attribute [rw] plaintext
|
291
|
+
# @return [String]
|
292
|
+
# The decrypted data originally encrypted with the matching public key.
|
293
|
+
class AsymmetricDecryptResponse; end
|
294
|
+
|
235
295
|
# Request message for {Google::Cloud::Kms::V1::KeyManagementService::UpdateCryptoKeyPrimaryVersion KeyManagementService::UpdateCryptoKeyPrimaryVersion}.
|
236
296
|
# @!attribute [rw] name
|
237
297
|
# @return [String]
|
@@ -252,6 +312,26 @@ module Google
|
|
252
312
|
# @return [String]
|
253
313
|
# The resource name of the {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} to restore.
|
254
314
|
class RestoreCryptoKeyVersionRequest; end
|
315
|
+
|
316
|
+
# A {Google::Cloud::Kms::V1::Digest Digest} holds a cryptographic message digest.
|
317
|
+
# @!attribute [rw] sha256
|
318
|
+
# @return [String]
|
319
|
+
# A message digest produced with the SHA-256 algorithm.
|
320
|
+
# @!attribute [rw] sha384
|
321
|
+
# @return [String]
|
322
|
+
# A message digest produced with the SHA-384 algorithm.
|
323
|
+
# @!attribute [rw] sha512
|
324
|
+
# @return [String]
|
325
|
+
# A message digest produced with the SHA-512 algorithm.
|
326
|
+
class Digest; end
|
327
|
+
|
328
|
+
# Cloud KMS metadata for the given {Google::Cloud::Location::Location}.
|
329
|
+
# @!attribute [rw] hsm_available
|
330
|
+
# @return [true, false]
|
331
|
+
# Indicates whether {Google::Cloud::Kms::V1::CryptoKey CryptoKeys} with
|
332
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersionTemplate#protection_level protection_level}
|
333
|
+
# {Google::Cloud::Kms::V1::ProtectionLevel::HSM HSM} can be created in this location.
|
334
|
+
class LocationMetadata; end
|
255
335
|
end
|
256
336
|
end
|
257
337
|
end
|
@@ -42,6 +42,9 @@ module Google
|
|
42
42
|
# * {Google::Cloud::Kms::V1::CryptoKey CryptoKey}
|
43
43
|
# * {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}
|
44
44
|
#
|
45
|
+
# If you are using manual gRPC libraries, see
|
46
|
+
# [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc).
|
47
|
+
#
|
45
48
|
# @!attribute [r] key_management_service_stub
|
46
49
|
# @return [Google::Cloud::Kms::V1::KeyManagementService::Stub]
|
47
50
|
# @!attribute [r] iam_policy_stub
|
@@ -522,6 +525,8 @@ module Google
|
|
522
525
|
# parameter does not affect the return value. If page streaming is
|
523
526
|
# performed per-page, this determines the maximum number of
|
524
527
|
# resources in a page.
|
528
|
+
# @param version_view [Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionView]
|
529
|
+
# The fields of the primary version to include in the response.
|
525
530
|
# @param options [Google::Gax::CallOptions]
|
526
531
|
# Overrides the default settings for this call, e.g, timeout,
|
527
532
|
# retries, etc.
|
@@ -556,11 +561,13 @@ module Google
|
|
556
561
|
def list_crypto_keys \
|
557
562
|
parent,
|
558
563
|
page_size: nil,
|
564
|
+
version_view: nil,
|
559
565
|
options: nil,
|
560
566
|
&block
|
561
567
|
req = {
|
562
568
|
parent: parent,
|
563
|
-
page_size: page_size
|
569
|
+
page_size: page_size,
|
570
|
+
version_view: version_view
|
564
571
|
}.delete_if { |_, v| v.nil? }
|
565
572
|
req = Google::Gax::to_proto(req, Google::Cloud::Kms::V1::ListCryptoKeysRequest)
|
566
573
|
@list_crypto_keys.call(req, options, &block)
|
@@ -577,6 +584,8 @@ module Google
|
|
577
584
|
# parameter does not affect the return value. If page streaming is
|
578
585
|
# performed per-page, this determines the maximum number of
|
579
586
|
# resources in a page.
|
587
|
+
# @param view [Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionView]
|
588
|
+
# The fields to include in the response.
|
580
589
|
# @param options [Google::Gax::CallOptions]
|
581
590
|
# Overrides the default settings for this call, e.g, timeout,
|
582
591
|
# retries, etc.
|
@@ -611,11 +620,13 @@ module Google
|
|
611
620
|
def list_crypto_key_versions \
|
612
621
|
parent,
|
613
622
|
page_size: nil,
|
623
|
+
view: nil,
|
614
624
|
options: nil,
|
615
625
|
&block
|
616
626
|
req = {
|
617
627
|
parent: parent,
|
618
|
-
page_size: page_size
|
628
|
+
page_size: page_size,
|
629
|
+
view: view
|
619
630
|
}.delete_if { |_, v| v.nil? }
|
620
631
|
req = Google::Gax::to_proto(req, Google::Cloud::Kms::V1::ListCryptoKeyVersionsRequest)
|
621
632
|
@list_crypto_key_versions.call(req, options, &block)
|
@@ -762,7 +773,9 @@ module Google
|
|
762
773
|
|
763
774
|
# Create a new {Google::Cloud::Kms::V1::CryptoKey CryptoKey} within a {Google::Cloud::Kms::V1::KeyRing KeyRing}.
|
764
775
|
#
|
765
|
-
# {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
|
776
|
+
# {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose} and
|
777
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersionTemplate#algorithm CryptoKey#version_template#algorithm}
|
778
|
+
# are required.
|
766
779
|
#
|
767
780
|
# @param parent [String]
|
768
781
|
# Required. The {Google::Cloud::Kms::V1::KeyRing#name name} of the KeyRing associated with the
|
@@ -952,6 +965,8 @@ module Google
|
|
952
965
|
end
|
953
966
|
|
954
967
|
# Encrypts data, so that it can only be recovered by a call to {Google::Cloud::Kms::V1::KeyManagementService::Decrypt Decrypt}.
|
968
|
+
# The {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose} must be
|
969
|
+
# {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
|
955
970
|
#
|
956
971
|
# @param name [String]
|
957
972
|
# Required. The resource name of the {Google::Cloud::Kms::V1::CryptoKey CryptoKey} or {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion}
|
@@ -961,10 +976,23 @@ module Google
|
|
961
976
|
# {Google::Cloud::Kms::V1::CryptoKey#primary primary version}.
|
962
977
|
# @param plaintext [String]
|
963
978
|
# Required. The data to encrypt. Must be no larger than 64KiB.
|
979
|
+
#
|
980
|
+
# The maximum size depends on the key version's
|
981
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersionTemplate#protection_level protection_level}. For
|
982
|
+
# {Google::Cloud::Kms::V1::ProtectionLevel::SOFTWARE SOFTWARE} keys, the plaintext must be no larger
|
983
|
+
# than 64KiB. For {Google::Cloud::Kms::V1::ProtectionLevel::HSM HSM} keys, the combined length of the
|
984
|
+
# plaintext and additional_authenticated_data fields must be no larger than
|
985
|
+
# 8KiB.
|
964
986
|
# @param additional_authenticated_data [String]
|
965
987
|
# Optional data that, if specified, must also be provided during decryption
|
966
|
-
# through {Google::Cloud::Kms::V1::DecryptRequest#additional_authenticated_data DecryptRequest#additional_authenticated_data}.
|
967
|
-
#
|
988
|
+
# through {Google::Cloud::Kms::V1::DecryptRequest#additional_authenticated_data DecryptRequest#additional_authenticated_data}.
|
989
|
+
#
|
990
|
+
# The maximum size depends on the key version's
|
991
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersionTemplate#protection_level protection_level}. For
|
992
|
+
# {Google::Cloud::Kms::V1::ProtectionLevel::SOFTWARE SOFTWARE} keys, the AAD must be no larger than
|
993
|
+
# 64KiB. For {Google::Cloud::Kms::V1::ProtectionLevel::HSM HSM} keys, the combined length of the
|
994
|
+
# plaintext and additional_authenticated_data fields must be no larger than
|
995
|
+
# 8KiB.
|
968
996
|
# @param options [Google::Gax::CallOptions]
|
969
997
|
# Overrides the default settings for this call, e.g, timeout,
|
970
998
|
# retries, etc.
|
@@ -998,7 +1026,8 @@ module Google
|
|
998
1026
|
@encrypt.call(req, options, &block)
|
999
1027
|
end
|
1000
1028
|
|
1001
|
-
# Decrypts data that was protected by {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt}.
|
1029
|
+
# Decrypts data that was protected by {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt}. The {Google::Cloud::Kms::V1::CryptoKey#purpose CryptoKey#purpose}
|
1030
|
+
# must be {Google::Cloud::Kms::V1::CryptoKey::CryptoKeyPurpose::ENCRYPT_DECRYPT ENCRYPT_DECRYPT}.
|
1002
1031
|
#
|
1003
1032
|
# @param name [String]
|
1004
1033
|
# Required. The resource name of the {Google::Cloud::Kms::V1::CryptoKey CryptoKey} to use for decryption.
|
@@ -1042,7 +1071,9 @@ module Google
|
|
1042
1071
|
@decrypt.call(req, options, &block)
|
1043
1072
|
end
|
1044
1073
|
|
1045
|
-
# Update the version of a {Google::Cloud::Kms::V1::CryptoKey CryptoKey} that will be used in {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt}
|
1074
|
+
# Update the version of a {Google::Cloud::Kms::V1::CryptoKey CryptoKey} that will be used in {Google::Cloud::Kms::V1::KeyManagementService::Encrypt Encrypt}.
|
1075
|
+
#
|
1076
|
+
# Returns an error if called on an asymmetric key.
|
1046
1077
|
#
|
1047
1078
|
# @param name [String]
|
1048
1079
|
# The resource name of the {Google::Cloud::Kms::V1::CryptoKey CryptoKey} to update.
|
@@ -1121,7 +1152,7 @@ module Google
|
|
1121
1152
|
end
|
1122
1153
|
|
1123
1154
|
# Restore a {Google::Cloud::Kms::V1::CryptoKeyVersion CryptoKeyVersion} in the
|
1124
|
-
# {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROY_SCHEDULED DESTROY_SCHEDULED}
|
1155
|
+
# {Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionState::DESTROY_SCHEDULED DESTROY_SCHEDULED}
|
1125
1156
|
# state.
|
1126
1157
|
#
|
1127
1158
|
# Upon restoration of the CryptoKeyVersion, {Google::Cloud::Kms::V1::CryptoKeyVersion#state state}
|
@@ -18,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
18
18
|
optional :purpose, :enum, 3, "google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose"
|
19
19
|
optional :create_time, :message, 5, "google.protobuf.Timestamp"
|
20
20
|
optional :next_rotation_time, :message, 7, "google.protobuf.Timestamp"
|
21
|
+
optional :version_template, :message, 11, "google.cloud.kms.v1.CryptoKeyVersionTemplate"
|
21
22
|
map :labels, :string, :string, 10
|
22
23
|
oneof :rotation_schedule do
|
23
24
|
optional :rotation_period, :message, 8, "google.protobuf.Duration"
|
@@ -26,21 +27,68 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
26
27
|
add_enum "google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose" do
|
27
28
|
value :CRYPTO_KEY_PURPOSE_UNSPECIFIED, 0
|
28
29
|
value :ENCRYPT_DECRYPT, 1
|
30
|
+
value :ASYMMETRIC_SIGN, 5
|
31
|
+
value :ASYMMETRIC_DECRYPT, 6
|
32
|
+
end
|
33
|
+
add_message "google.cloud.kms.v1.CryptoKeyVersionTemplate" do
|
34
|
+
optional :protection_level, :enum, 1, "google.cloud.kms.v1.ProtectionLevel"
|
35
|
+
optional :algorithm, :enum, 3, "google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm"
|
36
|
+
end
|
37
|
+
add_message "google.cloud.kms.v1.KeyOperationAttestation" do
|
38
|
+
optional :format, :enum, 4, "google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat"
|
39
|
+
optional :content, :bytes, 5
|
40
|
+
end
|
41
|
+
add_enum "google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat" do
|
42
|
+
value :ATTESTATION_FORMAT_UNSPECIFIED, 0
|
43
|
+
value :CAVIUM_V1_COMPRESSED, 3
|
29
44
|
end
|
30
45
|
add_message "google.cloud.kms.v1.CryptoKeyVersion" do
|
31
46
|
optional :name, :string, 1
|
32
47
|
optional :state, :enum, 3, "google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState"
|
48
|
+
optional :protection_level, :enum, 7, "google.cloud.kms.v1.ProtectionLevel"
|
49
|
+
optional :algorithm, :enum, 10, "google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm"
|
50
|
+
optional :attestation, :message, 8, "google.cloud.kms.v1.KeyOperationAttestation"
|
33
51
|
optional :create_time, :message, 4, "google.protobuf.Timestamp"
|
52
|
+
optional :generate_time, :message, 11, "google.protobuf.Timestamp"
|
34
53
|
optional :destroy_time, :message, 5, "google.protobuf.Timestamp"
|
35
54
|
optional :destroy_event_time, :message, 6, "google.protobuf.Timestamp"
|
36
55
|
end
|
56
|
+
add_enum "google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm" do
|
57
|
+
value :CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED, 0
|
58
|
+
value :GOOGLE_SYMMETRIC_ENCRYPTION, 1
|
59
|
+
value :RSA_SIGN_PSS_2048_SHA256, 2
|
60
|
+
value :RSA_SIGN_PSS_3072_SHA256, 3
|
61
|
+
value :RSA_SIGN_PSS_4096_SHA256, 4
|
62
|
+
value :RSA_SIGN_PKCS1_2048_SHA256, 5
|
63
|
+
value :RSA_SIGN_PKCS1_3072_SHA256, 6
|
64
|
+
value :RSA_SIGN_PKCS1_4096_SHA256, 7
|
65
|
+
value :RSA_DECRYPT_OAEP_2048_SHA256, 8
|
66
|
+
value :RSA_DECRYPT_OAEP_3072_SHA256, 9
|
67
|
+
value :RSA_DECRYPT_OAEP_4096_SHA256, 10
|
68
|
+
value :EC_SIGN_P256_SHA256, 12
|
69
|
+
value :EC_SIGN_P384_SHA384, 13
|
70
|
+
end
|
37
71
|
add_enum "google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState" do
|
38
72
|
value :CRYPTO_KEY_VERSION_STATE_UNSPECIFIED, 0
|
73
|
+
value :PENDING_GENERATION, 5
|
39
74
|
value :ENABLED, 1
|
40
75
|
value :DISABLED, 2
|
41
76
|
value :DESTROYED, 3
|
42
77
|
value :DESTROY_SCHEDULED, 4
|
43
78
|
end
|
79
|
+
add_enum "google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView" do
|
80
|
+
value :CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED, 0
|
81
|
+
value :FULL, 1
|
82
|
+
end
|
83
|
+
add_message "google.cloud.kms.v1.PublicKey" do
|
84
|
+
optional :pem, :string, 1
|
85
|
+
optional :algorithm, :enum, 2, "google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm"
|
86
|
+
end
|
87
|
+
add_enum "google.cloud.kms.v1.ProtectionLevel" do
|
88
|
+
value :PROTECTION_LEVEL_UNSPECIFIED, 0
|
89
|
+
value :SOFTWARE, 1
|
90
|
+
value :HSM, 2
|
91
|
+
end
|
44
92
|
end
|
45
93
|
|
46
94
|
module Google
|
@@ -50,8 +98,15 @@ module Google
|
|
50
98
|
KeyRing = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.KeyRing").msgclass
|
51
99
|
CryptoKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CryptoKey").msgclass
|
52
100
|
CryptoKey::CryptoKeyPurpose = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose").enummodule
|
101
|
+
CryptoKeyVersionTemplate = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CryptoKeyVersionTemplate").msgclass
|
102
|
+
KeyOperationAttestation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.KeyOperationAttestation").msgclass
|
103
|
+
KeyOperationAttestation::AttestationFormat = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat").enummodule
|
53
104
|
CryptoKeyVersion = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CryptoKeyVersion").msgclass
|
105
|
+
CryptoKeyVersion::CryptoKeyVersionAlgorithm = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm").enummodule
|
54
106
|
CryptoKeyVersion::CryptoKeyVersionState = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState").enummodule
|
107
|
+
CryptoKeyVersion::CryptoKeyVersionView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView").enummodule
|
108
|
+
PublicKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.PublicKey").msgclass
|
109
|
+
ProtectionLevel = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.ProtectionLevel").enummodule
|
55
110
|
end
|
56
111
|
end
|
57
112
|
end
|
@@ -19,11 +19,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
19
19
|
optional :parent, :string, 1
|
20
20
|
optional :page_size, :int32, 2
|
21
21
|
optional :page_token, :string, 3
|
22
|
+
optional :version_view, :enum, 4, "google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView"
|
22
23
|
end
|
23
24
|
add_message "google.cloud.kms.v1.ListCryptoKeyVersionsRequest" do
|
24
25
|
optional :parent, :string, 1
|
25
26
|
optional :page_size, :int32, 2
|
26
27
|
optional :page_token, :string, 3
|
28
|
+
optional :view, :enum, 4, "google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView"
|
27
29
|
end
|
28
30
|
add_message "google.cloud.kms.v1.ListKeyRingsResponse" do
|
29
31
|
repeated :key_rings, :message, 1, "google.cloud.kms.v1.KeyRing"
|
@@ -49,6 +51,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
49
51
|
add_message "google.cloud.kms.v1.GetCryptoKeyVersionRequest" do
|
50
52
|
optional :name, :string, 1
|
51
53
|
end
|
54
|
+
add_message "google.cloud.kms.v1.GetPublicKeyRequest" do
|
55
|
+
optional :name, :string, 1
|
56
|
+
end
|
52
57
|
add_message "google.cloud.kms.v1.CreateKeyRingRequest" do
|
53
58
|
optional :parent, :string, 1
|
54
59
|
optional :key_ring_id, :string, 2
|
@@ -81,6 +86,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
81
86
|
optional :ciphertext, :bytes, 2
|
82
87
|
optional :additional_authenticated_data, :bytes, 3
|
83
88
|
end
|
89
|
+
add_message "google.cloud.kms.v1.AsymmetricSignRequest" do
|
90
|
+
optional :name, :string, 1
|
91
|
+
optional :digest, :message, 3, "google.cloud.kms.v1.Digest"
|
92
|
+
end
|
93
|
+
add_message "google.cloud.kms.v1.AsymmetricDecryptRequest" do
|
94
|
+
optional :name, :string, 1
|
95
|
+
optional :ciphertext, :bytes, 3
|
96
|
+
end
|
84
97
|
add_message "google.cloud.kms.v1.DecryptResponse" do
|
85
98
|
optional :plaintext, :bytes, 1
|
86
99
|
end
|
@@ -88,6 +101,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
88
101
|
optional :name, :string, 1
|
89
102
|
optional :ciphertext, :bytes, 2
|
90
103
|
end
|
104
|
+
add_message "google.cloud.kms.v1.AsymmetricSignResponse" do
|
105
|
+
optional :signature, :bytes, 1
|
106
|
+
end
|
107
|
+
add_message "google.cloud.kms.v1.AsymmetricDecryptResponse" do
|
108
|
+
optional :plaintext, :bytes, 1
|
109
|
+
end
|
91
110
|
add_message "google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest" do
|
92
111
|
optional :name, :string, 1
|
93
112
|
optional :crypto_key_version_id, :string, 2
|
@@ -98,6 +117,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
98
117
|
add_message "google.cloud.kms.v1.RestoreCryptoKeyVersionRequest" do
|
99
118
|
optional :name, :string, 1
|
100
119
|
end
|
120
|
+
add_message "google.cloud.kms.v1.Digest" do
|
121
|
+
oneof :digest do
|
122
|
+
optional :sha256, :bytes, 1
|
123
|
+
optional :sha384, :bytes, 2
|
124
|
+
optional :sha512, :bytes, 3
|
125
|
+
end
|
126
|
+
end
|
127
|
+
add_message "google.cloud.kms.v1.LocationMetadata" do
|
128
|
+
optional :hsm_available, :bool, 1
|
129
|
+
end
|
101
130
|
end
|
102
131
|
|
103
132
|
module Google
|
@@ -113,6 +142,7 @@ module Google
|
|
113
142
|
GetKeyRingRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.GetKeyRingRequest").msgclass
|
114
143
|
GetCryptoKeyRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.GetCryptoKeyRequest").msgclass
|
115
144
|
GetCryptoKeyVersionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.GetCryptoKeyVersionRequest").msgclass
|
145
|
+
GetPublicKeyRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.GetPublicKeyRequest").msgclass
|
116
146
|
CreateKeyRingRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CreateKeyRingRequest").msgclass
|
117
147
|
CreateCryptoKeyRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CreateCryptoKeyRequest").msgclass
|
118
148
|
CreateCryptoKeyVersionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.CreateCryptoKeyVersionRequest").msgclass
|
@@ -120,11 +150,17 @@ module Google
|
|
120
150
|
UpdateCryptoKeyVersionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.UpdateCryptoKeyVersionRequest").msgclass
|
121
151
|
EncryptRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.EncryptRequest").msgclass
|
122
152
|
DecryptRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.DecryptRequest").msgclass
|
153
|
+
AsymmetricSignRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.AsymmetricSignRequest").msgclass
|
154
|
+
AsymmetricDecryptRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.AsymmetricDecryptRequest").msgclass
|
123
155
|
DecryptResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.DecryptResponse").msgclass
|
124
156
|
EncryptResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.EncryptResponse").msgclass
|
157
|
+
AsymmetricSignResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.AsymmetricSignResponse").msgclass
|
158
|
+
AsymmetricDecryptResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.AsymmetricDecryptResponse").msgclass
|
125
159
|
UpdateCryptoKeyPrimaryVersionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest").msgclass
|
126
160
|
DestroyCryptoKeyVersionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.DestroyCryptoKeyVersionRequest").msgclass
|
127
161
|
RestoreCryptoKeyVersionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.RestoreCryptoKeyVersionRequest").msgclass
|
162
|
+
Digest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.Digest").msgclass
|
163
|
+
LocationMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.kms.v1.LocationMetadata").msgclass
|
128
164
|
end
|
129
165
|
end
|
130
166
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# Source: google/cloud/kms/v1/service.proto for package 'google.cloud.kms.v1'
|
3
3
|
# Original file comments:
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2018 Google LLC.
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -15,6 +15,7 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
+
#
|
18
19
|
|
19
20
|
|
20
21
|
require 'grpc'
|
@@ -33,6 +34,9 @@ module Google
|
|
33
34
|
# * [KeyRing][google.cloud.kms.v1.KeyRing]
|
34
35
|
# * [CryptoKey][google.cloud.kms.v1.CryptoKey]
|
35
36
|
# * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
|
37
|
+
#
|
38
|
+
# If you are using manual gRPC libraries, see
|
39
|
+
# [Using gRPC with Cloud KMS](https://cloud.google.com/kms/docs/grpc).
|
36
40
|
class Service
|
37
41
|
|
38
42
|
include GRPC::GenericService
|
@@ -54,11 +58,18 @@ module Google
|
|
54
58
|
rpc :GetCryptoKey, GetCryptoKeyRequest, CryptoKey
|
55
59
|
# Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
|
56
60
|
rpc :GetCryptoKeyVersion, GetCryptoKeyVersionRequest, CryptoKeyVersion
|
61
|
+
# Returns the public key for the given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The
|
62
|
+
# [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be
|
63
|
+
# [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] or
|
64
|
+
# [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
|
65
|
+
rpc :GetPublicKey, GetPublicKeyRequest, PublicKey
|
57
66
|
# Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.
|
58
67
|
rpc :CreateKeyRing, CreateKeyRingRequest, KeyRing
|
59
68
|
# Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a [KeyRing][google.cloud.kms.v1.KeyRing].
|
60
69
|
#
|
61
|
-
# [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
|
70
|
+
# [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and
|
71
|
+
# [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm]
|
72
|
+
# are required.
|
62
73
|
rpc :CreateCryptoKey, CreateCryptoKeyRequest, CryptoKey
|
63
74
|
# Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a [CryptoKey][google.cloud.kms.v1.CryptoKey].
|
64
75
|
#
|
@@ -77,10 +88,23 @@ module Google
|
|
77
88
|
# move between other states.
|
78
89
|
rpc :UpdateCryptoKeyVersion, UpdateCryptoKeyVersionRequest, CryptoKeyVersion
|
79
90
|
# Encrypts data, so that it can only be recovered by a call to [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
|
91
|
+
# The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be
|
92
|
+
# [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
|
80
93
|
rpc :Encrypt, EncryptRequest, EncryptResponse
|
81
|
-
# Decrypts data that was protected by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
|
94
|
+
# Decrypts data that was protected by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
|
95
|
+
# must be [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
|
82
96
|
rpc :Decrypt, DecryptRequest, DecryptResponse
|
83
|
-
#
|
97
|
+
# Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
|
98
|
+
# ASYMMETRIC_SIGN, producing a signature that can be verified with the public
|
99
|
+
# key retrieved from [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
|
100
|
+
rpc :AsymmetricSign, AsymmetricSignRequest, AsymmetricSignResponse
|
101
|
+
# Decrypts data that was encrypted with a public key retrieved from
|
102
|
+
# [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with
|
103
|
+
# [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_DECRYPT.
|
104
|
+
rpc :AsymmetricDecrypt, AsymmetricDecryptRequest, AsymmetricDecryptResponse
|
105
|
+
# Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
|
106
|
+
#
|
107
|
+
# Returns an error if called on an asymmetric key.
|
84
108
|
rpc :UpdateCryptoKeyPrimaryVersion, UpdateCryptoKeyPrimaryVersionRequest, CryptoKey
|
85
109
|
# Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for destruction.
|
86
110
|
#
|
@@ -96,7 +120,7 @@ module Google
|
|
96
120
|
# [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] may be called to reverse the process.
|
97
121
|
rpc :DestroyCryptoKeyVersion, DestroyCryptoKeyVersionRequest, CryptoKeyVersion
|
98
122
|
# Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the
|
99
|
-
# [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
|
123
|
+
# [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
|
100
124
|
# state.
|
101
125
|
#
|
102
126
|
# Upon restoration of the CryptoKeyVersion, [state][google.cloud.kms.v1.CryptoKeyVersion.state]
|
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: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|
@@ -108,8 +108,8 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.9'
|
111
|
-
description: google-cloud-kms is the official library for
|
112
|
-
|
111
|
+
description: google-cloud-kms is the official library for Cloud Key Management Service
|
112
|
+
(KMS) API.
|
113
113
|
email: googleapis-packages@google.com
|
114
114
|
executables: []
|
115
115
|
extensions: []
|
@@ -128,7 +128,6 @@ files:
|
|
128
128
|
- lib/google/cloud/kms/v1/doc/google/protobuf/duration.rb
|
129
129
|
- lib/google/cloud/kms/v1/doc/google/protobuf/field_mask.rb
|
130
130
|
- lib/google/cloud/kms/v1/doc/google/protobuf/timestamp.rb
|
131
|
-
- lib/google/cloud/kms/v1/doc/overview.rb
|
132
131
|
- lib/google/cloud/kms/v1/key_management_service_client.rb
|
133
132
|
- lib/google/cloud/kms/v1/key_management_service_client_config.json
|
134
133
|
- lib/google/cloud/kms/v1/resources_pb.rb
|
@@ -157,5 +156,5 @@ rubyforge_project:
|
|
157
156
|
rubygems_version: 2.7.7
|
158
157
|
signing_key:
|
159
158
|
specification_version: 4
|
160
|
-
summary: API Client library for
|
159
|
+
summary: API Client library for Cloud Key Management Service (KMS) API
|
161
160
|
test_files: []
|
@@ -1,81 +0,0 @@
|
|
1
|
-
# Copyright 2018 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
module Google
|
17
|
-
module Cloud
|
18
|
-
# rubocop:disable LineLength
|
19
|
-
|
20
|
-
##
|
21
|
-
# # Ruby Client for Google Cloud Key Management Service (KMS) API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
22
|
-
#
|
23
|
-
# [Google Cloud Key Management Service (KMS) API][Product Documentation]:
|
24
|
-
# Manages encryption for your cloud services the same way you do on-premises.
|
25
|
-
# You can generate, use, rotate, and destroy AES256 encryption keys.
|
26
|
-
# - [Product Documentation][]
|
27
|
-
#
|
28
|
-
# ## Quick Start
|
29
|
-
# In order to use this library, you first need to go through the following
|
30
|
-
# steps:
|
31
|
-
#
|
32
|
-
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
33
|
-
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
34
|
-
# 3. [Enable the Google Cloud Key Management Service (KMS) API.](https://console.cloud.google.com/apis/library/cloudkms.googleapis.com)
|
35
|
-
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
36
|
-
#
|
37
|
-
# ### Installation
|
38
|
-
# ```
|
39
|
-
# $ gem install google-cloud-kms
|
40
|
-
# ```
|
41
|
-
#
|
42
|
-
# ### Next Steps
|
43
|
-
# - Read the [Google Cloud Key Management Service (KMS) API Product documentation][Product Documentation]
|
44
|
-
# to learn more about the product and see How-to Guides.
|
45
|
-
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
46
|
-
# to see the full list of Cloud APIs that we cover.
|
47
|
-
#
|
48
|
-
# [Product Documentation]: https://cloud.google.com/kms
|
49
|
-
#
|
50
|
-
# ## Enabling Logging
|
51
|
-
#
|
52
|
-
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
53
|
-
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
54
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
|
55
|
-
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
56
|
-
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
57
|
-
#
|
58
|
-
# Configuring a Ruby stdlib logger:
|
59
|
-
#
|
60
|
-
# ```ruby
|
61
|
-
# require "logger"
|
62
|
-
#
|
63
|
-
# module MyLogger
|
64
|
-
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
65
|
-
# def logger
|
66
|
-
# LOGGER
|
67
|
-
# end
|
68
|
-
# end
|
69
|
-
#
|
70
|
-
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
71
|
-
# module GRPC
|
72
|
-
# extend MyLogger
|
73
|
-
# end
|
74
|
-
# ```
|
75
|
-
#
|
76
|
-
module Kms
|
77
|
-
module V1
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|