mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
VAULT-24013: Audit regression attempting to recover from panic (#25605)
* Add Logger to BackendConfig * EntryFormatter use logger and recover panics * Added TODO to consider * Add 'name' to entry formatter * Add test for the panic * Fix NoopAudit with update params * emit counter metric even when 0 * Fix vault package tests * changelog * Remove old comment during test writing
This commit is contained in:
@@ -6,6 +6,7 @@ package audit
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/vault/internal/observability/event"
|
||||
"github.com/hashicorp/vault/sdk/helper/salt"
|
||||
"github.com/hashicorp/vault/sdk/logical"
|
||||
@@ -231,6 +232,9 @@ type BackendConfig struct {
|
||||
|
||||
// MountPath is the path where this Backend is mounted
|
||||
MountPath string
|
||||
|
||||
// Logger is used to emit log messages usually captured in the server logs.
|
||||
Logger hclog.Logger
|
||||
}
|
||||
|
||||
// Factory is the factory function to create an audit backend.
|
||||
|
||||
Reference in New Issue
Block a user