mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-27 15:23:52 +00:00
Change usages of RunningSha to RunningSha256 (#17266)
Some PRs got crossed and somehow these were missed in the build checks for #17182.
This commit is contained in:
committed by
GitHub
parent
cdb0d4967b
commit
8f4e78c57e
@@ -171,7 +171,7 @@ func (c *Core) enableCredentialInternal(ctx context.Context, entry *MountEntry,
|
|||||||
var backend logical.Backend
|
var backend logical.Backend
|
||||||
// Create the new backend
|
// Create the new backend
|
||||||
sysView := c.mountEntrySysView(entry)
|
sysView := c.mountEntrySysView(entry)
|
||||||
backend, entry.RunningSha, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
backend, entry.RunningSha256, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -795,7 +795,7 @@ func (c *Core) setupCredentials(ctx context.Context) error {
|
|||||||
// Initialize the backend
|
// Initialize the backend
|
||||||
sysView := c.mountEntrySysView(entry)
|
sysView := c.mountEntrySysView(entry)
|
||||||
|
|
||||||
backend, entry.RunningSha, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
backend, entry.RunningSha256, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.logger.Error("failed to create credential entry", "path", entry.Path, "error", err)
|
c.logger.Error("failed to create credential entry", "path", entry.Path, "error", err)
|
||||||
plug, plugerr := c.pluginCatalog.Get(ctx, entry.Type, consts.PluginTypeCredential, "")
|
plug, plugerr := c.pluginCatalog.Get(ctx, entry.Type, consts.PluginTypeCredential, "")
|
||||||
|
|||||||
@@ -277,8 +277,8 @@ func TestCore_EnableExternalPlugin_MultipleVersions(t *testing.T) {
|
|||||||
t.Errorf("Expected mount to have no running version but got %s", raw.(*routeEntry).mountEntry.RunningVersion)
|
t.Errorf("Expected mount to have no running version but got %s", raw.(*routeEntry).mountEntry.RunningVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
if raw.(*routeEntry).mountEntry.RunningSha == "" {
|
if raw.(*routeEntry).mountEntry.RunningSha256 == "" {
|
||||||
t.Errorf("Expected RunningSha to be present: %+v", raw.(*routeEntry).mountEntry.RunningSha)
|
t.Errorf("Expected RunningSha256 to be present: %+v", raw.(*routeEntry).mountEntry.RunningSha256)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ func (c *Core) mountInternal(ctx context.Context, entry *MountEntry, updateStora
|
|||||||
var backend logical.Backend
|
var backend logical.Backend
|
||||||
sysView := c.mountEntrySysView(entry)
|
sysView := c.mountEntrySysView(entry)
|
||||||
|
|
||||||
backend, entry.RunningSha, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
backend, entry.RunningSha256, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -1420,7 +1420,7 @@ func (c *Core) setupMounts(ctx context.Context) error {
|
|||||||
var backend logical.Backend
|
var backend logical.Backend
|
||||||
// Create the new backend
|
// Create the new backend
|
||||||
sysView := c.mountEntrySysView(entry)
|
sysView := c.mountEntrySysView(entry)
|
||||||
backend, entry.RunningSha, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
backend, entry.RunningSha256, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.logger.Error("failed to create mount entry", "path", entry.Path, "error", err)
|
c.logger.Error("failed to create mount entry", "path", entry.Path, "error", err)
|
||||||
if !c.builtinRegistry.Contains(entry.Type, consts.PluginTypeSecrets) {
|
if !c.builtinRegistry.Contains(entry.Type, consts.PluginTypeSecrets) {
|
||||||
|
|||||||
@@ -174,12 +174,12 @@ func (c *Core) reloadBackendCommon(ctx context.Context, entry *MountEntry, isAut
|
|||||||
}
|
}
|
||||||
|
|
||||||
var backend logical.Backend
|
var backend logical.Backend
|
||||||
oldSha := entry.RunningSha
|
oldSha := entry.RunningSha256
|
||||||
if !isAuth {
|
if !isAuth {
|
||||||
// Dispense a new backend
|
// Dispense a new backend
|
||||||
backend, entry.RunningSha, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
backend, entry.RunningSha256, err = c.newLogicalBackend(ctx, entry, sysView, view)
|
||||||
} else {
|
} else {
|
||||||
backend, entry.RunningSha, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
backend, entry.RunningSha256, err = c.newCredentialBackend(ctx, entry, sysView, view)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -189,7 +189,7 @@ func (c *Core) reloadBackendCommon(ctx context.Context, entry *MountEntry, isAut
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update the mount table since we changed the runningSha
|
// update the mount table since we changed the runningSha
|
||||||
if oldSha != entry.RunningSha && MountTableUpdateStorage {
|
if oldSha != entry.RunningSha256 && MountTableUpdateStorage {
|
||||||
if isAuth {
|
if isAuth {
|
||||||
err = c.persistAuth(ctx, c.auth, &entry.Local)
|
err = c.persistAuth(ctx, c.auth, &entry.Local)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user