Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't fetching secrets #19

Open
rbakhtaraev opened this issue Aug 15, 2019 · 3 comments · May be fixed by #35
Open

Can't fetching secrets #19

rbakhtaraev opened this issue Aug 15, 2019 · 3 comments · May be fixed by #35

Comments

@rbakhtaraev
Copy link

I reproduced the structure from your example, but all trying ended with errors.

  1. I have secrets on the following path, that can be read and listed.
    any/path/daytona_test/{api-key|database}
    I exported the variable VAULT_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
  1. Trying to fetch secret by direct path. Use the variable: VAULT_SECRET_APPLICATION=any/path/daytona_test/api-key. Got non-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

@broamski
Copy link
Collaborator

broamski commented 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 for version:2.

@rbakhtaraev
Copy link
Author

Hi @broamski, sorry for the delay. We are using KV Engine V2.

@ecejas
Copy link

ecejas commented 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).

@broamski broamski linked a pull request Mar 12, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants