Add stub enterprise logical system backend and init (#26712)

This is used so that Enterprise code can do
additional initialization and store additional
state in the logical `SystemBackend`.
This commit is contained in:
Christopher Swenson
2024-05-02 08:46:50 -07:00
committed by GitHub
parent 7a10a095a2
commit e7ada1e35c
2 changed files with 6 additions and 0 deletions

View File

@@ -248,6 +248,7 @@ func NewSystemBackend(core *Core, logger log.Logger, config *logical.BackendConf
b.Backend.Invalidate = sysInvalidate(b)
b.Backend.InitializeFunc = sysInitialize(b)
b.Backend.Clean = sysClean(b)
b.entInit()
return b
}
@@ -267,6 +268,7 @@ func (b *SystemBackend) rawPaths() []*framework.Path {
// prefix. Conceptually it is similar to procfs on Linux.
type SystemBackend struct {
*framework.Backend
entSystemBackend
Core *Core
db *memdb.MemDB
logger log.Logger

View File

@@ -7,6 +7,10 @@ package vault
//go:generate go run github.com/hashicorp/vault/tools/stubmaker
type entSystemBackend struct{}
func entUnauthenticatedPaths() []string {
return []string{}
}
func (s *SystemBackend) entInit() {}