Integrate password policies into RabbitMQ secret engine (#9143)

* Add password policies to RabbitMQ & update docs
* Also updates some parts of the password policies to aid/fix testing
This commit is contained in:
Michael Golowka
2020-06-11 16:08:20 -06:00
committed by GitHub
parent 8cabb11b48
commit b2441efd37
13 changed files with 262 additions and 79 deletions

View File

@@ -53,7 +53,12 @@ func (b *backend) pathCredsRead(ctx context.Context, req *logical.Request, d *fr
}
username := fmt.Sprintf("%s-%s", req.DisplayName, uuidVal)
password, err := uuid.GenerateUUID()
config, err := readConfig(ctx, req.Storage)
if err != nil {
return nil, fmt.Errorf("unable to read configuration: %w", err)
}
password, err := b.generatePassword(ctx, config.PasswordPolicy)
if err != nil {
return nil, err
}