mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 04:16:31 +02:00
Fixed wrong rekey recovery backup client API URL (#6841)
* Fixed wrong rekey recovery backup client API URL * Fixed wrong rekey recovery backup client API URL delete * Changed output for recovery backup key delete
This commit is contained in:
parent
f06bfa3087
commit
37f4b65962
@ -234,7 +234,7 @@ func (c *Sys) RekeyRetrieveBackup() (*RekeyRetrieveResponse, error) {
|
||||
}
|
||||
|
||||
func (c *Sys) RekeyRetrieveRecoveryBackup() (*RekeyRetrieveResponse, error) {
|
||||
r := c.c.NewRequest("GET", "/v1/sys/rekey/recovery-backup")
|
||||
r := c.c.NewRequest("GET", "/v1/sys/rekey/recovery-key-backup")
|
||||
|
||||
ctx, cancelFunc := context.WithCancel(context.Background())
|
||||
defer cancelFunc()
|
||||
@ -275,7 +275,7 @@ func (c *Sys) RekeyDeleteBackup() error {
|
||||
}
|
||||
|
||||
func (c *Sys) RekeyDeleteRecoveryBackup() error {
|
||||
r := c.c.NewRequest("DELETE", "/v1/sys/rekey/recovery-backup")
|
||||
r := c.c.NewRequest("DELETE", "/v1/sys/rekey/recovery-key-backup")
|
||||
|
||||
ctx, cancelFunc := context.WithCancel(context.Background())
|
||||
defer cancelFunc()
|
||||
|
||||
@ -685,12 +685,22 @@ func (c *OperatorRekeyCommand) printUnsealKeys(client *api.Client, status *api.R
|
||||
|
||||
if len(resp.PGPFingerprints) > 0 && resp.Backup {
|
||||
c.UI.Output("")
|
||||
c.UI.Output(wrapAtLength(fmt.Sprintf(
|
||||
"The encrypted unseal keys are backed up to \"core/unseal-keys-backup\"" +
|
||||
"in the storage backend. Remove these keys at any time using " +
|
||||
"\"vault operator rekey -backup-delete\". Vault does not automatically " +
|
||||
"remove these keys.",
|
||||
)))
|
||||
switch strings.ToLower(strings.TrimSpace(c.flagTarget)) {
|
||||
case "barrier":
|
||||
c.UI.Output(wrapAtLength(fmt.Sprintf(
|
||||
"The encrypted unseal keys are backed up to \"core/unseal-keys-backup\" " +
|
||||
"in the storage backend. Remove these keys at any time using " +
|
||||
"\"vault operator rekey -backup-delete\". Vault does not automatically " +
|
||||
"remove these keys.",
|
||||
)))
|
||||
case "recovery", "hsm":
|
||||
c.UI.Output(wrapAtLength(fmt.Sprintf(
|
||||
"The encrypted unseal keys are backed up to \"core/recovery-keys-backup\" " +
|
||||
"in the storage backend. Remove these keys at any time using " +
|
||||
"\"vault operator rekey -backup-delete -target=recovery\". Vault does not automatically " +
|
||||
"remove these keys.",
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
||||
switch status.VerificationRequired {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user