resources.proto 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  1. // Copyright 2022 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. // http://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. syntax = "proto3";
  15. package google.cloud.kms.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/duration.proto";
  19. import "google/protobuf/timestamp.proto";
  20. import "google/protobuf/wrappers.proto";
  21. option cc_enable_arenas = true;
  22. option csharp_namespace = "Google.Cloud.Kms.V1";
  23. option go_package = "google.golang.org/genproto/googleapis/cloud/kms/v1;kms";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "KmsResourcesProto";
  26. option java_package = "com.google.cloud.kms.v1";
  27. option php_namespace = "Google\\Cloud\\Kms\\V1";
  28. // A [KeyRing][google.cloud.kms.v1.KeyRing] is a toplevel logical grouping of
  29. // [CryptoKeys][google.cloud.kms.v1.CryptoKey].
  30. message KeyRing {
  31. option (google.api.resource) = {
  32. type: "cloudkms.googleapis.com/KeyRing"
  33. pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}"
  34. };
  35. // Output only. The resource name for the
  36. // [KeyRing][google.cloud.kms.v1.KeyRing] in the format
  37. // `projects/*/locations/*/keyRings/*`.
  38. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  39. // Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing]
  40. // was created.
  41. google.protobuf.Timestamp create_time = 2
  42. [(google.api.field_behavior) = OUTPUT_ONLY];
  43. }
  44. // A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that
  45. // can be used for cryptographic operations.
  46. //
  47. // A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of zero or more
  48. // [versions][google.cloud.kms.v1.CryptoKeyVersion], which represent the actual
  49. // key material used in cryptographic operations.
  50. message CryptoKey {
  51. option (google.api.resource) = {
  52. type: "cloudkms.googleapis.com/CryptoKey"
  53. pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
  54. };
  55. // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose]
  56. // describes the cryptographic capabilities of a
  57. // [CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used
  58. // for the operations allowed by its purpose. For more information, see [Key
  59. // purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
  60. enum CryptoKeyPurpose {
  61. // Not specified.
  62. CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0;
  63. // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
  64. // with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and
  65. // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
  66. ENCRYPT_DECRYPT = 1;
  67. // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
  68. // with
  69. // [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]
  70. // and
  71. // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
  72. ASYMMETRIC_SIGN = 5;
  73. // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
  74. // with
  75. // [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]
  76. // and
  77. // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
  78. ASYMMETRIC_DECRYPT = 6;
  79. // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
  80. // with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
  81. MAC = 9;
  82. }
  83. // Output only. The resource name for this
  84. // [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
  85. // `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
  86. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  87. // Output only. A copy of the "primary"
  88. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
  89. // by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this
  90. // [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in
  91. // [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
  92. //
  93. // The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be
  94. // updated via
  95. // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
  96. //
  97. // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
  98. // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
  99. // may have a primary. For other keys, this field will be omitted.
  100. CryptoKeyVersion primary = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  101. // Immutable. The immutable purpose of this
  102. // [CryptoKey][google.cloud.kms.v1.CryptoKey].
  103. CryptoKeyPurpose purpose = 3 [(google.api.field_behavior) = IMMUTABLE];
  104. // Output only. The time at which this
  105. // [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
  106. google.protobuf.Timestamp create_time = 5
  107. [(google.api.field_behavior) = OUTPUT_ONLY];
  108. // At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time],
  109. // the Key Management Service will automatically:
  110. //
  111. // 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
  112. // 2. Mark the new version as primary.
  113. //
  114. // Key rotations performed manually via
  115. // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
  116. // and
  117. // [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
  118. // do not affect
  119. // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
  120. //
  121. // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
  122. // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
  123. // support automatic rotation. For other keys, this field must be omitted.
  124. google.protobuf.Timestamp next_rotation_time = 7;
  125. // Controls the rate of automatic rotation.
  126. oneof rotation_schedule {
  127. // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
  128. // will be advanced by this period when the service automatically rotates a
  129. // key. Must be at least 24 hours and at most 876,000 hours.
  130. //
  131. // If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is
  132. // set,
  133. // [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]
  134. // must also be set.
  135. //
  136. // Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
  137. // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]
  138. // support automatic rotation. For other keys, this field must be omitted.
  139. google.protobuf.Duration rotation_period = 8;
  140. }
  141. // A template describing settings for new
  142. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The
  143. // properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
  144. // instances created by either
  145. // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
  146. // or auto-rotation are controlled by this template.
  147. CryptoKeyVersionTemplate version_template = 11;
  148. // Labels with user-defined metadata. For more information, see
  149. // [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys).
  150. map<string, string> labels = 10;
  151. // Immutable. Whether this key may contain imported versions only.
  152. bool import_only = 13 [(google.api.field_behavior) = IMMUTABLE];
  153. // Immutable. The period of time that versions of this key spend in the
  154. // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
  155. // state before transitioning to
  156. // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
  157. // If not specified at creation time, the default duration is 24 hours.
  158. google.protobuf.Duration destroy_scheduled_duration = 14
  159. [(google.api.field_behavior) = IMMUTABLE];
  160. // Immutable. The resource name of the backend environment where the key
  161. // material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]
  162. // associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and
  163. // where all related cryptographic operations are performed. Only applicable
  164. // if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a
  165. // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
  166. // [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the
  167. // resource name in the format `projects/*/locations/*/ekmConnections/*`.
  168. // Note, this list is non-exhaustive and may apply to additional
  169. // [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future.
  170. string crypto_key_backend = 15 [
  171. (google.api.field_behavior) = IMMUTABLE,
  172. (google.api.resource_reference) = { type: "*" }
  173. ];
  174. }
  175. // A [CryptoKeyVersionTemplate][google.cloud.kms.v1.CryptoKeyVersionTemplate]
  176. // specifies the properties to use when creating a new
  177. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], either manually
  178. // with
  179. // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
  180. // or automatically as a result of auto-rotation.
  181. message CryptoKeyVersionTemplate {
  182. // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating
  183. // a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
  184. // template. Immutable. Defaults to
  185. // [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
  186. ProtectionLevel protection_level = 1;
  187. // Required.
  188. // [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
  189. // to use when creating a
  190. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this
  191. // template.
  192. //
  193. // For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
  194. // this field is omitted and
  195. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
  196. // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
  197. CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3
  198. [(google.api.field_behavior) = REQUIRED];
  199. }
  200. // Contains an HSM-generated attestation about a key operation. For more
  201. // information, see [Verifying attestations]
  202. // (https://cloud.google.com/kms/docs/attest-key).
  203. message KeyOperationAttestation {
  204. // Attestation formats provided by the HSM.
  205. enum AttestationFormat {
  206. // Not specified.
  207. ATTESTATION_FORMAT_UNSPECIFIED = 0;
  208. // Cavium HSM attestation compressed with gzip. Note that this format is
  209. // defined by Cavium and subject to change at any time.
  210. //
  211. // See
  212. // https://www.marvell.com/products/security-solutions/nitrox-hs-adapters/software-key-attestation.html.
  213. CAVIUM_V1_COMPRESSED = 3;
  214. // Cavium HSM attestation V2 compressed with gzip. This is a new format
  215. // introduced in Cavium's version 3.2-08.
  216. CAVIUM_V2_COMPRESSED = 4;
  217. }
  218. // Certificate chains needed to verify the attestation.
  219. // Certificates in chains are PEM-encoded and are ordered based on
  220. // https://tools.ietf.org/html/rfc5246#section-7.4.2.
  221. message CertificateChains {
  222. // Cavium certificate chain corresponding to the attestation.
  223. repeated string cavium_certs = 1;
  224. // Google card certificate chain corresponding to the attestation.
  225. repeated string google_card_certs = 2;
  226. // Google partition certificate chain corresponding to the attestation.
  227. repeated string google_partition_certs = 3;
  228. }
  229. // Output only. The format of the attestation data.
  230. AttestationFormat format = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  231. // Output only. The attestation data provided by the HSM when the key
  232. // operation was performed.
  233. bytes content = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  234. // Output only. The certificate chains needed to validate the attestation
  235. CertificateChains cert_chains = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  236. }
  237. // A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an
  238. // individual cryptographic key, and the associated key material.
  239. //
  240. // An
  241. // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
  242. // version can be used for cryptographic operations.
  243. //
  244. // For security reasons, the raw cryptographic key material represented by a
  245. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] can never be viewed
  246. // or exported. It can only be used to encrypt, decrypt, or sign data when an
  247. // authorized user or application invokes Cloud KMS.
  248. message CryptoKeyVersion {
  249. option (google.api.resource) = {
  250. type: "cloudkms.googleapis.com/CryptoKeyVersion"
  251. pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}"
  252. };
  253. // The algorithm of the
  254. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what
  255. // parameters must be used for each cryptographic operation.
  256. //
  257. // The
  258. // [GOOGLE_SYMMETRIC_ENCRYPTION][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION]
  259. // algorithm is usable with
  260. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
  261. // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
  262. //
  263. // Algorithms beginning with "RSA_SIGN_" are usable with
  264. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
  265. // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
  266. //
  267. // The fields in the name after "RSA_SIGN_" correspond to the following
  268. // parameters: padding algorithm, modulus bit length, and digest algorithm.
  269. //
  270. // For PSS, the salt length used is equal to the length of digest
  271. // algorithm. For example,
  272. // [RSA_SIGN_PSS_2048_SHA256][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256]
  273. // will use PSS with a salt length of 256 bits or 32 bytes.
  274. //
  275. // Algorithms beginning with "RSA_DECRYPT_" are usable with
  276. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
  277. // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
  278. //
  279. // The fields in the name after "RSA_DECRYPT_" correspond to the following
  280. // parameters: padding algorithm, modulus bit length, and digest algorithm.
  281. //
  282. // Algorithms beginning with "EC_SIGN_" are usable with
  283. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
  284. // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
  285. //
  286. // The fields in the name after "EC_SIGN_" correspond to the following
  287. // parameters: elliptic curve, digest algorithm.
  288. //
  289. // Algorithms beginning with "HMAC_" are usable with
  290. // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
  291. // [MAC][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.MAC].
  292. //
  293. // The suffix following "HMAC_" corresponds to the hash algorithm being used
  294. // (eg. SHA256).
  295. //
  296. // For more information, see [Key purposes and algorithms]
  297. // (https://cloud.google.com/kms/docs/algorithms).
  298. enum CryptoKeyVersionAlgorithm {
  299. // Not specified.
  300. CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0;
  301. // Creates symmetric encryption keys.
  302. GOOGLE_SYMMETRIC_ENCRYPTION = 1;
  303. // RSASSA-PSS 2048 bit key with a SHA256 digest.
  304. RSA_SIGN_PSS_2048_SHA256 = 2;
  305. // RSASSA-PSS 3072 bit key with a SHA256 digest.
  306. RSA_SIGN_PSS_3072_SHA256 = 3;
  307. // RSASSA-PSS 4096 bit key with a SHA256 digest.
  308. RSA_SIGN_PSS_4096_SHA256 = 4;
  309. // RSASSA-PSS 4096 bit key with a SHA512 digest.
  310. RSA_SIGN_PSS_4096_SHA512 = 15;
  311. // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
  312. RSA_SIGN_PKCS1_2048_SHA256 = 5;
  313. // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
  314. RSA_SIGN_PKCS1_3072_SHA256 = 6;
  315. // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
  316. RSA_SIGN_PKCS1_4096_SHA256 = 7;
  317. // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
  318. RSA_SIGN_PKCS1_4096_SHA512 = 16;
  319. // RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
  320. RSA_SIGN_RAW_PKCS1_2048 = 28;
  321. // RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
  322. RSA_SIGN_RAW_PKCS1_3072 = 29;
  323. // RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
  324. RSA_SIGN_RAW_PKCS1_4096 = 30;
  325. // RSAES-OAEP 2048 bit key with a SHA256 digest.
  326. RSA_DECRYPT_OAEP_2048_SHA256 = 8;
  327. // RSAES-OAEP 3072 bit key with a SHA256 digest.
  328. RSA_DECRYPT_OAEP_3072_SHA256 = 9;
  329. // RSAES-OAEP 4096 bit key with a SHA256 digest.
  330. RSA_DECRYPT_OAEP_4096_SHA256 = 10;
  331. // RSAES-OAEP 4096 bit key with a SHA512 digest.
  332. RSA_DECRYPT_OAEP_4096_SHA512 = 17;
  333. // RSAES-OAEP 2048 bit key with a SHA1 digest.
  334. RSA_DECRYPT_OAEP_2048_SHA1 = 37;
  335. // RSAES-OAEP 3072 bit key with a SHA1 digest.
  336. RSA_DECRYPT_OAEP_3072_SHA1 = 38;
  337. // RSAES-OAEP 4096 bit key with a SHA1 digest.
  338. RSA_DECRYPT_OAEP_4096_SHA1 = 39;
  339. // ECDSA on the NIST P-256 curve with a SHA256 digest.
  340. EC_SIGN_P256_SHA256 = 12;
  341. // ECDSA on the NIST P-384 curve with a SHA384 digest.
  342. EC_SIGN_P384_SHA384 = 13;
  343. // ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
  344. // HSM protection level.
  345. EC_SIGN_SECP256K1_SHA256 = 31;
  346. // HMAC-SHA256 signing with a 256 bit key.
  347. HMAC_SHA256 = 32;
  348. // HMAC-SHA1 signing with a 160 bit key.
  349. HMAC_SHA1 = 33;
  350. // HMAC-SHA384 signing with a 384 bit key.
  351. HMAC_SHA384 = 34;
  352. // HMAC-SHA512 signing with a 512 bit key.
  353. HMAC_SHA512 = 35;
  354. // HMAC-SHA224 signing with a 224 bit key.
  355. HMAC_SHA224 = 36;
  356. // Algorithm representing symmetric encryption by an external key manager.
  357. EXTERNAL_SYMMETRIC_ENCRYPTION = 18;
  358. }
  359. // The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion],
  360. // indicating if it can be used.
  361. enum CryptoKeyVersionState {
  362. // Not specified.
  363. CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0;
  364. // This version is still being generated. It may not be used, enabled,
  365. // disabled, or destroyed yet. Cloud KMS will automatically mark this
  366. // version
  367. // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
  368. // as soon as the version is ready.
  369. PENDING_GENERATION = 5;
  370. // This version may be used for cryptographic operations.
  371. ENABLED = 1;
  372. // This version may not be used, but the key material is still available,
  373. // and the version can be placed back into the
  374. // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
  375. // state.
  376. DISABLED = 2;
  377. // This version is destroyed, and the key material is no longer stored.
  378. // This version may only become
  379. // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
  380. // again if this version is
  381. // [reimport_eligible][google.cloud.kms.v1.CryptoKeyVersion.reimport_eligible]
  382. // and the original key material is reimported with a call to
  383. // [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
  384. DESTROYED = 3;
  385. // This version is scheduled for destruction, and will be destroyed soon.
  386. // Call
  387. // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
  388. // to put it back into the
  389. // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED]
  390. // state.
  391. DESTROY_SCHEDULED = 4;
  392. // This version is still being imported. It may not be used, enabled,
  393. // disabled, or destroyed yet. Cloud KMS will automatically mark this
  394. // version
  395. // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]
  396. // as soon as the version is ready.
  397. PENDING_IMPORT = 6;
  398. // This version was not imported successfully. It may not be used, enabled,
  399. // disabled, or destroyed. The submitted key material has been discarded.
  400. // Additional details can be found in
  401. // [CryptoKeyVersion.import_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason].
  402. IMPORT_FAILED = 7;
  403. }
  404. // A view for [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]s.
  405. // Controls the level of detail returned for
  406. // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] in
  407. // [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions]
  408. // and
  409. // [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
  410. enum CryptoKeyVersionView {
  411. // Default view for each
  412. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not
  413. // include the
  414. // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field.
  415. CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0;
  416. // Provides all fields in each
  417. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the
  418. // [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation].
  419. FULL = 1;
  420. }
  421. // Output only. The resource name for this
  422. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
  423. // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
  424. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  425. // The current state of the
  426. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
  427. CryptoKeyVersionState state = 3;
  428. // Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel]
  429. // describing how crypto operations are performed with this
  430. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
  431. ProtectionLevel protection_level = 7
  432. [(google.api.field_behavior) = OUTPUT_ONLY];
  433. // Output only. The
  434. // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
  435. // that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
  436. // supports.
  437. CryptoKeyVersionAlgorithm algorithm = 10
  438. [(google.api.field_behavior) = OUTPUT_ONLY];
  439. // Output only. Statement that was generated and signed by the HSM at key
  440. // creation time. Use this statement to verify attributes of the key as stored
  441. // on the HSM, independently of Google. Only provided for key versions with
  442. // [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level]
  443. // [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
  444. KeyOperationAttestation attestation = 8
  445. [(google.api.field_behavior) = OUTPUT_ONLY];
  446. // Output only. The time at which this
  447. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
  448. google.protobuf.Timestamp create_time = 4
  449. [(google.api.field_behavior) = OUTPUT_ONLY];
  450. // Output only. The time this
  451. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
  452. // generated.
  453. google.protobuf.Timestamp generate_time = 11
  454. [(google.api.field_behavior) = OUTPUT_ONLY];
  455. // Output only. The time this
  456. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is
  457. // scheduled for destruction. Only present if
  458. // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
  459. // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
  460. google.protobuf.Timestamp destroy_time = 5
  461. [(google.api.field_behavior) = OUTPUT_ONLY];
  462. // Output only. The time this CryptoKeyVersion's key material was
  463. // destroyed. Only present if
  464. // [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
  465. // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
  466. google.protobuf.Timestamp destroy_event_time = 6
  467. [(google.api.field_behavior) = OUTPUT_ONLY];
  468. // Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob]
  469. // used in the most recent import of this
  470. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if
  471. // the underlying key material was imported.
  472. string import_job = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  473. // Output only. The time at which this
  474. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
  475. // most recently imported.
  476. google.protobuf.Timestamp import_time = 15
  477. [(google.api.field_behavior) = OUTPUT_ONLY];
  478. // Output only. The root cause of the most recent import failure. Only present
  479. // if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
  480. // [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED].
  481. string import_failure_reason = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
  482. // ExternalProtectionLevelOptions stores a group of additional fields for
  483. // configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
  484. // are specific to the
  485. // [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level
  486. // and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC]
  487. // protection levels.
  488. ExternalProtectionLevelOptions external_protection_level_options = 17;
  489. // Output only. Whether or not this key version is eligible for reimport, by
  490. // being specified as a target in
  491. // [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version].
  492. bool reimport_eligible = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
  493. }
  494. // The public key for a given
  495. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Obtained via
  496. // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
  497. message PublicKey {
  498. option (google.api.resource) = {
  499. type: "cloudkms.googleapis.com/PublicKey"
  500. pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}/publicKey"
  501. };
  502. // The public key, encoded in PEM format. For more information, see the
  503. // [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for
  504. // [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
  505. // [Textual Encoding of Subject Public Key Info]
  506. // (https://tools.ietf.org/html/rfc7468#section-13).
  507. string pem = 1;
  508. // The
  509. // [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
  510. // associated with this key.
  511. CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2;
  512. // Integrity verification field. A CRC32C checksum of the returned
  513. // [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of
  514. // [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by
  515. // computing the CRC32C checksum of
  516. // [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your
  517. // results to this field. Discard the response in case of non-matching
  518. // checksum values, and perform a limited number of retries. A persistent
  519. // mismatch may indicate an issue in your computation of the CRC32C checksum.
  520. // Note: This field is defined as int64 for reasons of compatibility across
  521. // different languages. However, it is a non-negative integer, which will
  522. // never exceed 2^32-1, and can be safely downconverted to uint32 in languages
  523. // that support this type.
  524. //
  525. // NOTE: This field is in Beta.
  526. google.protobuf.Int64Value pem_crc32c = 3;
  527. // The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the
  528. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
  529. // Provided here for verification.
  530. //
  531. // NOTE: This field is in Beta.
  532. string name = 4;
  533. // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
  534. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key.
  535. ProtectionLevel protection_level = 5;
  536. }
  537. // An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create
  538. // [CryptoKeys][google.cloud.kms.v1.CryptoKey] and
  539. // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] using pre-existing
  540. // key material, generated outside of Cloud KMS.
  541. //
  542. // When an [ImportJob][google.cloud.kms.v1.ImportJob] is created, Cloud KMS will
  543. // generate a "wrapping key", which is a public/private key pair. You use the
  544. // wrapping key to encrypt (also known as wrap) the pre-existing key material to
  545. // protect it during the import process. The nature of the wrapping key depends
  546. // on the choice of
  547. // [import_method][google.cloud.kms.v1.ImportJob.import_method]. When the
  548. // wrapping key generation is complete, the
  549. // [state][google.cloud.kms.v1.ImportJob.state] will be set to
  550. // [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] and the
  551. // [public_key][google.cloud.kms.v1.ImportJob.public_key] can be fetched. The
  552. // fetched public key can then be used to wrap your pre-existing key material.
  553. //
  554. // Once the key material is wrapped, it can be imported into a new
  555. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in an existing
  556. // [CryptoKey][google.cloud.kms.v1.CryptoKey] by calling
  557. // [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion].
  558. // Multiple [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] can be
  559. // imported with a single [ImportJob][google.cloud.kms.v1.ImportJob]. Cloud KMS
  560. // uses the private key portion of the wrapping key to unwrap the key material.
  561. // Only Cloud KMS has access to the private key.
  562. //
  563. // An [ImportJob][google.cloud.kms.v1.ImportJob] expires 3 days after it is
  564. // created. Once expired, Cloud KMS will no longer be able to import or unwrap
  565. // any key material that was wrapped with the
  566. // [ImportJob][google.cloud.kms.v1.ImportJob]'s public key.
  567. //
  568. // For more information, see
  569. // [Importing a key](https://cloud.google.com/kms/docs/importing-a-key).
  570. message ImportJob {
  571. option (google.api.resource) = {
  572. type: "cloudkms.googleapis.com/ImportJob"
  573. pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}"
  574. };
  575. // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] describes the
  576. // key wrapping method chosen for this
  577. // [ImportJob][google.cloud.kms.v1.ImportJob].
  578. enum ImportMethod {
  579. // Not specified.
  580. IMPORT_METHOD_UNSPECIFIED = 0;
  581. // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
  582. // scheme defined in the PKCS #11 standard. In summary, this involves
  583. // wrapping the raw key with an ephemeral AES key, and wrapping the
  584. // ephemeral AES key with a 3072 bit RSA key. For more details, see
  585. // [RSA AES key wrap
  586. // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
  587. RSA_OAEP_3072_SHA1_AES_256 = 1;
  588. // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
  589. // scheme defined in the PKCS #11 standard. In summary, this involves
  590. // wrapping the raw key with an ephemeral AES key, and wrapping the
  591. // ephemeral AES key with a 4096 bit RSA key. For more details, see
  592. // [RSA AES key wrap
  593. // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
  594. RSA_OAEP_4096_SHA1_AES_256 = 2;
  595. // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
  596. // scheme defined in the PKCS #11 standard. In summary, this involves
  597. // wrapping the raw key with an ephemeral AES key, and wrapping the
  598. // ephemeral AES key with a 3072 bit RSA key. For more details, see
  599. // [RSA AES key wrap
  600. // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
  601. RSA_OAEP_3072_SHA256_AES_256 = 3;
  602. // This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping
  603. // scheme defined in the PKCS #11 standard. In summary, this involves
  604. // wrapping the raw key with an ephemeral AES key, and wrapping the
  605. // ephemeral AES key with a 4096 bit RSA key. For more details, see
  606. // [RSA AES key wrap
  607. // mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908).
  608. RSA_OAEP_4096_SHA256_AES_256 = 4;
  609. // This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The
  610. // key material to be imported is wrapped directly with the RSA key. Due
  611. // to technical limitations of RSA wrapping, this method cannot be used to
  612. // wrap RSA keys for import.
  613. RSA_OAEP_3072_SHA256 = 5;
  614. // This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The
  615. // key material to be imported is wrapped directly with the RSA key. Due
  616. // to technical limitations of RSA wrapping, this method cannot be used to
  617. // wrap RSA keys for import.
  618. RSA_OAEP_4096_SHA256 = 6;
  619. }
  620. // The state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if
  621. // it can be used.
  622. enum ImportJobState {
  623. // Not specified.
  624. IMPORT_JOB_STATE_UNSPECIFIED = 0;
  625. // The wrapping key for this job is still being generated. It may not be
  626. // used. Cloud KMS will automatically mark this job as
  627. // [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as
  628. // the wrapping key is generated.
  629. PENDING_GENERATION = 1;
  630. // This job may be used in
  631. // [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey]
  632. // and
  633. // [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion]
  634. // requests.
  635. ACTIVE = 2;
  636. // This job can no longer be used and may not leave this state once entered.
  637. EXPIRED = 3;
  638. }
  639. // The public key component of the wrapping key. For details of the type of
  640. // key this public key corresponds to, see the
  641. // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod].
  642. message WrappingPublicKey {
  643. // The public key, encoded in PEM format. For more information, see the [RFC
  644. // 7468](https://tools.ietf.org/html/rfc7468) sections for [General
  645. // Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
  646. // [Textual Encoding of Subject Public Key Info]
  647. // (https://tools.ietf.org/html/rfc7468#section-13).
  648. string pem = 1;
  649. }
  650. // Output only. The resource name for this
  651. // [ImportJob][google.cloud.kms.v1.ImportJob] in the format
  652. // `projects/*/locations/*/keyRings/*/importJobs/*`.
  653. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  654. // Required. Immutable. The wrapping method to be used for incoming key
  655. // material.
  656. ImportMethod import_method = 2 [
  657. (google.api.field_behavior) = REQUIRED,
  658. (google.api.field_behavior) = IMMUTABLE
  659. ];
  660. // Required. Immutable. The protection level of the
  661. // [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the
  662. // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]
  663. // of the [version_template][google.cloud.kms.v1.CryptoKey.version_template]
  664. // on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import
  665. // into.
  666. ProtectionLevel protection_level = 9 [
  667. (google.api.field_behavior) = REQUIRED,
  668. (google.api.field_behavior) = IMMUTABLE
  669. ];
  670. // Output only. The time at which this
  671. // [ImportJob][google.cloud.kms.v1.ImportJob] was created.
  672. google.protobuf.Timestamp create_time = 3
  673. [(google.api.field_behavior) = OUTPUT_ONLY];
  674. // Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key
  675. // material was generated.
  676. google.protobuf.Timestamp generate_time = 4
  677. [(google.api.field_behavior) = OUTPUT_ONLY];
  678. // Output only. The time at which this
  679. // [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and
  680. // can no longer be used to import key material.
  681. google.protobuf.Timestamp expire_time = 5
  682. [(google.api.field_behavior) = OUTPUT_ONLY];
  683. // Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]
  684. // expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is
  685. // [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
  686. google.protobuf.Timestamp expire_event_time = 10
  687. [(google.api.field_behavior) = OUTPUT_ONLY];
  688. // Output only. The current state of the
  689. // [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
  690. ImportJobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  691. // Output only. The public key with which to wrap key material prior to
  692. // import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is
  693. // [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
  694. WrappingPublicKey public_key = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  695. // Output only. Statement that was generated and signed by the key creator
  696. // (for example, an HSM) at key creation time. Use this statement to verify
  697. // attributes of the key as stored on the HSM, independently of Google.
  698. // Only present if the chosen
  699. // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a
  700. // protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
  701. KeyOperationAttestation attestation = 8
  702. [(google.api.field_behavior) = OUTPUT_ONLY];
  703. }
  704. // ExternalProtectionLevelOptions stores a group of additional fields for
  705. // configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that
  706. // are specific to the [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL]
  707. // protection level and
  708. // [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] protection
  709. // levels.
  710. message ExternalProtectionLevelOptions {
  711. // The URI for an external resource that this
  712. // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents.
  713. string external_key_uri = 1;
  714. // The path to the external key material on the EKM when using
  715. // [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set
  716. // this field instead of external_key_uri when using an
  717. // [EkmConnection][google.cloud.kms.v1.EkmConnection].
  718. string ekm_connection_key_path = 2;
  719. }
  720. // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] specifies how
  721. // cryptographic operations are performed. For more information, see [Protection
  722. // levels] (https://cloud.google.com/kms/docs/algorithms#protection_levels).
  723. enum ProtectionLevel {
  724. // Not specified.
  725. PROTECTION_LEVEL_UNSPECIFIED = 0;
  726. // Crypto operations are performed in software.
  727. SOFTWARE = 1;
  728. // Crypto operations are performed in a Hardware Security Module.
  729. HSM = 2;
  730. // Crypto operations are performed by an external key manager.
  731. EXTERNAL = 3;
  732. // Crypto operations are performed in an EKM-over-VPC backend.
  733. EXTERNAL_VPC = 4;
  734. }