You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When uploading secrets JSON data with non-string secrets values (e.g. integer, float, null), the JSON switch at the top right of the <vault address>/ui/vault/secrets/secret/show/<location> UI web page does not correctly switch between "raw" JSON data and key/value display with (secret) values being hidden; the switch seems to do nothing.
This issue only occurs when uploading data using curl, the vault command client seems to convert integers and floats to strings.
To Reproduce
Run a vault server with the UI supported and enabled (e.g. macOS binary does not seem to contain it).
Run curl to upload some test data (no shell prompt included below for easier copy & paste):
Question is if it should be possible at all to upload non-string secret values; at the moment, they are silently accepted. Maybe the vault should reject them and have the HTTP request fail - or at least display a warning.
The text was updated successfully, but these errors were encountered:
Hi @z00m1n - thanks for the report! JSON with non-string values is considered a more "advanced" mode in the UI as the default UI assumes everything is a string. So the bug here was not disabling the JSON toggle when there were non-string values. I've fixed it in the linked PR.
Here's an example of inputing data in the default mode:
Bug Description
When uploading secrets JSON data with non-string secrets values (e.g. integer, float,
null
), the JSON switch at the top right of the<vault address>/ui/vault/secrets/secret/show/<location>
UI web page does not correctly switch between "raw" JSON data and key/value display with (secret) values being hidden; the switch seems to do nothing.This issue only occurs when uploading data using
curl
, thevault
command client seems to convert integers and floats to strings.To Reproduce
curl
to upload some test data (no shell prompt included below for easier copy & paste):Open the various secrets display pages in a web browser and try the JSON switch at the top right:
${VAULT_ADDR}/ui/vault/secrets/secret/show/test_string
: works as expected${VAULT_ADDR}/ui/vault/secrets/secret/show/test_integer
: switch does notthing${VAULT_ADDR}/ui/vault/secrets/secret/show/test_float
: switch does notthing${VAULT_ADDR}/ui/vault/secrets/secret/show/test_null
: switch does notthingExpected behavior
JSON switch should work for all test cases as it does for secrets strings.
Additional cosmetic bug
On
${VAULT_ADDR}/ui/vault/secrets/secret/list
secrets list page,test_null
is displayed astest_
.Environment:
Vault server configuration file(s):
Additional context
Question is if it should be possible at all to upload non-string secret values; at the moment, they are silently accepted. Maybe the vault should reject them and have the HTTP request fail - or at least display a warning.
The text was updated successfully, but these errors were encountered: