我正在尝试与邮递员连接到 GCP Cloud Data Loss Prevention API。
我已经创建了一个 API 密钥,非常适合端点内容:检查和信息类型。
然而,即使文档另有说明,它也不允许我连接到 content:deidentify 和 content:reidentify。
在 GCP 中配置 API 密钥时,我没有看到任何奇怪的东西。
这是我正在使用的身份验证方法(它说我可以使用去标识化和重新标识):
https://cloud.google.com/dlp/docs/auth
在我解释的这些方法中,它只允许我使用检查:
https://cloud.google.com/dlp/docs/reference/rest/v2/projects.content
为了创建 API 密钥,我遵循了这个文档:
https://cloud.google.com/docs/authentication/api-keys?visit_id=638168976254849255-801375482&rd=1
我正在尝试加密和解密:
https://cloud.google.com/dlp/docs/inspect-sensitive-text-de-identify
错误是这样
{
"error": {
"code": 403,
"message": "Unauthenticated call not allowed when using a resource requiring permission: KMS_ENCRYPT.",
"status": "PERMISSION_DENIED"
}
}
我已按照为 cryptoKeyName 和 wrappedKey 字段创建 KMS 的步骤进行操作。
但我不知道我可能做错了什么。