Open
Description
I reproduced the structure from your example, but all trying ended with errors.
- I have secrets on the following path, that can be read and listed.
any/path/daytona_test/{api-key|database}
I exported the variableVAULT_SECRETS_APPLICATION=any/path/daytona_test
and try to fetching that secrets, but i got 405 error.
URL: GET https://awesome.vault/v1/secret/data/any/path/daytona_test?list=true
Code: 405. Errors:
* 1 error occurred:
* unsupported operation
- Trying to fetch secret by direct path. Use the variable:
VAULT_SECRET_APPLICATION=any/path/daytona_test/api-key
. Gotnon-string value
error.
DAYTONA - 2019/08/15 12:18:05 Starting secret fetch
DAYTONA - 2019/08/15 12:18:06 secret 'api-key_data' has non-string value: map[string]interface {}{"value":"1234"}
Try again:
DAYTONA - 2019/08/15 12:21:17 Starting secret fetch
DAYTONA - 2019/08/15 12:21:17 secret 'api-key_metadata' has non-string value: map[string]interface {}{"destroyed":false, "version":"1", "created_time":"2019-08-15T05:02:57.750127434Z", "deletion_time":""}
If i send in the API by Postman i get next:
{
"request_id": "a273f8e1-342f-7ee1-550f-de0734456154",
"lease_id": "",
"renewable": false,
"lease_duration": 0,
"data": {
"data": {
"value": "1234"
},
"metadata": {
"created_time": "2019-08-15T05:02:57.750127434Z",
"deletion_time": "",
"destroyed": false,
"version": 1
}
},
"wrap_info": null,
"warnings": null,
"auth": null
}
Is this an unexpected response for Daytona? What am I doing wrong?
Vault version: 1.1.1
Metadata
Metadata
Assignees
Labels
No labels
Activity
broamski commentedon Oct 8, 2019
Hi @rbakhtaraev - Are you using the KV Secrets Engine V2?
To determine version number, run
vault secrets list -detailed
and inspect the Options column forversion:2
.rbakhtaraev commentedon Oct 17, 2019
Hi @broamski, sorry for the delay. We are using KV Engine V2.
ecejas commentedon Jan 8, 2020
@broamski There is any special consideration we need to have with KV Engine V2? It doesn't work for me. Works fine when I use Engine V1. I suspect is related to the existence of multiple keys in V2 (Secret Metadata).