mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 20:36:26 +02:00
Remove some no longer used ent init hooks. (#23704)
This commit is contained in:
parent
5e735af0c3
commit
0df48451f4
@ -64,9 +64,6 @@ import (
|
||||
// Thus, rather than creating multiple instances of it, we only need one.
|
||||
var Registry = newRegistry()
|
||||
|
||||
// TODO remove once entAddExtPlugins is implemented in ENT
|
||||
var addExternalPlugins = addExtPluginsImpl
|
||||
|
||||
// BuiltinFactory is the func signature that should be returned by
|
||||
// the plugin's New() func.
|
||||
type BuiltinFactory func() (interface{}, error)
|
||||
|
||||
17
http/util.go
17
http/util.go
@ -20,22 +20,7 @@ import (
|
||||
"github.com/hashicorp/vault/vault/quotas"
|
||||
)
|
||||
|
||||
var (
|
||||
// TODO remove once entWrapGenericHandler is implemented in ENT
|
||||
genericWrapping = func(core *vault.Core, in http.Handler, props *vault.HandlerProperties) http.Handler {
|
||||
// Wrap the help wrapped handler with another layer with a generic
|
||||
// handler
|
||||
return wrapGenericHandler(core, in, props)
|
||||
}
|
||||
|
||||
// TODO remove once entAdditionalRoutes is implemented in ENT
|
||||
additionalRoutes = func(mux *http.ServeMux, core *vault.Core) {}
|
||||
|
||||
nonVotersAllowed = false
|
||||
|
||||
// TODO remove once entAdjustResponse is implemented in ENT
|
||||
adjustResponse = func(core *vault.Core, w http.ResponseWriter, req *logical.Request) {}
|
||||
)
|
||||
var nonVotersAllowed = false
|
||||
|
||||
func rateLimitQuotaWrapping(handler http.Handler, core *vault.Core) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
@ -162,48 +162,6 @@ var (
|
||||
// step down of the active node, to prevent instantly regrabbing the lock.
|
||||
// It's var not const so that tests can manipulate it.
|
||||
manualStepDownSleepPeriod = 10 * time.Second
|
||||
|
||||
// Functions only in the Enterprise version
|
||||
// TODO remove once entPostUnseal is implemented in ENT
|
||||
enterprisePostUnseal = enterprisePostUnsealImpl
|
||||
// TODO remove once entPreSeal is implemented in ENT
|
||||
enterprisePreSeal = enterprisePreSealImpl
|
||||
// TODO remove once entSetupFilteredPaths is implemented in ENT
|
||||
enterpriseSetupFilteredPaths = enterpriseSetupFilteredPathsImpl
|
||||
// TODO remove once entSetupQuotas is implemented in ENT
|
||||
enterpriseSetupQuotas = enterpriseSetupQuotasImpl
|
||||
// TODO remove once entSetupAPILock is implemented in ENT
|
||||
enterpriseSetupAPILock = setupAPILockImpl
|
||||
// TODO remove once entStartReplication is implemented in ENT
|
||||
startReplication = startReplicationImpl
|
||||
// TODO remove once entStopReplication is implemented in ENT
|
||||
stopReplication = stopReplicationImpl
|
||||
// TODO remove once EntLastWAL is implemented in ENT
|
||||
LastWAL = lastWALImpl
|
||||
// TODO remove once EntLastPerformanceWAL is implemented in ENT
|
||||
LastPerformanceWAL = lastPerformanceWALImpl
|
||||
// TODO remove once EntLastDRWAL is implemented in ENT
|
||||
LastDRWAL = lastDRWALImpl
|
||||
// TODO remove once EntPerformanceMerkleRoot is implemented in ENT
|
||||
PerformanceMerkleRoot = merkleRootImpl
|
||||
// TODO remove once EntDRMerkleRoot is implemented in ENT
|
||||
DRMerkleRoot = merkleRootImpl
|
||||
// TODO remove once EntLastRemoteWAL is implemented in ENT
|
||||
LastRemoteWAL = lastRemoteWALImpl
|
||||
// TODO remove once entLastRemoteUpstreamWAL is implemented in ENT
|
||||
LastRemoteUpstreamWAL = lastRemoteUpstreamWALImpl
|
||||
// TODO remove once EntWaitUntilWALShipped is implemented in ENT
|
||||
WaitUntilWALShipped = waitUntilWALShippedImpl
|
||||
// TODO remove once entCheckStoredLicense is implemented in ENT
|
||||
storedLicenseCheck = func(c *Core, conf *CoreConfig) error { return nil }
|
||||
// TODO remove once entIsLicenseAutoloaded is implemented in ENT
|
||||
LicenseAutoloaded = func(*Core) bool { return false }
|
||||
// TODO remove once entCheckLicenseInit is implemented in ENT
|
||||
LicenseInitCheck = func(*Core) error { return nil }
|
||||
// TODO remove once EntGetLicenseState is implemented in ENT
|
||||
LicenseSummary = func(*Core) (*LicenseState, error) { return nil, nil }
|
||||
// TODO remove once EntReloadLicense is implemented in ENT
|
||||
LicenseReload = func(*Core) error { return nil }
|
||||
)
|
||||
|
||||
// NonFatalError is an error that can be returned during NewCore that should be
|
||||
@ -2758,32 +2716,6 @@ func (c *Core) preSeal() error {
|
||||
return result
|
||||
}
|
||||
|
||||
func enterprisePostUnsealImpl(c *Core, isStandby bool) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func enterprisePreSealImpl(c *Core) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func enterpriseSetupFilteredPathsImpl(c *Core) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func enterpriseSetupQuotasImpl(ctx context.Context, c *Core) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func startReplicationImpl(c *Core) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func stopReplicationImpl(c *Core) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func setupAPILockImpl(_ *Core, _ context.Context) error { return nil }
|
||||
|
||||
func (c *Core) ReplicationState() consts.ReplicationState {
|
||||
return consts.ReplicationState(atomic.LoadUint32(c.replicationState))
|
||||
}
|
||||
@ -2815,34 +2747,6 @@ func (c *Core) AuditedHeadersConfig() *AuditedHeadersConfig {
|
||||
return c.auditedHeaders
|
||||
}
|
||||
|
||||
func waitUntilWALShippedImpl(ctx context.Context, c *Core, index uint64) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func merkleRootImpl(c *Core) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func lastWALImpl(c *Core) uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func lastPerformanceWALImpl(c *Core) uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func lastDRWALImpl(c *Core) uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func lastRemoteWALImpl(c *Core) uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func lastRemoteUpstreamWALImpl(c *Core) uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// physicalBarrierSealConfig reads the storage entry at configPath and parses and validates it as SealConfig.
|
||||
func physicalSealConfig(ctx context.Context, c *Core, label, configPath string) (*SealConfig, error) {
|
||||
pe, err := c.physical.Get(ctx, configPath)
|
||||
|
||||
@ -40,8 +40,6 @@ type InitResult struct {
|
||||
}
|
||||
|
||||
var (
|
||||
// TODO remove once entInitWALPassThrough is implemented in ENT
|
||||
initPTFunc = func(c *Core) func() { return nil }
|
||||
initInProgress uint32
|
||||
ErrInitWithoutAutoloading = errors.New("cannot initialize storage without an autoloaded license")
|
||||
)
|
||||
|
||||
@ -55,11 +55,6 @@ var (
|
||||
ErrNoApplicablePolicies = errors.New("no applicable policies")
|
||||
|
||||
egpDebugLogging bool
|
||||
|
||||
// if this returns an error, the request should be blocked and the error
|
||||
// should be returned to the client
|
||||
// TODO remove once entBlockRequestIfError is implemented in ENT
|
||||
enterpriseBlockRequestIfError = blockRequestIfErrorImpl
|
||||
)
|
||||
|
||||
// HandlerProperties is used to seed configuration into a vaulthttp.Handler.
|
||||
@ -2202,8 +2197,6 @@ func (c *Core) buildMfaEnforcementResponse(eConfig *mfa.MFAEnforcementConfig) (*
|
||||
return mfaAny, nil
|
||||
}
|
||||
|
||||
func blockRequestIfErrorImpl(_ *Core, _, _ string) error { return nil }
|
||||
|
||||
// RegisterAuth uses a logical.Auth object to create a token entry in the token
|
||||
// store, and registers a corresponding token lease to the expiration manager.
|
||||
// role is the login role used as part of the creation of the token entry. If not
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user