mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Check ErrPluginStaticUnsupported for fallback to RotateRootCredentials (#11585)
This commit is contained in:
@@ -152,7 +152,7 @@ func (d databaseVersionWrapper) changePasswordLegacy(ctx context.Context, userna
|
||||
err = d.changeUserPasswordLegacy(ctx, username, passwordChange)
|
||||
|
||||
// If changing the root user's password but SetCredentials is unimplemented, fall back to RotateRootCredentials
|
||||
if isRootUser && status.Code(err) == codes.Unimplemented {
|
||||
if isRootUser && (err == v4.ErrPluginStaticUnsupported || status.Code(err) == codes.Unimplemented) {
|
||||
saveConfig, err = d.changeRootUserPasswordLegacy(ctx, passwordChange)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user