a89f09802d
* Add password policies to RabbitMQ & update docs * Also updates some parts of the password policies to aid/fix testing
15 lines
314 B
Go
15 lines
314 B
Go
package rabbitmq
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hashicorp/vault/sdk/helper/base62"
|
|
)
|
|
|
|
func (b *backend) generatePassword(ctx context.Context, policyName string) (password string, err error) {
|
|
if policyName != "" {
|
|
return b.System().GeneratePasswordFromPolicy(ctx, policyName)
|
|
}
|
|
return base62.Random(36)
|
|
}
|