mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
OSS portion of wrapper-v2 (#16811)
* OSS portion of wrapper-v2 * Prefetch barrier type to avoid encountering an error in the simple BarrierType() getter * Rename the OveriddenType to WrapperType and use it for the barrier type prefetch * Fix unit test
This commit is contained in:
@@ -593,7 +593,7 @@ func (c *AgentCommand) Run(args []string) int {
|
||||
c.UI.Warn(fmt.Sprintf("Failed to close persistent cache file after getting retrieval token: %s", err))
|
||||
}
|
||||
|
||||
km, err := keymanager.NewPassthroughKeyManager(token)
|
||||
km, err := keymanager.NewPassthroughKeyManager(ctx, token)
|
||||
if err != nil {
|
||||
c.UI.Error(fmt.Sprintf("failed to configure persistence encryption for cache: %s", err))
|
||||
return 1
|
||||
@@ -657,7 +657,7 @@ func (c *AgentCommand) Run(args []string) int {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
km, err := keymanager.NewPassthroughKeyManager(nil)
|
||||
km, err := keymanager.NewPassthroughKeyManager(ctx, nil)
|
||||
if err != nil {
|
||||
c.UI.Error(fmt.Sprintf("failed to configure persistence encryption for cache: %s", err))
|
||||
return 1
|
||||
@@ -675,7 +675,7 @@ func (c *AgentCommand) Run(args []string) int {
|
||||
cacheLogger.Info("configured persistent storage", "path", config.Cache.Persist.Path)
|
||||
|
||||
// Stash the key material in bolt
|
||||
token, err := km.RetrievalToken()
|
||||
token, err := km.RetrievalToken(ctx)
|
||||
if err != nil {
|
||||
c.UI.Error(fmt.Sprintf("Error getting persistent key: %s", err))
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user