Skip to content

Commit

Permalink
backport of commit b3a4ddf (#19158)
Browse files Browse the repository at this point in the history
Co-authored-by: Ellie <ellie.sterner@hashicorp.com>
  • Loading branch information
1 parent 19c4476 commit 47be768
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions builtin/logical/database/path_rotate_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,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
Expand Down
3 changes: 3 additions & 0 deletions changelog/19103.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
secrets/database: Adds error message requiring password on root crednetial rotation.
```

0 comments on commit 47be768

Please sign in to comment.