Don't write salts in initialization, look up on demand (#2702)

This commit is contained in:
Jeff Mitchell
2017-05-09 17:51:09 -04:00
committed by GitHub
parent 254ed1f744
commit eb0e7cd0d2
22 changed files with 248 additions and 239 deletions

View File

@@ -21,9 +21,6 @@ func Factory(conf *logical.BackendConfig) (logical.Backend, error) {
type backend struct {
*framework.Backend
// Used during initialization to set the salt
view logical.Storage
// Lock to make changes to any of the backend's configuration endpoints.
configMutex sync.RWMutex
@@ -64,7 +61,6 @@ func Backend(conf *logical.BackendConfig) (*backend, error) {
// Setting the periodic func to be run once in an hour.
// If there is a real need, this can be made configurable.
tidyCooldownPeriod: time.Hour,
view: conf.StorageView,
EC2ClientsMap: make(map[string]map[string]*ec2.EC2),
IAMClientsMap: make(map[string]map[string]*iam.IAM),
}