add error message when trying to rotate mssql root without password in configuration (#19103)
* add error message when trying to rotate mssql root without password in configuration * add changelog
This commit is contained in:
parent
1b4bbe2b5b
commit
08ef61cc00
|
@ -74,6 +74,11 @@ func (b *databaseBackend) pathRotateRootCredentialsUpdate() framework.OperationF
|
|||
return nil, fmt.Errorf("unable to rotate root credentials: no username in configuration")
|
||||
}
|
||||
|
||||
rootPassword, ok := config.ConnectionDetails["password"].(string)
|
||||
if !ok || rootPassword == "" {
|
||||
return nil, fmt.Errorf("unable to rotate root credentials: no password in configuration")
|
||||
}
|
||||
|
||||
dbi, err := b.GetConnection(ctx, req.Storage, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
secrets/database: Adds error message requiring password on root crednetial rotation.
|
||||
```
|
Loading…
Reference in New Issue