-
Notifications
You must be signed in to change notification settings - Fork 377
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
"No JSON object could be decoded" when writing to KV v2 #293
Comments
Update: This was my fault.. When you run vault in dev mode, it automatically enables V2 of the kv at /secret. I assumed the real server was also doing this, but the default behavior for that is to use v1 instead of v1. I enabled versioning / kv v2 on the real server and it worked as expected. Should I leave this open? I feel like there could at least be a better error message for this situation. |
@justyns: Totally agree that the exception raised in this case makes things more confusing than need be. Will see what we can do about raising a more helpful message in these cases... 👍 |
Versions
Problem
I'm currently running into a weird issue where I am attempting to write secrets to the kv v2 api, and it is returning an error.
Example script
This is an example of what I'm doing:
Error
And this is the error:
Additional information
https://github.com/hvac/hvac/blob/master/hvac/api/secrets_engines/kv_v2.py#L124 looks like it always returns
response.json()
but after adding some debug statements to that function, the response from vault is a204
and there's no data to parse.Sidenote: The above error is from running vault in server mode. I tested using dev mode, and I do not get the same error. I haven't investigated why, but vault in dev mode apparently returns a response (with a 200 instead of 204) when it does not without dev mode. I might open a ticket on the vault repo for this if the docs don't mention it.
The text was updated successfully, but these errors were encountered: