I am trying to build a function to encrypt PII data in GBQ tables.
Steps I followed to create key,key_ring,cipher key are as follows:
1) gcloud kms keyrings create "bi-keyring" \
Solved! Go to Solution.
Hi @tanu3012,
Thank you for reaching out to the community.
As I review available resources in line with this failing decryption, I found a couple of possible causes:
Review and make sure that you are using the right key version or format, and you have the necessary IAM permission to access the key.
Here are some other related links for your reference:
Hope this helps.
Hi @tanu3012,
Thank you for reaching out to the community.
As I review available resources in line with this failing decryption, I found a couple of possible causes:
Review and make sure that you are using the right key version or format, and you have the necessary IAM permission to access the key.
Here are some other related links for your reference:
Hope this helps.
I tried ones again with new keyring & key
now I am getting following error while creating wrapped keyset
$ curl "https://cloudkms.googleapis.com/v1/projects/centralized-data-hub-reporting/locations/us-central1/key..." \
--request "POST" \
--header "Authorization:Bearer $(gcloud auth application-default print-access-token)" \
--header "content-type: application/json" \
--data "{\"plaintext\": \"hvVtUmEvxhkYnMok6ghkaf+dD/vRp9hUfZCrOcjZ3Tw=\"}"
{
"error": {
"code": 403,
"message": "Permission 'cloudkms.cryptoKeyVersions.useToEncrypt' denied on resource 'projects/centralized-data-hub-reporting/locations/us-central1/keyRings/encypt_keyring/cryptoKeys/encypt_key' (or it may not exist).",
"status": "PERMISSION_DENIED"
}
}