[英]Permission 'cloudkms.cryptoKeyVersions.viewPublicKey' denied on resource or it may not exist
I am building an http endpoint with Google Cloud Functions to authorize Flow Blockchain transactions with Google Cloud Key.我正在使用 Google Cloud Functions 构建一个 http 端点,以授权使用 Google Cloud Key 的 Flow Blockchain 交易。 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:使用 KMS 的代码如下所示:
Permission 'cloudkms.cryptoKeyVersions.viewPublicKey' denied on resource 'projects/nftiket500/locations/us-east1/keyRings/nftiket50050/cryptoKeys/nftiket50050/cryptoKeyVersions/2' (or it may not exist)
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.该错误消息意味着您尝试访问的密钥不存在 - 或者更有可能 - 您没有授予 Cloud Function 正在运行的角色访问密钥的权限。 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/iam ,其中包含有关如何添加权限的说明。 https://cloud.google.com/kms/docs/reference/permissions-and-roles describes all the roles and permissions available.
https://cloud.google.com/kms/docs/reference/permissions-and-roles描述了所有可用的角色和权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.