mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Provide base64 keys in addition to hex encoded. (#1734)
* Provide base64 keys in addition to hex encoded. Accept these at unseal/rekey time. Also fix a bug where backup would not be honored when doing a rekey with no operation currently ongoing.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"log"
|
||||
@@ -489,8 +490,9 @@ func (c *ServerCommand) Run(args []string) int {
|
||||
" "+export+" VAULT_ADDR="+quote+"http://"+config.Listeners[0].Config["address"]+quote+"\n\n"+
|
||||
"The unseal key and root token are reproduced below in case you\n"+
|
||||
"want to seal/unseal the Vault or play with authentication.\n\n"+
|
||||
"Unseal Key: %s\nRoot Token: %s\n",
|
||||
"Unseal Key (hex) : %s\nUnseal Key (base64): %s\nRoot Token: %s\n",
|
||||
hex.EncodeToString(init.SecretShares[0]),
|
||||
base64.StdEncoding.EncodeToString(init.SecretShares[0]),
|
||||
init.RootToken,
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user