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

1.15 web-ui kv2 -- issue adding new lines to secret in json view #23940

Closed
NetzWerkPlanDeveloper opened this issue Nov 1, 2023 · 2 comments · Fixed by #24224
Closed

1.15 web-ui kv2 -- issue adding new lines to secret in json view #23940

NetzWerkPlanDeveloper opened this issue Nov 1, 2023 · 2 comments · Fixed by #24224
Labels
bug Used to indicate a potential bug reproduced This issue has been reproduced by a Vault engineer secret/kv ui

Comments

@NetzWerkPlanDeveloper
Copy link

Describe the bug
When editing a secret via web interface in the kv2 engine, trying to add a new line to the secret in json view results in the cursor jumping to the first line of the file.

If you add a , or { at the end of a line before trying to add a new line with the enter key, it works.
I'm not sure if this is intended and supposed to be some kind of json validation while the secret is being edited, or if it's just a bug.

Either way, it makes it impossible to insert something from the clipboard.

The behavior in kv1 hasn't changed, so I assume it's related to 22559.

To Reproduce
Steps to reproduce the behavior:

  1. Create secret in kv2
  2. Create new secret version
  3. Switch to json view
  4. Attempt to add new line by pressing enter

Environment:

  • Vault Server Version: 1.15.1
@ccapurso ccapurso added ui bug Used to indicate a potential bug secret/kv labels Nov 1, 2023
@timonych
Copy link

timonych commented Nov 13, 2023

I have already open topic. but have no responce on it: https://discuss.hashicorp.com/t/strange-behaviour-in-json-editor-in-vault-1-15-0-kv2/59259

Btw, I have found that it will work as previous version if You are using previous link.
E.g.

Also, is there any settings in config to disable URL enconding to %2F ?

@hashishaw hashishaw added the reproduced This issue has been reproduced by a Vault engineer label Nov 20, 2023
@hashishaw
Copy link
Contributor

Thank you for the report! We are working on getting a fix in.

As far as the URL slashes, there is not a way to disable those. We changed to encoded paths for KV v2 so that we can make fewer API calls while managing KV secret data within the UI. We determined that having "ugly" URLs was a reasonable tradeoff for the value we get from minimizing the calls, as well as other organizational benefits. We welcome feedback around how folks are using the UI and other improvements we can make, so please keep those coming along with reports of broken behavior like this one. Thanks!

@hashishaw hashishaw linked a pull request Nov 21, 2023 that will close this issue
fopina-ci pushed a commit to fopina/vault that referenced this issue Dec 1, 2023
)

* Fix JSON editor in KVv2 unable to paste. Fixes hashicorp#23940

* Default to JSON view on edit with secret is complex

* Add changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug reproduced This issue has been reproduced by a Vault engineer secret/kv ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants