oci_kms_verify
This resource provides the Verify resource in Oracle Cloud Infrastructure Kms service.
Verifies a digital signature that was generated by the Sign operation
by using the public key of the same asymmetric key that was used to sign the data. If you want to validate the
digital signature outside of the service, you can do so by using the public key of the asymmetric key.
This operation is not supported for keys having protection mode EXTERNAL
.
Example Usage
resource "oci_kms_verify" "test_verify" {
#Required
crypto_endpoint = var.verify_message_crypto_endpoint
key_id = oci_kms_key.test_key.id
key_version_id = oci_kms_key_version.test_key_version.id
message = var.verify_message
signature = var.verify_signature
signing_algorithm = var.verify_signing_algorithm
#Optional
message_type = var.verify_message_type
}
Argument Reference
The following arguments are supported:
crypto_endpoint
- (Required) The service endpoint to perform cryptographic operations against. Cryptographic operations include ‘Encrypt,’ ‘Decrypt,’, ‘GenerateDataEncryptionKey’, ‘Sign’ and ‘Verify’ operations. see Vault Crypto endpoint.key_id
- (Required) The OCID of the key used to sign the message.key_version_id
- (Required) The OCID of the key version used to sign the message.message
- (Required) The base64-encoded binary data object denoting the message or message digest to sign. You can have a message up to 4096 bytes in size. To sign a larger message, provide the message digest.message_type
- (Optional) Denotes whether the value of the message parameter is a raw message or a message digest. The default value,RAW
, indicates a message. To indicate a message digest, useDIGEST
.signature
- (Required) The base64-encoded binary data object denoting the cryptographic signature generated for the message.signing_algorithm
- (Required) The algorithm to use to sign the message or message digest. For RSA keys, supported signature schemes include PKCS #1 and RSASSA-PSS, along with different hashing algorithms. For ECDSA keys, ECDSA is the supported signature scheme with different hashing algorithms. When you pass a message digest for signing, ensure that you specify the same hashing algorithm as used when creating the message digest.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Attributes Reference
The following attributes are exported:
is_signature_valid
- A Boolean value that indicates whether the signature was verified.
Timeouts
The timeouts
block allows you to specify timeouts for certain operations:
* create
- (Defaults to 20 minutes), when creating the Verify
* update
- (Defaults to 20 minutes), when updating the Verify
* delete
- (Defaults to 20 minutes), when destroying the Verify
Import
Verify can be imported using the id
, e.g.
$ terraform import oci_kms_verify.test_verify "id"