如何将 Postman 连接到 GCP Cloud Data Loss Prevention API 以获取内容:去标识化和内容:使用 API 密钥重新标识端点?

问题描述 投票:0回答:1

我正在尝试与邮递员连接到 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 的步骤进行操作。

但我不知道我可能做错了什么。

google-cloud-platform google-api permission-denied google-cloud-kms cloud-data-loss-prevention
1个回答
0
投票

文档似乎在撒谎,如果您检查 DLP API 身份验证方法,它不会提供使用 API 密钥的选项。

我希望有一天这对某人有用,或者他们会改进文档。

© www.soinside.com 2019 - 2024. All rights reserved.