mirror of https://github.com/poanetwork/quorum.git
Rename StorePrivateKeys config option to UnlockAll
This commit is contained in:
parent
16d286042d
commit
3880653d9c
|
@ -12,13 +12,13 @@ type HashicorpWalletConfig struct {
|
|||
}
|
||||
|
||||
type HashicorpClientConfig struct {
|
||||
Url string `toml:",omitempty"`
|
||||
Approle string `toml:",omitempty"`
|
||||
CaCert string `toml:",omitempty"`
|
||||
ClientCert string `toml:",omitempty"`
|
||||
ClientKey string `toml:",omitempty"`
|
||||
StorePrivateKeys bool `toml:",omitempty"`
|
||||
VaultPollingIntervalMillis int `toml:",omitempty"`
|
||||
Url string `toml:",omitempty"`
|
||||
Approle string `toml:",omitempty"`
|
||||
CaCert string `toml:",omitempty"`
|
||||
ClientCert string `toml:",omitempty"`
|
||||
ClientKey string `toml:",omitempty"`
|
||||
UnlockAll bool `toml:",omitempty"`
|
||||
VaultPollingIntervalMillis int `toml:",omitempty"`
|
||||
}
|
||||
|
||||
type HashicorpSecretConfig struct {
|
||||
|
|
|
@ -190,7 +190,7 @@ func (h *hashicorpService) open() error {
|
|||
|
||||
go h.accountRetrievalLoop(time.NewTicker(d))
|
||||
|
||||
if h.config.StorePrivateKeys {
|
||||
if h.config.UnlockAll {
|
||||
go h.privateKeyRetrievalLoop(time.NewTicker(d))
|
||||
}
|
||||
|
||||
|
|
|
@ -912,9 +912,9 @@ func TestVaultWallet_Open_Hashicorp_PrivateKeysRetrievedIndefinitelyWhenEnabled(
|
|||
t.Run(name, func(t *testing.T) {
|
||||
wltConfig := HashicorpWalletConfig{
|
||||
Client: HashicorpClientConfig{
|
||||
Url: vaultServer.URL,
|
||||
Url: vaultServer.URL,
|
||||
VaultPollingIntervalMillis: 1,
|
||||
StorePrivateKeys: true,
|
||||
UnlockAll: true,
|
||||
},
|
||||
Secrets: tt.secrets,
|
||||
}
|
||||
|
@ -1029,9 +1029,9 @@ func TestVaultWallet_Open_Hashicorp_PrivateKeysRetrievedWhenEnabledAndVaultAvail
|
|||
// use an incorrect vault url to simulate an inaccessible vault
|
||||
wltConfig := HashicorpWalletConfig{
|
||||
Client: HashicorpClientConfig{
|
||||
Url: "http://incorrecturl:1",
|
||||
Url: "http://incorrecturl:1",
|
||||
VaultPollingIntervalMillis: 1,
|
||||
StorePrivateKeys: tt.storePrivateKeys,
|
||||
UnlockAll: tt.storePrivateKeys,
|
||||
},
|
||||
Secrets: []HashicorpSecretConfig{
|
||||
{PrivateKeySecret: "sec1", PrivateKeySecretVersion: 1, SecretEngine: "kv"},
|
||||
|
@ -1140,9 +1140,9 @@ func TestVaultWallet_Open_Hashicorp_RetrievalLoopsStopWhenAllSecretsRetrieved(t
|
|||
|
||||
wltConfig := HashicorpWalletConfig{
|
||||
Client: HashicorpClientConfig{
|
||||
Url: vaultServer.URL,
|
||||
Url: vaultServer.URL,
|
||||
VaultPollingIntervalMillis: 1,
|
||||
StorePrivateKeys: true,
|
||||
UnlockAll: true,
|
||||
},
|
||||
Secrets: []HashicorpSecretConfig{makeSecret(addrName, keyName)},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue