mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-03 22:02:19 -04:00
Add seal type to seal-status output. (#3516)
This commit is contained in:
parent
972834a610
commit
962ef74cb2
3 changed files with 6 additions and 1 deletions
|
|
@ -49,6 +49,7 @@ func sealStatusRequest(c *Sys, r *Request) (*SealStatusResponse, error) {
|
|||
}
|
||||
|
||||
type SealStatusResponse struct {
|
||||
Type string `json:"type"`
|
||||
Sealed bool `json:"sealed"`
|
||||
T int `json:"t"`
|
||||
N int `json:"n"`
|
||||
|
|
|
|||
|
|
@ -36,12 +36,14 @@ func (c *StatusCommand) Run(args []string) int {
|
|||
}
|
||||
|
||||
outStr := fmt.Sprintf(
|
||||
"Sealed: %v\n"+
|
||||
"Type: %s\n"+
|
||||
"Sealed: %v\n"+
|
||||
"Key Shares: %d\n"+
|
||||
"Key Threshold: %d\n"+
|
||||
"Unseal Progress: %d\n"+
|
||||
"Unseal Nonce: %v\n"+
|
||||
"Version: %s",
|
||||
sealStatus.Type,
|
||||
sealStatus.Sealed,
|
||||
sealStatus.N,
|
||||
sealStatus.T,
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ func handleSysSealStatusRaw(core *vault.Core, w http.ResponseWriter, r *http.Req
|
|||
progress, nonce := core.SecretProgress()
|
||||
|
||||
respondOk(w, &SealStatusResponse{
|
||||
Type: sealConfig.Type,
|
||||
Sealed: sealed,
|
||||
T: sealConfig.SecretThreshold,
|
||||
N: sealConfig.SecretShares,
|
||||
|
|
@ -202,6 +203,7 @@ func handleSysSealStatusRaw(core *vault.Core, w http.ResponseWriter, r *http.Req
|
|||
}
|
||||
|
||||
type SealStatusResponse struct {
|
||||
Type string `json:"type"`
|
||||
Sealed bool `json:"sealed"`
|
||||
T int `json:"t"`
|
||||
N int `json:"n"`
|
||||
|
|
|
|||
Loading…
Reference in a new issue