DB engine: Check ErrPluginStaticUnsupported in rollback code (#11601)
This commit is contained in:
parent
8b7cd1bff7
commit
b27a3e9f70
|
@ -4,6 +4,8 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/hashicorp/vault/sdk/database/dbplugin"
|
||||
|
||||
v5 "github.com/hashicorp/vault/sdk/database/dbplugin/v5"
|
||||
"github.com/hashicorp/vault/sdk/logical"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
|
@ -104,7 +106,7 @@ func (b *databaseBackend) rollbackDatabaseCredentials(ctx context.Context, confi
|
|||
// It actually is the root user here, but we only want to use SetCredentials since
|
||||
// RotateRootCredentials doesn't give any control over what password is used
|
||||
_, err = dbi.database.UpdateUser(ctx, updateReq, false)
|
||||
if status.Code(err) == codes.Unimplemented {
|
||||
if status.Code(err) == codes.Unimplemented || err == dbplugin.ErrPluginStaticUnsupported {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
secrets/database: Fixes issue for V4 database interface where `SetCredentials` wasn't falling back to using `RotateRootCredentials` if `SetCredentials` is `Unimplemented`
|
||||
```
|
Loading…
Reference in New Issue