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
Describe the bug
The command vault audit list -format json does not consistently return a valid JSON object; if there are no audits enabled, the returned result is simply a string. When trying to automate certain steps, always receiving a JSON object is mandatory.
To Reproduce
Steps to reproduce the behavior:
make sure no audits are enabled (vault audit disable ***)
run vault audit list -format json
you will see the following: No audit devices are enabled.
Expected behavior
I would expect to see an empty JSON object: {}
Environment:
Vault Server Version (retrieve with vault status):
# vault status
Key Value
--- -----
Seal Type shamir
Initialized true
Sealed false
Total Shares 5
Threshold 3
Version 1.1.2
Cluster Name vault-cluster-3e8e9591
Cluster ID 7110de04-06b4-e73d-c2ce-94ac9616cde6
HA Enabled false
* Audit listing with format json returns json, not a string
Fixes#6775
* list, kv list and namespace list with format json returns json, not a string
* Changed audit list return code to 2 which aligns with other list commands return codes
* Audit listing with format json returns json, not a string
Fixes#6775
* list, kv list and namespace list with format json returns json, not a string
* Changed audit list return code to 2 which aligns with other list commands return codes
Describe the bug
The command
vault audit list -format json
does not consistently return a valid JSON object; if there are no audits enabled, the returned result is simply a string. When trying to automate certain steps, always receiving a JSON object is mandatory.To Reproduce
Steps to reproduce the behavior:
vault audit disable ***
)vault audit list -format json
No audit devices are enabled.
Expected behavior
I would expect to see an empty JSON object:
{}
Environment:
vault status
):vault version
):Additional context
None
The text was updated successfully, but these errors were encountered: