使用 GCloud KMS 生成加密密钥以访问私有存储库作为依赖项时出错
Getting error while generating crypto keys using GCloud KMS to access private repo as dependency
我正在尝试使用此 documentation 将加密的 ssh 密钥添加到 google KMS 以访问私有存储库作为 Google App Engine 的依赖项(Node.JS 项目).
我已成功生成 Cloud KMS KeyRing 和 CryptoKey,但在加密密钥时遇到错误。
(gcloud.kms.encrypt) PERMISSION_DENIED: Permission
'cloudkms.cryptoKeyVersions.useToEncrypt' denied for resource
'projects/test/locations/global/keyRings/my-keyring/cryptoKeys/key'.
需要一些帮助来设置它以便我可以在 GAE 上使用这个 ssh 密钥。
您没有使用加密功能的 IAM 权限。
建议:不要在您的 SSH 真实密钥上练习。将它们复制到不同的目录中。然后学习如何在副本上使用 IAM 和 KMS。
Need some help to setup this so can I can use this ssh key on GAE.
我不确定您尝试使用 KMS 加密 SSH 密钥以在 GAE 上使用来完成什么。
To allow a user or service account to use a key to encrypt or decrypt
using a particular key, they must have the
cloudkms.cryptoKeyEncrypterDecrypter, cloudkms.cryptoKeyEncrypter,
cloudkms.cryptoKeyDecrypter, or owner role, as per the chart in
Permissions and Roles.
授予服务帐户权限的示例命令:
gcloud kms keys add-iam-policy-binding \
golden-egg --location global --keyring golden-goose \
--member serviceAccount:my-service-account@my-project.iam.gserviceaccount.com \
--role roles/cloudkms.cryptoKeyEncrypterDecrypter
授予用户权限的类似命令:
gcloud kms keys add-iam-policy-binding \
golden-egg --location global --keyring golden-goose \
--member user:sillygoose@gmail.com \
--role roles/cloudkms.cryptoKeyEncrypterDecrypter
在 CloudBuild 上启用设置
Cloud Build -> 设置 > Cloud KMS - Cloud KMS CryptoKey Decrypter -> 启用
它对我有用
我正在尝试使用此 documentation 将加密的 ssh 密钥添加到 google KMS 以访问私有存储库作为 Google App Engine 的依赖项(Node.JS 项目).
我已成功生成 Cloud KMS KeyRing 和 CryptoKey,但在加密密钥时遇到错误。
(gcloud.kms.encrypt) PERMISSION_DENIED: Permission 'cloudkms.cryptoKeyVersions.useToEncrypt' denied for resource 'projects/test/locations/global/keyRings/my-keyring/cryptoKeys/key'.
需要一些帮助来设置它以便我可以在 GAE 上使用这个 ssh 密钥。
您没有使用加密功能的 IAM 权限。
建议:不要在您的 SSH 真实密钥上练习。将它们复制到不同的目录中。然后学习如何在副本上使用 IAM 和 KMS。
Need some help to setup this so can I can use this ssh key on GAE.
我不确定您尝试使用 KMS 加密 SSH 密钥以在 GAE 上使用来完成什么。
To allow a user or service account to use a key to encrypt or decrypt using a particular key, they must have the cloudkms.cryptoKeyEncrypterDecrypter, cloudkms.cryptoKeyEncrypter, cloudkms.cryptoKeyDecrypter, or owner role, as per the chart in Permissions and Roles.
授予服务帐户权限的示例命令:
gcloud kms keys add-iam-policy-binding \
golden-egg --location global --keyring golden-goose \
--member serviceAccount:my-service-account@my-project.iam.gserviceaccount.com \
--role roles/cloudkms.cryptoKeyEncrypterDecrypter
授予用户权限的类似命令:
gcloud kms keys add-iam-policy-binding \
golden-egg --location global --keyring golden-goose \
--member user:sillygoose@gmail.com \
--role roles/cloudkms.cryptoKeyEncrypterDecrypter
在 CloudBuild 上启用设置
Cloud Build -> 设置 > Cloud KMS - Cloud KMS CryptoKey Decrypter -> 启用
它对我有用