mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
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:
@@ -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
|
||||
|
||||
3
changelog/19103.txt
Normal file
3
changelog/19103.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:improvement
|
||||
secrets/database: Adds error message requiring password on root crednetial rotation.
|
||||
```
|
||||
Reference in New Issue
Block a user