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

Backport of Vault 9800 Fix vault read handling for endpoints with no top-level data object into release/1.11.x #19615

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #17913 to be assessed for backporting due to the inclusion of the label backport/1.11.x.

The below text is copied from the body of the original PR.


https://hashicorp.atlassian.net/browse/VAULT-9800
The response bodies for the sys/health and sys/leader endpoints do not include a top-level data object. The vault read command expects this top-level field unless -format=raw (a recent addition) is used. It is entirely possible that issue exists for other endpoints and solving for these two likely solves for all.

Issue:
vault read sys/health -format=json
{
"request_id": "",
"lease_id": "",
"lease_duration": 0,
"renewable": false,
"data": null,
"warnings": null
}
vault read sys/health
(No response)

Sample response:
vault read sys/health
Key Value


cluster_id 9501c424-662b-01ef-c5f0-0f7a2e48575d
cluster_name vault-cluster-3d7e0d93
initialized true
performance_standby false
replication_dr_mode disabled
replication_performance_mode disabled
sealed false
server_time_utc 1668198854
standby false
version 1.13.0-dev1

vault read sys/health -format=json
{
"request_id": "",
"lease_id": "",
"lease_duration": 0,
"renewable": false,
"data": {
"cluster_id": "9501c424-662b-01ef-c5f0-0f7a2e48575d",
"cluster_name": "vault-cluster-3d7e0d93",
"initialized": true,
"performance_standby": false,
"replication_dr_mode": "disabled",
"replication_performance_mode": "disabled",
"sealed": false,
"server_time_utc": 1668198684,
"standby": false,
"version": "1.13.0-dev1"
},
"warnings": null
}


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/vault-9800FixVaultReadEndpoints/literally-natural-wren branch from 835123a to 0444742 Compare March 17, 2023 18:15
@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/vault-9800FixVaultReadEndpoints/literally-natural-wren branch from ad5a8e9 to 3995d4a Compare March 17, 2023 18:15
@cipherboy cipherboy enabled auto-merge (squash) March 17, 2023 18:16
@cipherboy cipherboy merged commit 0efb741 into release/1.11.x Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants