-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Labels
Description
Describe the bug
A clear and concise description of what the bug is.
Attempting to copy a kv v2 secret JSON using Copy > Copy JSON does not copy to clipboard
To Reproduce
Steps to reproduce the behavior:
-
docker run -it --rm -p 8200:8200 hashicorp/vault:1.21 - Open http://localhost:8200/, log in with root token
- Create a secret in the default kv v2 engine http://localhost:8200/ui/vault/secrets/secret/kv/create, e.g. with key: "foo", value: "bar"
- Open secret details tab, e.g. http://localhost:8200/ui/vault/secrets/secret/kv/test/details
- Clip on "Copy" dropdown > "Copy JSON"
- A green toast with "Success" "JSON Copied!" appears on the bottom right
- Secret is not copied to clipboard (trying to paste shows that nothing is in the clipboard)
Expected behavior
Note that the alternative method to copy the secret JSON works as expected to copy to clipboard:
- Toggle JSON view on secret details tab
- Click on clipboard icon in JSON view
The expected behavior happens when running with the latest 1.20.x release:
-
docker run -it --rm -p 8200:8200 hashicorp/vault:1.20
- Open http://localhost:8200/, log in with root token
- Create a secret in the default kv v2 engine http://localhost:8200/ui/vault/secrets/secret/kv/create, e.g. with key: "foo", value: "bar"
- Open secret details tab, e.g. http://localhost:8200/ui/vault/secrets/secret/kv/test/details
- Clip on "Copy" dropdown > "Copy JSON"
- A green toast with "Success JSON Copied!" appears on the bottom right
- Secret is actually copied to clipboard
Environment:
- Vault Server Version (retrieve with
vault status):1.21.1 - Vault CLI Version (retrieve with
vault version):v1.20.4 - Server Operating System/Architecture: Reproduced on Mac M1, MacOS 15, Edge browser
Vault server configuration file(s):
This is reproducible with hashicorp/vault:1.21 without additional configuration.
Additional context
N/A