vault/audit/backend_config_ce.go
Peter Wilson 1d67c3f3b4
Audit: move validation of audit related options for Enterprise/CE to audit package (#26575)
* move option validation for enterprise options to audit package from vault package

* remove commented lines

* remove blank line
2024-04-22 15:39:52 +00:00

19 lines
433 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
//go:build !enterprise
package audit
import "fmt"
// validate ensures that this if we're not running Vault Enterprise, we cannot
// supply Enterprise-only audit configuration options.
func (c *BackendConfig) validate() error {
if HasInvalidOptions(c.Config) {
return fmt.Errorf("enterprise-only options supplied: %w", ErrExternalOptions)
}
return nil
}