KEYVALUE:是否有一种方法可以证明存在秘密而不检索数据?作为更安全的读取方法

发布于 2025-02-06 19:26:43 字数 836 浏览 1 评论 0原文

在我们的代码库中,我们希望一项服务能够验证是否存在秘密(键),而无需实际阅读秘密。在.NET 6上使用1.7.0.4

可以以这种方式完成此类请求:

curl https://myvaultserver/v1/secret/subkeys/mygroup/myservice

数据返回为:

{
  "request_id": "2bd49db9-278a-0f25-6038-236897bdea5b",
  "lease_id": "",
  "renewable": false,
  "lease_duration": 0,
  "data": {
    "metadata": {
      "created_time": "2022-06-10T08:41:10.171396632Z",
      "custom_metadata": null,
      "deletion_time": "",
      "destroyed": false,
      "version": 16
    },
    "subkeys": {
      "Quote__TeamsWebhook": null,
      "RabbitMQ__ConnectionString": null,
      "SqlServer__ClientCert": null,
      "SqlServer__DataSource": null,
      "SqlServer__Password": null,
      "SqlServer__UserID": null
    }
  },
  "wrap_info": null,
  "warnings": null,
  "auth": null
}

In our codebase we want a service to verify if a secret (key) is present without actually reading the secret. Using 1.7.0.4 on .NET 6

such a request can be done in this way :

curl https://myvaultserver/v1/secret/subkeys/mygroup/myservice

data is returned as:

{
  "request_id": "2bd49db9-278a-0f25-6038-236897bdea5b",
  "lease_id": "",
  "renewable": false,
  "lease_duration": 0,
  "data": {
    "metadata": {
      "created_time": "2022-06-10T08:41:10.171396632Z",
      "custom_metadata": null,
      "deletion_time": "",
      "destroyed": false,
      "version": 16
    },
    "subkeys": {
      "Quote__TeamsWebhook": null,
      "RabbitMQ__ConnectionString": null,
      "SqlServer__ClientCert": null,
      "SqlServer__DataSource": null,
      "SqlServer__Password": null,
      "SqlServer__UserID": null
    }
  },
  "wrap_info": null,
  "warnings": null,
  "auth": null
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文