Package google.cloud.kms.v1

Index

EkmService

Google Cloud Key Management EKM Service

Manages external cryptographic keys and operations using those keys. Implements a REST model with the following objects: * EkmConnection

CreateEkmConnection

rpc CreateEkmConnection(CreateEkmConnectionRequest) returns (EkmConnection)

Creates a new EkmConnection in a given Project and Location.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetEkmConfig

rpc GetEkmConfig(GetEkmConfigRequest) returns (EkmConfig)

Returns the EkmConfig singleton resource for a given project and location.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetEkmConnection

rpc GetEkmConnection(GetEkmConnectionRequest) returns (EkmConnection)

Returns metadata for a given EkmConnection.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListEkmConnections

rpc ListEkmConnections(ListEkmConnectionsRequest) returns (ListEkmConnectionsResponse)

Lists EkmConnections.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateEkmConfig

rpc UpdateEkmConfig(UpdateEkmConfigRequest) returns (EkmConfig)

Updates the EkmConfig singleton resource for a given project and location.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateEkmConnection

rpc UpdateEkmConnection(UpdateEkmConnectionRequest) returns (EkmConnection)

Updates an EkmConnection's metadata.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

VerifyConnectivity

rpc VerifyConnectivity(VerifyConnectivityRequest) returns (VerifyConnectivityResponse)

Verifies that Cloud KMS can successfully connect to the external key manager specified by an EkmConnection. If there is an error connecting to the EKM, this method returns a FAILED_PRECONDITION status containing structured information as described at https://cloud.google.com/kms/docs/reference/ekm_errors.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

KeyManagementService

Google Cloud Key Management Service

Manages cryptographic keys and operations using those keys. Implements a REST model with the following objects:

If you are using manual gRPC libraries, see Using gRPC with Cloud KMS.

AsymmetricDecrypt

rpc AsymmetricDecrypt(AsymmetricDecryptRequest) returns (AsymmetricDecryptResponse)

Decrypts data that was encrypted with a public key retrieved from GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

AsymmetricSign

rpc AsymmetricSign(AsymmetricSignRequest) returns (AsymmetricSignResponse)

Signs data using a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from GetPublicKey.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CreateCryptoKey

rpc CreateCryptoKey(CreateCryptoKeyRequest) returns (CryptoKey)

Create a new CryptoKey within a KeyRing.

CryptoKey.purpose and CryptoKey.version_template.algorithm are required.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CreateCryptoKeyVersion

rpc CreateCryptoKeyVersion(CreateCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Create a new CryptoKeyVersion in a CryptoKey.

The server will assign the next sequential id. If unset, state will be set to ENABLED.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CreateImportJob

rpc CreateImportJob(CreateImportJobRequest) returns (ImportJob)

Create a new ImportJob within a KeyRing.

ImportJob.import_method is required.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CreateKeyRing

rpc CreateKeyRing(CreateKeyRingRequest) returns (KeyRing)

Create a new KeyRing in a given Project and Location.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Decrypt

rpc Decrypt(DecryptRequest) returns (DecryptResponse)

Decrypts data that was protected by Encrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DestroyCryptoKeyVersion

rpc DestroyCryptoKeyVersion(DestroyCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Schedule a CryptoKeyVersion for destruction.

Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED, and destroy_time will be set to the time destroy_scheduled_duration in the future. At that time, the state will automatically change to DESTROYED, and the key material will be irrevocably destroyed.

Before the destroy_time is reached, RestoreCryptoKeyVersion may be called to reverse the process.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Encrypt

rpc Encrypt(EncryptRequest) returns (EncryptResponse)

Encrypts data, so that it can only be recovered by a call to Decrypt. The CryptoKey.purpose must be ENCRYPT_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GenerateRandomBytes

rpc GenerateRandomBytes(GenerateRandomBytesRequest) returns (GenerateRandomBytesResponse)

Generate random bytes using the Cloud KMS randomness source in the provided location.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetCryptoKey

rpc GetCryptoKey(GetCryptoKeyRequest) returns (CryptoKey)

Returns metadata for a given CryptoKey, as well as its primary CryptoKeyVersion.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetCryptoKeyVersion

rpc GetCryptoKeyVersion(GetCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Returns metadata for a given CryptoKeyVersion.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetImportJob

rpc GetImportJob(GetImportJobRequest) returns (ImportJob)

Returns metadata for a given ImportJob.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetKeyRing

rpc GetKeyRing(GetKeyRingRequest) returns (KeyRing)

Returns metadata for a given KeyRing.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetPublicKey

rpc GetPublicKey(GetPublicKeyRequest) returns (PublicKey)

Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ImportCryptoKeyVersion

rpc ImportCryptoKeyVersion(ImportCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Import wrapped key material into a CryptoKeyVersion.

All requests must specify a CryptoKey. If a CryptoKeyVersion is additionally specified in the request, key material will be reimported into that version. Otherwise, a new version will be created, and will be assigned the next sequential id within the CryptoKey.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListCryptoKeyVersions

rpc ListCryptoKeyVersions(ListCryptoKeyVersionsRequest) returns (ListCryptoKeyVersionsResponse)

Lists CryptoKeyVersions.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListCryptoKeys

rpc ListCryptoKeys(ListCryptoKeysRequest) returns (ListCryptoKeysResponse)

Lists CryptoKeys.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListImportJobs

rpc ListImportJobs(ListImportJobsRequest) returns (ListImportJobsResponse)

Lists ImportJobs.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListKeyRings

rpc ListKeyRings(ListKeyRingsRequest) returns (ListKeyRingsResponse)

Lists KeyRings.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

MacSign

rpc MacSign(MacSignRequest) returns (MacSignResponse)

Signs data using a CryptoKeyVersion with CryptoKey.purpose MAC, producing a tag that can be verified by another source with the same key.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

MacVerify

rpc MacVerify(MacVerifyRequest) returns (MacVerifyResponse)

Verifies MAC tag using a CryptoKeyVersion with CryptoKey.purpose MAC, and returns a response that indicates whether or not the verification was successful.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

RestoreCryptoKeyVersion

rpc RestoreCryptoKeyVersion(RestoreCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state.

Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will be cleared.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateCryptoKey

rpc UpdateCryptoKey(UpdateCryptoKeyRequest) returns (CryptoKey)

Update a CryptoKey.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateCryptoKeyPrimaryVersion

rpc UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest) returns (CryptoKey)

Update the version of a CryptoKey that will be used in Encrypt.

Returns an error if called on a key whose purpose is not ENCRYPT_DECRYPT.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateCryptoKeyVersion

rpc UpdateCryptoKeyVersion(UpdateCryptoKeyVersionRequest) returns (CryptoKeyVersion)

Update a CryptoKeyVersion's metadata.

state may be changed between ENABLED and DISABLED using this method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to move between other states.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudkms
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

AsymmetricDecryptRequest

Request message for KeyManagementService.AsymmetricDecrypt.

Fields
name

string

Required. The resource name of the CryptoKeyVersion to use for decryption.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.useToDecrypt
ciphertext

bytes

Required. The data encrypted with the named CryptoKeyVersion's public key using OAEP.

ciphertext_crc32c

Int64Value

Optional. An optional CRC32C checksum of the AsymmetricDecryptRequest.ciphertext. If specified, KeyManagementService will verify the integrity of the received AsymmetricDecryptRequest.ciphertext using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(AsymmetricDecryptRequest.ciphertext) is equal to AsymmetricDecryptRequest.ciphertext_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

AsymmetricDecryptResponse

Response message for KeyManagementService.AsymmetricDecrypt.

Fields
plaintext

bytes

The decrypted data originally encrypted with the matching public key.

plaintext_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returned AsymmetricDecryptResponse.plaintext. An integrity check of AsymmetricDecryptResponse.plaintext can be performed by computing the CRC32C checksum of AsymmetricDecryptResponse.plaintext and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

verified_ciphertext_crc32c

bool

Integrity verification field. A flag indicating whether AsymmetricDecryptRequest.ciphertext_crc32c was received by KeyManagementService and used for the integrity verification of the ciphertext. A false value of this field indicates either that AsymmetricDecryptRequest.ciphertext_crc32c was left unset or that it was not delivered to KeyManagementService. If you've set AsymmetricDecryptRequest.ciphertext_crc32c but this field is still false, discard the response and perform a limited number of retries.

protection_level

ProtectionLevel

The ProtectionLevel of the CryptoKeyVersion used in decryption.

AsymmetricSignRequest

Request message for KeyManagementService.AsymmetricSign.

Fields
name

string

Required. The resource name of the CryptoKeyVersion to use for signing.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.useToSign
digest

Digest

Optional. The digest of the data to sign. The digest must be produced with the same digest algorithm as specified by the key version's algorithm.

This field may not be supplied if AsymmetricSignRequest.data is supplied.

digest_crc32c

Int64Value

Optional. An optional CRC32C checksum of the AsymmetricSignRequest.digest. If specified, KeyManagementService will verify the integrity of the received AsymmetricSignRequest.digest using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(AsymmetricSignRequest.digest) is equal to AsymmetricSignRequest.digest_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

data

bytes

Optional. The data to sign. It can't be supplied if AsymmetricSignRequest.digest is supplied.

data_crc32c

Int64Value

Optional. An optional CRC32C checksum of the AsymmetricSignRequest.data. If specified, KeyManagementService will verify the integrity of the received AsymmetricSignRequest.data using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(AsymmetricSignRequest.data) is equal to AsymmetricSignRequest.data_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

AsymmetricSignResponse

Response message for KeyManagementService.AsymmetricSign.

Fields
signature

bytes

The created signature.

signature_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returned AsymmetricSignResponse.signature. An integrity check of AsymmetricSignResponse.signature can be performed by computing the CRC32C checksum of AsymmetricSignResponse.signature and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

verified_digest_crc32c

bool

Integrity verification field. A flag indicating whether AsymmetricSignRequest.digest_crc32c was received by KeyManagementService and used for the integrity verification of the digest. A false value of this field indicates either that AsymmetricSignRequest.digest_crc32c was left unset or that it was not delivered to KeyManagementService. If you've set AsymmetricSignRequest.digest_crc32c but this field is still false, discard the response and perform a limited number of retries.

name

string

The resource name of the CryptoKeyVersion used for signing. Check this field to verify that the intended resource was used for signing.

verified_data_crc32c

bool

Integrity verification field. A flag indicating whether AsymmetricSignRequest.data_crc32c was received by KeyManagementService and used for the integrity verification of the data. A false value of this field indicates either that AsymmetricSignRequest.data_crc32c was left unset or that it was not delivered to KeyManagementService. If you've set AsymmetricSignRequest.data_crc32c but this field is still false, discard the response and perform a limited number of retries.

protection_level

ProtectionLevel

The ProtectionLevel of the CryptoKeyVersion used for signing.

Certificate

A Certificate represents an X.509 certificate used to authenticate HTTPS connections to EKM replicas.

Fields
raw_der

bytes

Required. The raw certificate bytes in DER format.

parsed

bool

Output only. True if the certificate was parsed successfully.

issuer

string

Output only. The issuer distinguished name in RFC 2253 format. Only present if parsed is true.

subject

string

Output only. The subject distinguished name in RFC 2253 format. Only present if parsed is true.

subject_alternative_dns_names[]

string

Output only. The subject Alternative DNS names. Only present if parsed is true.

not_before_time

Timestamp

Output only. The certificate is not valid before this time. Only present if parsed is true.

not_after_time

Timestamp

Output only. The certificate is not valid after this time. Only present if parsed is true.

serial_number

string

Output only. The certificate serial number as a hex string. Only present if parsed is true.

sha256_fingerprint

string

Output only. The SHA-256 certificate fingerprint as a hex string. Only present if parsed is true.

CreateCryptoKeyRequest

Request message for KeyManagementService.CreateCryptoKey.

Fields
parent

string

Required. The name of the KeyRing associated with the CryptoKeys.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.cryptoKeys.create
crypto_key_id

string

Required. It must be unique within a KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63}

crypto_key

CryptoKey

Required. A CryptoKey with initial field values.

skip_initial_version_creation

bool

If set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must manually call CreateCryptoKeyVersion or ImportCryptoKeyVersion before you can use this CryptoKey.

CreateCryptoKeyVersionRequest

Request message for KeyManagementService.CreateCryptoKeyVersion.

Fields
parent

string

Required. The name of the CryptoKey associated with the CryptoKeyVersions.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.cryptoKeyVersions.create
crypto_key_version

CryptoKeyVersion

Required. A CryptoKeyVersion with initial field values.

CreateEkmConnectionRequest

Request message for EkmService.CreateEkmConnection.

Fields
parent

string

Required. The resource name of the location associated with the EkmConnection, in the format projects/*/locations/*.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.ekmConnections.create
ekm_connection_id

string

Required. It must be unique within a location and match the regular expression [a-zA-Z0-9_-]{1,63}.

ekm_connection

EkmConnection

Required. An EkmConnection with initial field values.

CreateImportJobRequest

Request message for KeyManagementService.CreateImportJob.

Fields
parent

string

Required. The name of the KeyRing associated with the ImportJobs.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.importJobs.create
import_job_id

string

Required. It must be unique within a KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63}

import_job

ImportJob

Required. An ImportJob with initial field values.

CreateKeyRingRequest

Request message for KeyManagementService.CreateKeyRing.

Fields
parent

string

Required. The resource name of the location associated with the KeyRings, in the format projects/*/locations/*.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.keyRings.create
key_ring_id

string

Required. It must be unique within a location and match the regular expression [a-zA-Z0-9_-]{1,63}

key_ring

KeyRing

Required. A KeyRing with initial field values.

CryptoKey

A CryptoKey represents a logical key that can be used for cryptographic operations.

A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.

Fields
name

string

Output only. The resource name for this CryptoKey in the format projects/*/locations/*/keyRings/*/cryptoKeys/*.

primary

CryptoKeyVersion

Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this CryptoKey is given in EncryptRequest.name.

The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion.

Keys with purpose ENCRYPT_DECRYPT may have a primary. For other keys, this field will be omitted.

purpose

CryptoKeyPurpose

Immutable. The immutable purpose of this CryptoKey.

create_time

Timestamp

Output only. The time at which this CryptoKey was created.

next_rotation_time

Timestamp

At next_rotation_time, the Key Management Service will automatically:

  1. Create a new version of this CryptoKey.
  2. Mark the new version as primary.

Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect next_rotation_time.

Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.

version_template

CryptoKeyVersionTemplate

A template describing settings for new CryptoKeyVersion instances. The properties of new CryptoKeyVersion instances created by either CreateCryptoKeyVersion or auto-rotation are controlled by this template.

labels

map<string, string>

Labels with user-defined metadata. For more information, see Labeling Keys.

import_only

bool

Immutable. Whether this key may contain imported versions only.

destroy_scheduled_duration

Duration

Immutable. The period of time that versions of this key spend in the DESTROY_SCHEDULED state before transitioning to DESTROYED. If not specified at creation time, the default duration is 24 hours.

crypto_key_backend

string

Immutable. The resource name of the backend environment where the key material for all CryptoKeyVersions associated with this CryptoKey reside and where all related cryptographic operations are performed. Only applicable if CryptoKeyVersions have a ProtectionLevel of [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the resource name in the format projects/*/locations/*/ekmConnections/*. Note, this list is non-exhaustive and may apply to additional ProtectionLevels in the future.

Union field rotation_schedule. Controls the rate of automatic rotation. rotation_schedule can be only one of the following:
rotation_period

Duration

next_rotation_time will be advanced by this period when the service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours.

If rotation_period is set, next_rotation_time must also be set.

Keys with purpose ENCRYPT_DECRYPT support automatic rotation. For other keys, this field must be omitted.

CryptoKeyPurpose

CryptoKeyPurpose describes the cryptographic capabilities of a CryptoKey. A given key can only be used for the operations allowed by its purpose. For more information, see Key purposes.

Enums
CRYPTO_KEY_PURPOSE_UNSPECIFIED Not specified.
ENCRYPT_DECRYPT CryptoKeys with this purpose may be used with Encrypt and Decrypt.
ASYMMETRIC_SIGN CryptoKeys with this purpose may be used with AsymmetricSign and GetPublicKey.
ASYMMETRIC_DECRYPT CryptoKeys with this purpose may be used with AsymmetricDecrypt and GetPublicKey.
MAC CryptoKeys with this purpose may be used with MacSign.

CryptoKeyVersion

A CryptoKeyVersion represents an individual cryptographic key, and the associated key material.

An ENABLED version can be used for cryptographic operations.

For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.

Fields
name

string

Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.

state

CryptoKeyVersionState

The current state of the CryptoKeyVersion.

protection_level

ProtectionLevel

Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.

algorithm

CryptoKeyVersionAlgorithm

Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.

attestation

KeyOperationAttestation

Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

create_time

Timestamp

Output only. The time at which this CryptoKeyVersion was created.

generate_time

Timestamp

Output only. The time this CryptoKeyVersion's key material was generated.

destroy_time

Timestamp

Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

destroy_event_time

Timestamp

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

import_job

string

Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.

import_time

Timestamp

Output only. The time at which this CryptoKeyVersion's key material was most recently imported.

import_failure_reason

string

Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.

generation_failure_reason

string

Output only. The root cause of the most recent generation failure. Only present if state is GENERATION_FAILED.

external_destruction_failure_reason

string

Output only. The root cause of the most recent external destruction failure. Only present if state is EXTERNAL_DESTRUCTION_FAILED.

external_protection_level_options

ExternalProtectionLevelOptions

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

reimport_eligible

bool

Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.

CryptoKeyVersionAlgorithm

The algorithm of the CryptoKeyVersion, indicating what parameters must be used for each cryptographic operation.

The GOOGLE_SYMMETRIC_ENCRYPTION algorithm is usable with CryptoKey.purpose ENCRYPT_DECRYPT.

Algorithms beginning with "RSA_SIGN_" are usable with CryptoKey.purpose ASYMMETRIC_SIGN.

The fields in the name after "RSA_SIGN_" correspond to the following parameters: padding algorithm, modulus bit length, and digest algorithm.

For PSS, the salt length used is equal to the length of digest algorithm. For example, RSA_SIGN_PSS_2048_SHA256 will use PSS with a salt length of 256 bits or 32 bytes.

Algorithms beginning with "RSA_DECRYPT_" are usable with CryptoKey.purpose ASYMMETRIC_DECRYPT.

The fields in the name after "RSA_DECRYPT_" correspond to the following parameters: padding algorithm, modulus bit length, and digest algorithm.

Algorithms beginning with "EC_SIGN_" are usable with CryptoKey.purpose ASYMMETRIC_SIGN.

The fields in the name after "EC_SIGN_" correspond to the following parameters: elliptic curve, digest algorithm.

Algorithms beginning with "HMAC_" are usable with CryptoKey.purpose MAC.

The suffix following "HMAC_" corresponds to the hash algorithm being used (eg. SHA256).

For more information, see Key purposes and algorithms.

Enums
CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED Not specified.
GOOGLE_SYMMETRIC_ENCRYPTION Creates symmetric encryption keys.
RSA_SIGN_PSS_2048_SHA256 RSASSA-PSS 2048 bit key with a SHA256 digest.
RSA_SIGN_PSS_3072_SHA256 RSASSA-PSS 3072 bit key with a SHA256 digest.
RSA_SIGN_PSS_4096_SHA256 RSASSA-PSS 4096 bit key with a SHA256 digest.
RSA_SIGN_PSS_4096_SHA512 RSASSA-PSS 4096 bit key with a SHA512 digest.
RSA_SIGN_PKCS1_2048_SHA256 RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_3072_SHA256 RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_4096_SHA256 RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
RSA_SIGN_PKCS1_4096_SHA512 RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
RSA_SIGN_RAW_PKCS1_2048 RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
RSA_SIGN_RAW_PKCS1_3072 RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
RSA_SIGN_RAW_PKCS1_4096 RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
RSA_DECRYPT_OAEP_2048_SHA256 RSAES-OAEP 2048 bit key with a SHA256 digest.
RSA_DECRYPT_OAEP_3072_SHA256 RSAES-OAEP 3072 bit key with a SHA256 digest.
RSA_DECRYPT_OAEP_4096_SHA256 RSAES-OAEP 4096 bit key with a SHA256 digest.
RSA_DECRYPT_OAEP_4096_SHA512 RSAES-OAEP 4096 bit key with a SHA512 digest.
RSA_DECRYPT_OAEP_2048_SHA1 RSAES-OAEP 2048 bit key with a SHA1 digest.
RSA_DECRYPT_OAEP_3072_SHA1 RSAES-OAEP 3072 bit key with a SHA1 digest.
RSA_DECRYPT_OAEP_4096_SHA1 RSAES-OAEP 4096 bit key with a SHA1 digest.
EC_SIGN_P256_SHA256 ECDSA on the NIST P-256 curve with a SHA256 digest. Other hash functions can also be used: https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
EC_SIGN_P384_SHA384 ECDSA on the NIST P-384 curve with a SHA384 digest. Other hash functions can also be used: https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
EC_SIGN_SECP256K1_SHA256 ECDSA on the non-NIST secp256k1 curve. This curve is only supported for HSM protection level. Other hash functions can also be used: https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
HMAC_SHA256 HMAC-SHA256 signing with a 256 bit key.
HMAC_SHA1 HMAC-SHA1 signing with a 160 bit key.
HMAC_SHA384 HMAC-SHA384 signing with a 384 bit key.
HMAC_SHA512 HMAC-SHA512 signing with a 512 bit key.
HMAC_SHA224 HMAC-SHA224 signing with a 224 bit key.
EXTERNAL_SYMMETRIC_ENCRYPTION Algorithm representing symmetric encryption by an external key manager.

CryptoKeyVersionState

The state of a CryptoKeyVersion, indicating if it can be used.

Enums
CRYPTO_KEY_VERSION_STATE_UNSPECIFIED Not specified.
PENDING_GENERATION This version is still being generated. It may not be used, enabled, disabled, or destroyed yet. Cloud KMS will automatically mark this version ENABLED as soon as the version is ready.
ENABLED This version may be used for cryptographic operations.
DISABLED This version may not be used, but the key material is still available, and the version can be placed back into the ENABLED state.
DESTROYED This version is destroyed, and the key material is no longer stored. This version may only become ENABLED again if this version is reimport_eligible and the original key material is reimported with a call to KeyManagementService.ImportCryptoKeyVersion.
DESTROY_SCHEDULED This version is scheduled for destruction, and will be destroyed soon. Call RestoreCryptoKeyVersion to put it back into the DISABLED state.
PENDING_IMPORT This version is still being imported. It may not be used, enabled, disabled, or destroyed yet. Cloud KMS will automatically mark this version ENABLED as soon as the version is ready.
IMPORT_FAILED This version was not imported successfully. It may not be used, enabled, disabled, or destroyed. The submitted key material has been discarded. Additional details can be found in CryptoKeyVersion.import_failure_reason.
GENERATION_FAILED This version was not generated successfully. It may not be used, enabled, disabled, or destroyed. Additional details can be found in CryptoKeyVersion.generation_failure_reason.
PENDING_EXTERNAL_DESTRUCTION This version was destroyed, and it may not be used or enabled again. Cloud KMS is waiting for the corresponding key material residing in an external key manager to be destroyed.
EXTERNAL_DESTRUCTION_FAILED This version was destroyed, and it may not be used or enabled again. However, Cloud KMS could not confirm that the corresponding key material residing in an external key manager was destroyed. Additional details can be found in CryptoKeyVersion.external_destruction_failure_reason.

CryptoKeyVersionView

A view for CryptoKeyVersions. Controls the level of detail returned for CryptoKeyVersions in KeyManagementService.ListCryptoKeyVersions and KeyManagementService.ListCryptoKeys.

Enums
CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED Default view for each CryptoKeyVersion. Does not include the attestation field.
FULL Provides all fields in each CryptoKeyVersion, including the attestation.

CryptoKeyVersionTemplate

A CryptoKeyVersionTemplate specifies the properties to use when creating a new CryptoKeyVersion, either manually with CreateCryptoKeyVersion or automatically as a result of auto-rotation.

Fields
protection_level

ProtectionLevel

ProtectionLevel to use when creating a CryptoKeyVersion based on this template. Immutable. Defaults to SOFTWARE.

algorithm

CryptoKeyVersionAlgorithm

Required. Algorithm to use when creating a CryptoKeyVersion based on this template.

For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both this field is omitted and CryptoKey.purpose is ENCRYPT_DECRYPT.

DecryptRequest

Request message for KeyManagementService.Decrypt.

Fields
name

string

Required. The resource name of the CryptoKey to use for decryption. The server will choose the appropriate version.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.useToDecrypt
ciphertext

bytes

Required. The encrypted data originally returned in EncryptResponse.ciphertext.

additional_authenticated_data

bytes

Optional. Optional data that must match the data originally supplied in EncryptRequest.additional_authenticated_data.

ciphertext_crc32c

Int64Value

Optional. An optional CRC32C checksum of the DecryptRequest.ciphertext. If specified, KeyManagementService will verify the integrity of the received DecryptRequest.ciphertext using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(DecryptRequest.ciphertext) is equal to DecryptRequest.ciphertext_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

additional_authenticated_data_crc32c

Int64Value

Optional. An optional CRC32C checksum of the DecryptRequest.additional_authenticated_data. If specified, KeyManagementService will verify the integrity of the received DecryptRequest.additional_authenticated_data using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(DecryptRequest.additional_authenticated_data) is equal to DecryptRequest.additional_authenticated_data_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

DecryptResponse

Response message for KeyManagementService.Decrypt.

Fields
plaintext

bytes

The decrypted data originally supplied in EncryptRequest.plaintext.

plaintext_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returned DecryptResponse.plaintext. An integrity check of DecryptResponse.plaintext can be performed by computing the CRC32C checksum of DecryptResponse.plaintext and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: receiving this response message indicates that KeyManagementService is able to successfully decrypt the ciphertext. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

used_primary

bool

Whether the Decryption was performed using the primary key version.

protection_level

ProtectionLevel

The ProtectionLevel of the CryptoKeyVersion used in decryption.

DestroyCryptoKeyVersionRequest

Request message for KeyManagementService.DestroyCryptoKeyVersion.

Fields
name

string

Required. The resource name of the CryptoKeyVersion to destroy.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.destroy

Digest

A Digest holds a cryptographic message digest.

Fields
Union field digest. Required. The message digest. digest can be only one of the following:
sha256

bytes

A message digest produced with the SHA-256 algorithm.

sha384

bytes

A message digest produced with the SHA-384 algorithm.

sha512

bytes

A message digest produced with the SHA-512 algorithm.

EkmConfig

An EkmConfig is a singleton resource that represents configuration parameters that apply to all CryptoKeys and CryptoKeyVersions with a ProtectionLevel of [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC] in a given project and location.

Fields
name

string

Output only. The resource name for the EkmConfig in the format projects/*/locations/*/ekmConfig.

default_ekm_connection

string

Optional. Resource name of the default EkmConnection. Setting this field to the empty string removes the default.

EkmConnection

An EkmConnection represents an individual EKM connection. It can be used for creating CryptoKeys and CryptoKeyVersions with a ProtectionLevel of [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], as well as performing cryptographic operations using keys created within the EkmConnection.

Fields
name

string

Output only. The resource name for the EkmConnection in the format projects/*/locations/*/ekmConnections/*.

create_time

Timestamp

Output only. The time at which the EkmConnection was created.

service_resolvers[]

ServiceResolver

A list of ServiceResolvers where the EKM can be reached. There should be one ServiceResolver per EKM replica. Currently, only a single ServiceResolver is supported.

etag

string

Optional. Etag of the currently stored EkmConnection.

key_management_mode

KeyManagementMode

Optional. Describes who can perform control plane operations on the EKM. If unset, this defaults to MANUAL.

crypto_space_path

string

Optional. Identifies the EKM Crypto Space that this EkmConnection maps to. Note: This field is required if KeyManagementMode is CLOUD_KMS.

KeyManagementMode

KeyManagementMode describes who can perform control plane cryptographic operations using this EkmConnection.

Enums
KEY_MANAGEMENT_MODE_UNSPECIFIED Not specified.
MANUAL EKM-side key management operations on CryptoKeys created with this EkmConnection must be initiated from the EKM directly and cannot be performed from Cloud KMS. This means that: * When creating a CryptoKeyVersion associated with this EkmConnection, the caller must supply the key path of pre-existing external key material that will be linked to the CryptoKeyVersion. * Destruction of external key material cannot be requested via the Cloud KMS API and must be performed directly in the EKM. * Automatic rotation of key material is not supported.
CLOUD_KMS All CryptoKeys created with this EkmConnection use EKM-side key management operations initiated from Cloud KMS. This means that: * When a CryptoKeyVersion associated with this EkmConnection is created, the EKM automatically generates new key material and a new key path. The caller cannot supply the key path of pre-existing external key material. * Destruction of external key material associated with this EkmConnection can be requested by calling [DestroyCryptoKeyVersion][EkmService.DestroyCryptoKeyVersion]. * Automatic rotation of key material is supported.

ServiceResolver

A ServiceResolver represents an EKM replica that can be reached within an EkmConnection.

Fields
service_directory_service

string

Required. The resource name of the Service Directory service pointing to an EKM replica, in the format projects/*/locations/*/namespaces/*/services/*.

endpoint_filter

string

Optional. The filter applied to the endpoints of the resolved service. If no filter is specified, all endpoints will be considered. An endpoint will be chosen arbitrarily from the filtered list for each request.

For endpoint filter syntax and examples, see https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest.

hostname

string

Required. The hostname of the EKM replica used at TLS and HTTP layers.

server_certificates[]

Certificate

Required. A list of leaf server certificates used to authenticate HTTPS connections to the EKM replica. Currently, a maximum of 10 Certificate is supported.

EncryptRequest

Request message for KeyManagementService.Encrypt.

Fields
name

string

Required. The resource name of the CryptoKey or CryptoKeyVersion to use for encryption.

If a CryptoKey is specified, the server will use its primary version.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.useToEncrypt
plaintext

bytes

Required. The data to encrypt. Must be no larger than 64KiB.

The maximum size depends on the key version's protection_level. For SOFTWARE, EXTERNAL, and EXTERNAL_VPC keys, the plaintext must be no larger than 64KiB. For HSM keys, the combined length of the plaintext and additional_authenticated_data fields must be no larger than 8KiB.

additional_authenticated_data

bytes

Optional. Optional data that, if specified, must also be provided during decryption through DecryptRequest.additional_authenticated_data.

The maximum size depends on the key version's protection_level. For SOFTWARE, EXTERNAL, and EXTERNAL_VPC keys the AAD must be no larger than 64KiB. For HSM keys, the combined length of the plaintext and additional_authenticated_data fields must be no larger than 8KiB.

plaintext_crc32c

Int64Value

Optional. An optional CRC32C checksum of the EncryptRequest.plaintext. If specified, KeyManagementService will verify the integrity of the received EncryptRequest.plaintext using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(EncryptRequest.plaintext) is equal to EncryptRequest.plaintext_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

additional_authenticated_data_crc32c

Int64Value

Optional. An optional CRC32C checksum of the EncryptRequest.additional_authenticated_data. If specified, KeyManagementService will verify the integrity of the received EncryptRequest.additional_authenticated_data using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(EncryptRequest.additional_authenticated_data) is equal to EncryptRequest.additional_authenticated_data_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

EncryptResponse

Response message for KeyManagementService.Encrypt.

Fields
name

string

The resource name of the CryptoKeyVersion used in encryption. Check this field to verify that the intended resource was used for encryption.

ciphertext

bytes

The encrypted data.

ciphertext_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returned EncryptResponse.ciphertext. An integrity check of EncryptResponse.ciphertext can be performed by computing the CRC32C checksum of EncryptResponse.ciphertext and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

verified_plaintext_crc32c

bool

Integrity verification field. A flag indicating whether EncryptRequest.plaintext_crc32c was received by KeyManagementService and used for the integrity verification of the plaintext. A false value of this field indicates either that EncryptRequest.plaintext_crc32c was left unset or that it was not delivered to KeyManagementService. If you've set EncryptRequest.plaintext_crc32c but this field is still false, discard the response and perform a limited number of retries.

verified_additional_authenticated_data_crc32c

bool

Integrity verification field. A flag indicating whether EncryptRequest.additional_authenticated_data_crc32c was received by KeyManagementService and used for the integrity verification of the AAD. A false value of this field indicates either that EncryptRequest.additional_authenticated_data_crc32c was left unset or that it was not delivered to KeyManagementService. If you've set EncryptRequest.additional_authenticated_data_crc32c but this field is still false, discard the response and perform a limited number of retries.

protection_level

ProtectionLevel

The ProtectionLevel of the CryptoKeyVersion used in encryption.

ExternalProtectionLevelOptions

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

Fields
external_key_uri

string

The URI for an external resource that this CryptoKeyVersion represents.

ekm_connection_key_path

string

The path to the external key material on the EKM when using EkmConnection e.g., "v0/my/key". Set this field instead of external_key_uri when using an EkmConnection.

GenerateRandomBytesRequest

Request message for KeyManagementService.GenerateRandomBytes.

Fields
location

string

The project-specific location in which to generate random bytes. For example, "projects/my-project/locations/us-central1".

length_bytes

int32

The length in bytes of the amount of randomness to retrieve. Minimum 8 bytes, maximum 1024 bytes.

protection_level

ProtectionLevel

The ProtectionLevel to use when generating the random data. Currently, only HSM protection level is supported.

GenerateRandomBytesResponse

Response message for KeyManagementService.GenerateRandomBytes.

Fields
data

bytes

The generated data.

data_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returned GenerateRandomBytesResponse.data. An integrity check of GenerateRandomBytesResponse.data can be performed by computing the CRC32C checksum of GenerateRandomBytesResponse.data and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

GetCryptoKeyRequest

Request message for KeyManagementService.GetCryptoKey.

Fields
name

string

Required. The name of the CryptoKey to get.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeys.get

GetCryptoKeyVersionRequest

Request message for KeyManagementService.GetCryptoKeyVersion.

Fields
name

string

Required. The name of the CryptoKeyVersion to get.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.get

GetEkmConfigRequest

Request message for EkmService.GetEkmConfig.

Fields
name

string

Required. The name of the EkmConfig to get.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.ekmConfigs.get

GetEkmConnectionRequest

Request message for EkmService.GetEkmConnection.

Fields
name

string

Required. The name of the EkmConnection to get.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.ekmConnections.get

GetImportJobRequest

Request message for KeyManagementService.GetImportJob.

Fields
name

string

Required. The name of the ImportJob to get.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.importJobs.get

GetKeyRingRequest

Request message for KeyManagementService.GetKeyRing.

Fields
name

string

Required. The name of the KeyRing to get.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.keyRings.get

GetPublicKeyRequest

Request message for KeyManagementService.GetPublicKey.

Fields
name

string

Required. The name of the CryptoKeyVersion public key to get.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.viewPublicKey

ImportCryptoKeyVersionRequest

Request message for KeyManagementService.ImportCryptoKeyVersion.

Fields
parent

string

Required. The name of the CryptoKey to be imported into.

The create permission is only required on this key when creating a new CryptoKeyVersion.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.cryptoKeyVersions.create
crypto_key_version

string

Optional. The optional name of an existing CryptoKeyVersion to target for an import operation. If this field is not present, a new CryptoKeyVersion containing the supplied key material is created.

If this field is present, the supplied key material is imported into the existing CryptoKeyVersion. To import into an existing CryptoKeyVersion, the CryptoKeyVersion must be a child of ImportCryptoKeyVersionRequest.parent, have been previously created via [ImportCryptoKeyVersion][], and be in DESTROYED or IMPORT_FAILED state. The key material and algorithm must match the previous CryptoKeyVersion exactly if the CryptoKeyVersion has ever contained key material.

Authorization requires the following IAM permission on the specified resource cryptoKeyVersion:

  • cloudkms.cryptoKeyVersions.update
algorithm

CryptoKeyVersionAlgorithm

Required. The algorithm of the key being imported. This does not need to match the version_template of the CryptoKey this version imports into.

import_job

string

Required. The name of the ImportJob that was used to wrap this key material.

Authorization requires the following IAM permission on the specified resource importJob:

  • cloudkms.importjobs.useToImport
wrapped_key

bytes

Optional. The wrapped key material to import.

Before wrapping, key material must be formatted. If importing symmetric key material, the expected key material format is plain bytes. If importing asymmetric key material, the expected key material format is PKCS#8-encoded DER (the PrivateKeyInfo structure from RFC 5208).

When wrapping with import methods (RSA_OAEP_3072_SHA1_AES_256 or RSA_OAEP_4096_SHA1_AES_256 or RSA_OAEP_3072_SHA256_AES_256 or RSA_OAEP_4096_SHA256_AES_256),

this field must contain the concatenation of:

  1. An ephemeral AES-256 wrapping key wrapped with the public_key using RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty label.
  2. The formatted key to be imported, wrapped with the ephemeral AES-256 key using AES-KWP (RFC 5649).

This format is the same as the format produced by PKCS#11 mechanism CKM_RSA_AES_KEY_WRAP.

When wrapping with import methods (RSA_OAEP_3072_SHA256 or RSA_OAEP_4096_SHA256),

this field must contain the formatted key to be imported, wrapped with the public_key using RSAES-OAEP with SHA-256, MGF1 with SHA-256, and an empty label.

Union field wrapped_key_material. This field is legacy. Use the field wrapped_key instead. wrapped_key_material can be only one of the following:
rsa_aes_wrapped_key

bytes

Optional. This field has the same meaning as wrapped_key. Prefer to use that field in new work. Either that field or this field (but not both) must be specified.

ImportJob

An ImportJob can be used to create CryptoKeys and CryptoKeyVersions using pre-existing key material, generated outside of Cloud KMS.

When an ImportJob is created, Cloud KMS will generate a "wrapping key", which is a public/private key pair. You use the wrapping key to encrypt (also known as wrap) the pre-existing key material to protect it during the import process. The nature of the wrapping key depends on the choice of import_method. When the wrapping key generation is complete, the state will be set to ACTIVE and the public_key can be fetched. The fetched public key can then be used to wrap your pre-existing key material.

Once the key material is wrapped, it can be imported into a new CryptoKeyVersion in an existing CryptoKey by calling ImportCryptoKeyVersion. Multiple CryptoKeyVersions can be imported with a single ImportJob. Cloud KMS uses the private key portion of the wrapping key to unwrap the key material. Only Cloud KMS has access to the private key.

An ImportJob expires 3 days after it is created. Once expired, Cloud KMS will no longer be able to import or unwrap any key material that was wrapped with the ImportJob's public key.

For more information, see Importing a key.

Fields
name

string

Output only. The resource name for this ImportJob in the format projects/*/locations/*/keyRings/*/importJobs/*.

import_method

ImportMethod

Required. Immutable. The wrapping method to be used for incoming key material.

protection_level

ProtectionLevel

Required. Immutable. The protection level of the ImportJob. This must match the protection_level of the version_template on the CryptoKey you attempt to import into.

create_time

Timestamp

Output only. The time at which this ImportJob was created.

generate_time

Timestamp

Output only. The time this ImportJob's key material was generated.

expire_time

Timestamp

Output only. The time at which this ImportJob is scheduled for expiration and can no longer be used to import key material.

expire_event_time

Timestamp

Output only. The time this ImportJob expired. Only present if state is EXPIRED.

state

ImportJobState

Output only. The current state of the ImportJob, indicating if it can be used.

public_key

WrappingPublicKey

Output only. The public key with which to wrap key material prior to import. Only returned if state is ACTIVE.

attestation

KeyOperationAttestation

Output only. Statement that was generated and signed by the key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of HSM.

ImportJobState

The state of the ImportJob, indicating if it can be used.

Enums
IMPORT_JOB_STATE_UNSPECIFIED Not specified.
PENDING_GENERATION The wrapping key for this job is still being generated. It may not be used. Cloud KMS will automatically mark this job as ACTIVE as soon as the wrapping key is generated.
ACTIVE This job may be used in CreateCryptoKey and CreateCryptoKeyVersion requests.
EXPIRED This job can no longer be used and may not leave this state once entered.

ImportMethod

ImportMethod describes the key wrapping method chosen for this ImportJob.

Enums
IMPORT_METHOD_UNSPECIFIED Not specified.
RSA_OAEP_3072_SHA1_AES_256 This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 3072 bit RSA key. For more details, see RSA AES key wrap mechanism.
RSA_OAEP_4096_SHA1_AES_256 This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 4096 bit RSA key. For more details, see RSA AES key wrap mechanism.
RSA_OAEP_3072_SHA256_AES_256 This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 3072 bit RSA key. For more details, see RSA AES key wrap mechanism.
RSA_OAEP_4096_SHA256_AES_256 This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping scheme defined in the PKCS #11 standard. In summary, this involves wrapping the raw key with an ephemeral AES key, and wrapping the ephemeral AES key with a 4096 bit RSA key. For more details, see RSA AES key wrap mechanism.
RSA_OAEP_3072_SHA256 This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The key material to be imported is wrapped directly with the RSA key. Due to technical limitations of RSA wrapping, this method cannot be used to wrap RSA keys for import.
RSA_OAEP_4096_SHA256 This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The key material to be imported is wrapped directly with the RSA key. Due to technical limitations of RSA wrapping, this method cannot be used to wrap RSA keys for import.

WrappingPublicKey

The public key component of the wrapping key. For details of the type of key this public key corresponds to, see the ImportMethod.

Fields
pem

string

The public key, encoded in PEM format. For more information, see the RFC 7468 sections for General Considerations and Textual Encoding of Subject Public Key Info.

KeyOperationAttestation

Contains an HSM-generated attestation about a key operation. For more information, see Verifying attestations.

Fields
format

AttestationFormat

Output only. The format of the attestation data.

content

bytes

Output only. The attestation data provided by the HSM when the key operation was performed.

cert_chains

CertificateChains

Output only. The certificate chains needed to validate the attestation

AttestationFormat

Attestation formats provided by the HSM.

Enums
ATTESTATION_FORMAT_UNSPECIFIED Not specified.
CAVIUM_V1_COMPRESSED

Cavium HSM attestation compressed with gzip. Note that this format is defined by Cavium and subject to change at any time.

See https://www.marvell.com/products/security-solutions/nitrox-hs-adapters/software-key-attestation.html.

CAVIUM_V2_COMPRESSED Cavium HSM attestation V2 compressed with gzip. This is a new format introduced in Cavium's version 3.2-08.

CertificateChains

Certificate chains needed to verify the attestation. Certificates in chains are PEM-encoded and are ordered based on https://tools.ietf.org/html/rfc5246#section-7.4.2.

Fields
cavium_certs[]

string

Cavium certificate chain corresponding to the attestation.

google_card_certs[]

string

Google card certificate chain corresponding to the attestation.

google_partition_certs[]

string

Google partition certificate chain corresponding to the attestation.

KeyRing

A KeyRing is a toplevel logical grouping of CryptoKeys.

Fields
name

string

Output only. The resource name for the KeyRing in the format projects/*/locations/*/keyRings/*.

create_time

Timestamp

Output only. The time at which this KeyRing was created.

ListCryptoKeyVersionsRequest

Request message for KeyManagementService.ListCryptoKeyVersions.

Fields
parent

string

Required. The resource name of the CryptoKey to list, in the format projects/*/locations/*/keyRings/*/cryptoKeys/*.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.cryptoKeyVersions.list
page_size

int32

Optional. Optional limit on the number of CryptoKeyVersions to include in the response. Further CryptoKeyVersions can subsequently be obtained by including the ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier via ListCryptoKeyVersionsResponse.next_page_token.

view

CryptoKeyVersionView

The fields to include in the response.

filter

string

Optional. Only include resources that match the filter in the response. For more information, see Sorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, see Sorting and filtering list results.

ListCryptoKeyVersionsResponse

Response message for KeyManagementService.ListCryptoKeyVersions.

Fields
crypto_key_versions[]

CryptoKeyVersion

The list of CryptoKeyVersions.

next_page_token

string

A token to retrieve next page of results. Pass this value in ListCryptoKeyVersionsRequest.page_token to retrieve the next page of results.

total_size

int32

The total number of CryptoKeyVersions that matched the query.

ListCryptoKeysRequest

Request message for KeyManagementService.ListCryptoKeys.

Fields
parent

string

Required. The resource name of the KeyRing to list, in the format projects/*/locations/*/keyRings/*.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.cryptoKeys.list
page_size

int32

Optional. Optional limit on the number of CryptoKeys to include in the response. Further CryptoKeys can subsequently be obtained by including the ListCryptoKeysResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier via ListCryptoKeysResponse.next_page_token.

version_view

CryptoKeyVersionView

The fields of the primary version to include in the response.

filter

string

Optional. Only include resources that match the filter in the response. For more information, see Sorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, see Sorting and filtering list results.

ListCryptoKeysResponse

Response message for KeyManagementService.ListCryptoKeys.

Fields
crypto_keys[]

CryptoKey

The list of CryptoKeys.

next_page_token

string

A token to retrieve next page of results. Pass this value in ListCryptoKeysRequest.page_token to retrieve the next page of results.

total_size

int32

The total number of CryptoKeys that matched the query.

ListEkmConnectionsRequest

Request message for EkmService.ListEkmConnections.

Fields
parent

string

Required. The resource name of the location associated with the EkmConnections to list, in the format projects/*/locations/*.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.ekmConnections.list
page_size

int32

Optional. Optional limit on the number of EkmConnections to include in the response. Further EkmConnections can subsequently be obtained by including the ListEkmConnectionsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier via ListEkmConnectionsResponse.next_page_token.

filter

string

Optional. Only include resources that match the filter in the response. For more information, see Sorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, see Sorting and filtering list results.

ListEkmConnectionsResponse

Response message for EkmService.ListEkmConnections.

Fields
ekm_connections[]

EkmConnection

The list of EkmConnections.

next_page_token

string

A token to retrieve next page of results. Pass this value in ListEkmConnectionsRequest.page_token to retrieve the next page of results.

total_size

int32

The total number of EkmConnections that matched the query.

ListImportJobsRequest

Request message for KeyManagementService.ListImportJobs.

Fields
parent

string

Required. The resource name of the KeyRing to list, in the format projects/*/locations/*/keyRings/*.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.importJobs.list
page_size

int32

Optional. Optional limit on the number of ImportJobs to include in the response. Further ImportJobs can subsequently be obtained by including the ListImportJobsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier via ListImportJobsResponse.next_page_token.

filter

string

Optional. Only include resources that match the filter in the response. For more information, see Sorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, see Sorting and filtering list results.

ListImportJobsResponse

Response message for KeyManagementService.ListImportJobs.

Fields
import_jobs[]

ImportJob

The list of ImportJobs.

next_page_token

string

A token to retrieve next page of results. Pass this value in ListImportJobsRequest.page_token to retrieve the next page of results.

total_size

int32

The total number of ImportJobs that matched the query.

ListKeyRingsRequest

Request message for KeyManagementService.ListKeyRings.

Fields
parent

string

Required. The resource name of the location associated with the KeyRings, in the format projects/*/locations/*.

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.keyRings.list
page_size

int32

Optional. Optional limit on the number of KeyRings to include in the response. Further KeyRings can subsequently be obtained by including the ListKeyRingsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.

page_token

string

Optional. Optional pagination token, returned earlier via ListKeyRingsResponse.next_page_token.

filter

string

Optional. Only include resources that match the filter in the response. For more information, see Sorting and filtering list results.

order_by

string

Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, see Sorting and filtering list results.

ListKeyRingsResponse

Response message for KeyManagementService.ListKeyRings.

Fields
key_rings[]

KeyRing

The list of KeyRings.

next_page_token

string

A token to retrieve next page of results. Pass this value in ListKeyRingsRequest.page_token to retrieve the next page of results.

total_size

int32

The total number of KeyRings that matched the query.

LocationMetadata

Cloud KMS metadata for the given google.cloud.location.Location.

Fields
hsm_available

bool

Indicates whether CryptoKeys with protection_level HSM can be created in this location.

ekm_available

bool

Indicates whether CryptoKeys with protection_level EXTERNAL can be created in this location.

MacSignRequest

Request message for KeyManagementService.MacSign.

Fields
name

string

Required. The resource name of the CryptoKeyVersion to use for signing.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.useToSign
data

bytes

Required. The data to sign. The MAC tag is computed over this data field based on the specific algorithm.

data_crc32c

Int64Value

Optional. An optional CRC32C checksum of the MacSignRequest.data. If specified, KeyManagementService will verify the integrity of the received MacSignRequest.data using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(MacSignRequest.data) is equal to MacSignRequest.data_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

MacSignResponse

Response message for KeyManagementService.MacSign.

Fields
name

string

The resource name of the CryptoKeyVersion used for signing. Check this field to verify that the intended resource was used for signing.

mac

bytes

The created signature.

mac_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returned MacSignResponse.mac. An integrity check of MacSignResponse.mac can be performed by computing the CRC32C checksum of MacSignResponse.mac and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

verified_data_crc32c

bool

Integrity verification field. A flag indicating whether MacSignRequest.data_crc32c was received by KeyManagementService and used for the integrity verification of the data. A false value of this field indicates either that MacSignRequest.data_crc32c was left unset or that it was not delivered to KeyManagementService. If you've set MacSignRequest.data_crc32c but this field is still false, discard the response and perform a limited number of retries.

protection_level

ProtectionLevel

The ProtectionLevel of the CryptoKeyVersion used for signing.

MacVerifyRequest

Request message for KeyManagementService.MacVerify.

Fields
name

string

Required. The resource name of the CryptoKeyVersion to use for verification.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.useToVerify
data

bytes

Required. The data used previously as a MacSignRequest.data to generate the MAC tag.

data_crc32c

Int64Value

Optional. An optional CRC32C checksum of the MacVerifyRequest.data. If specified, KeyManagementService will verify the integrity of the received MacVerifyRequest.data using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(MacVerifyRequest.data) is equal to MacVerifyRequest.data_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

mac

bytes

Required. The signature to verify.

mac_crc32c

Int64Value

Optional. An optional CRC32C checksum of the MacVerifyRequest.mac. If specified, KeyManagementService will verify the integrity of the received MacVerifyRequest.mac using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C([MacVerifyRequest.tag][]) is equal to MacVerifyRequest.mac_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

MacVerifyResponse

Response message for KeyManagementService.MacVerify.

Fields
name

string

The resource name of the CryptoKeyVersion used for verification. Check this field to verify that the intended resource was used for verification.

success

bool

This field indicates whether or not the verification operation for MacVerifyRequest.mac over MacVerifyRequest.data was successful.

verified_data_crc32c

bool

Integrity verification field. A flag indicating whether MacVerifyRequest.data_crc32c was received by KeyManagementService and used for the integrity verification of the data. A false value of this field indicates either that MacVerifyRequest.data_crc32c was left unset or that it was not delivered to KeyManagementService. If you've set MacVerifyRequest.data_crc32c but this field is still false, discard the response and perform a limited number of retries.

verified_mac_crc32c

bool

Integrity verification field. A flag indicating whether MacVerifyRequest.mac_crc32c was received by KeyManagementService and used for the integrity verification of the data. A false value of this field indicates either that MacVerifyRequest.mac_crc32c was left unset or that it was not delivered to KeyManagementService. If you've set MacVerifyRequest.mac_crc32c but this field is still false, discard the response and perform a limited number of retries.

verified_success_integrity

bool

Integrity verification field. This value is used for the integrity verification of [MacVerifyResponse.success]. If the value of this field contradicts the value of [MacVerifyResponse.success], discard the response and perform a limited number of retries.

protection_level

ProtectionLevel

The ProtectionLevel of the CryptoKeyVersion used for verification.

ProtectionLevel

ProtectionLevel specifies how cryptographic operations are performed. For more information, see Protection levels.

Enums
PROTECTION_LEVEL_UNSPECIFIED Not specified.
SOFTWARE Crypto operations are performed in software.
HSM Crypto operations are performed in a Hardware Security Module.
EXTERNAL Crypto operations are performed by an external key manager.
EXTERNAL_VPC Crypto operations are performed in an EKM-over-VPC backend.

PublicKey

The public key for a given CryptoKeyVersion. Obtained via GetPublicKey.

Fields
pem

string

The public key, encoded in PEM format. For more information, see the RFC 7468 sections for General Considerations and Textual Encoding of Subject Public Key Info.

algorithm

CryptoKeyVersionAlgorithm

The Algorithm associated with this key.

pem_crc32c

Int64Value

Integrity verification field. A CRC32C checksum of the returned PublicKey.pem. An integrity check of PublicKey.pem can be performed by computing the CRC32C checksum of PublicKey.pem and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.

NOTE: This field is in Beta.

name

string

The name of the CryptoKeyVersion public key. Provided here for verification.

NOTE: This field is in Beta.

protection_level

ProtectionLevel

The ProtectionLevel of the CryptoKeyVersion public key.

RestoreCryptoKeyVersionRequest

Request message for KeyManagementService.RestoreCryptoKeyVersion.

Fields
name

string

Required. The resource name of the CryptoKeyVersion to restore.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.restore

UpdateCryptoKeyPrimaryVersionRequest

Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion.

Fields
name

string

Required. The resource name of the CryptoKey to update.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.cryptoKeys.update
crypto_key_version_id

string

Required. The id of the child CryptoKeyVersion to use as primary.

UpdateCryptoKeyRequest

Request message for KeyManagementService.UpdateCryptoKey.

Fields
crypto_key

CryptoKey

Required. CryptoKey with updated values.

Authorization requires the following IAM permission on the specified resource cryptoKey:

  • cloudkms.cryptoKeys.update
update_mask

FieldMask

Required. List of fields to be updated in this request.

UpdateCryptoKeyVersionRequest

Request message for KeyManagementService.UpdateCryptoKeyVersion.

Fields
crypto_key_version

CryptoKeyVersion

Required. CryptoKeyVersion with updated values.

Authorization requires the following IAM permission on the specified resource cryptoKeyVersion:

  • cloudkms.cryptoKeyVersions.update
update_mask

FieldMask

Required. List of fields to be updated in this request.

UpdateEkmConfigRequest

Request message for EkmService.UpdateEkmConfig.

Fields
ekm_config

EkmConfig

Required. EkmConfig with updated values.

Authorization requires the following IAM permission on the specified resource ekmConfig:

  • cloudkms.ekmConfigs.update
update_mask

FieldMask

Required. List of fields to be updated in this request.

UpdateEkmConnectionRequest

Request message for EkmService.UpdateEkmConnection.

Fields
ekm_connection

EkmConnection

Required. EkmConnection with updated values.

Authorization requires the following IAM permission on the specified resource ekmConnection:

  • cloudkms.ekmConnections.update
update_mask

FieldMask

Required. List of fields to be updated in this request.

VerifyConnectivityRequest

Request message for EkmService.VerifyConnectivity.

Fields
name

string

Required. The name of the EkmConnection to verify.

Authorization requires the following IAM permission on the specified resource name:

  • cloudkms.ekmConnections.verifyConnectivity

VerifyConnectivityResponse

Response message for EkmService.VerifyConnectivity.