mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
Log LDAP Rotations (#31401)
This commit is contained in:
parent
33132416cc
commit
36d873aae2
2 changed files with 11 additions and 0 deletions
|
|
@ -39,6 +39,14 @@ func pathConfigRotateRoot(b *backend) *framework.Path {
|
|||
|
||||
func (b *backend) pathConfigRotateRootUpdate(ctx context.Context, req *logical.Request, _ *framework.FieldData) (*logical.Response, error) {
|
||||
err := b.rotateRootCredential(ctx, req)
|
||||
if err != nil {
|
||||
// log here instead of inside the actual rotate call because the rotation manager also logs, so this is
|
||||
// the "equivalent" place for manual rotations.
|
||||
b.Logger().Error("failed to rotate root credential on user request", "path", req.Path, "error", err.Error())
|
||||
} else {
|
||||
// err is nil in this case
|
||||
b.Logger().Info("succesfully rotated root credential on user request", "path", req.Path)
|
||||
}
|
||||
var responseError responseError
|
||||
if errors.As(err, &responseError) {
|
||||
return logical.ErrorResponse(responseError.Error()), nil
|
||||
|
|
|
|||
3
changelog/31401.txt
Normal file
3
changelog/31401.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
auth/ldap: add explicit logging to rotations in ldap
|
||||
```
|
||||
Loading…
Reference in a new issue