0

I am building an http endpoint with Google Cloud Functions to authorize Flow Blockchain transactions with Google Cloud Key. I have my resource name. I'm having this error anytime I'm compiling my code or initiate a transaction.

The code that uses KMS looks like this:

 Permission 'cloudkms.cryptoKeyVersions.viewPublicKey' denied on resource 'projects/nftiket500/locations/us-east1/keyRings/nftiket50050/cryptoKeys/nftiket50050/cryptoKeyVersions/2' (or it may not exist)
Jim Morrison
  • 2,784
  • 1
  • 7
  • 11

1 Answers1

0

That error messages implies that either the key you are trying to access doesn't exist - or more likely - you haven't given permission for the role the Cloud Function is running as to access the key. Take a look at https://cloud.google.com/kms/docs/iam which has instructions for how to add permissions. https://cloud.google.com/kms/docs/reference/permissions-and-roles describes all the roles and permissions available.

brodheim
  • 38
  • 4