-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Vault UI Changes my JSON during secret creation #5153
Comments
@meirish the input is malformed JSON, but it does seem like it would be nice to error if possible |
I had a typo in my input json, there should not have been a Yes, my concern is not the fact that the input could be malformed, it is that there is no warning when vault changes my input. The first time I ran into this, I did not notice the change. I am not sure if this happens when communicating directly with the vault api or with the cli. |
The CLI won't accept it because all input to Vault is via JSON objects, not arrays, so it errors out appropriately. It seems like the UI is instead converting to an object. |
Yeah @jefferai is correct, it assumes it's an object, and we have auto-formatting for the editor - I didn't realize it would transform the value so much when the top level is an array. Will look into disabling that. |
Describe the bug
When using the Vault UI, I can create secrets. I select the
json
option, and paste raw json into the text box. Vault replaces my array with objects.To Reproduce
Steps to reproduce the behavior:
json
toggle enabledExpected behavior
I expect vault to either reject my json if it is not compatible or malformed, or accept it without modification.
Environment:
vault status
): 0.10.4vault version
): 0.10.4Vault server configuration file(s):
Additional context
I understand that my json may not be compatible (starting with an array), however, I would expect an error to be returned, not a modification. Is this documented? My apologies if it is.
The text was updated successfully, but these errors were encountered: