mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-20 00:13:53 -05:00
CE Changes for VAULT-38180 (#31296)
* CE Changes for VAULT-38180 * whoopsie * whoopsie 2
This commit is contained in:
parent
c948ec09af
commit
e6a5b2fc8a
2 changed files with 14 additions and 10 deletions
|
|
@ -1052,13 +1052,18 @@ func (c *Core) newCredentialBackend(ctx context.Context, entry *MountEntry, sysV
|
|||
return nil, err
|
||||
}
|
||||
|
||||
pluginRunningVersion := pluginVersion
|
||||
if pluginRunningVersion == "" && runningSha == "" {
|
||||
pluginRunningVersion = versions.GetBuiltinVersion(consts.PluginTypeCredential, entry.Type)
|
||||
}
|
||||
|
||||
pluginObservationRecorder, err := c.observations.WithPlugin(entry.namespace, &logical.ObservationPluginInfo{
|
||||
MountClass: consts.PluginTypeCredential.String(),
|
||||
MountAccessor: entry.Accessor,
|
||||
MountPath: entry.Path,
|
||||
Plugin: entry.Type,
|
||||
PluginVersion: pluginVersion,
|
||||
RunningPluginVersion: entry.RunningVersion,
|
||||
RunningPluginVersion: pluginRunningVersion,
|
||||
Version: entry.Options["version"],
|
||||
Local: entry.Local,
|
||||
})
|
||||
|
|
@ -1081,11 +1086,8 @@ func (c *Core) newCredentialBackend(ctx context.Context, entry *MountEntry, sysV
|
|||
return nil, err
|
||||
}
|
||||
if backend != nil {
|
||||
entry.RunningVersion = pluginVersion
|
||||
entry.RunningVersion = pluginRunningVersion
|
||||
entry.RunningSha256 = runningSha
|
||||
if entry.RunningVersion == "" && entry.RunningSha256 == "" {
|
||||
entry.RunningVersion = versions.GetBuiltinVersion(consts.PluginTypeCredential, entry.Type)
|
||||
}
|
||||
}
|
||||
|
||||
return backend, nil
|
||||
|
|
|
|||
|
|
@ -1788,13 +1788,18 @@ func (c *Core) newLogicalBackend(ctx context.Context, entry *MountEntry, sysView
|
|||
return nil, err
|
||||
}
|
||||
|
||||
pluginRunningVersion := pluginVersion
|
||||
if pluginRunningVersion == "" && runningSha == "" {
|
||||
pluginRunningVersion = versions.GetBuiltinVersion(consts.PluginTypeSecrets, entry.Type)
|
||||
}
|
||||
|
||||
pluginObservationRecorder, err := c.observations.WithPlugin(entry.namespace, &logical.ObservationPluginInfo{
|
||||
MountClass: consts.PluginTypeSecrets.String(),
|
||||
MountAccessor: entry.Accessor,
|
||||
MountPath: entry.Path,
|
||||
Plugin: entry.Type,
|
||||
PluginVersion: pluginVersion,
|
||||
RunningPluginVersion: entry.RunningVersion,
|
||||
RunningPluginVersion: pluginRunningVersion,
|
||||
Version: entry.Options["version"],
|
||||
Local: entry.Local,
|
||||
})
|
||||
|
|
@ -1822,11 +1827,8 @@ func (c *Core) newLogicalBackend(ctx context.Context, entry *MountEntry, sysView
|
|||
return nil, fmt.Errorf("nil backend of type %q returned from factory", t)
|
||||
}
|
||||
|
||||
entry.RunningVersion = pluginVersion
|
||||
entry.RunningVersion = pluginRunningVersion
|
||||
entry.RunningSha256 = runningSha
|
||||
if entry.RunningVersion == "" && entry.RunningSha256 == "" {
|
||||
entry.RunningVersion = versions.GetBuiltinVersion(consts.PluginTypeSecrets, entry.Type)
|
||||
}
|
||||
addLicenseCallback(c, backend)
|
||||
|
||||
return backend, nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue