stedepdelen
stedepdelen

Reputation: 1

KeyValue: Is there a method to testif a secret exists without retrieving the data ? As a more secure approach to ReadSecretAsync

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
}

Upvotes: 0

Views: 81

Answers (0)

Related Questions