diff --git a/api/sys_plugins.go b/api/sys_plugins.go index 43bac07698..f83bdb56f2 100644 --- a/api/sys_plugins.go +++ b/api/sys_plugins.go @@ -36,6 +36,8 @@ type ListPluginsResponse struct { type PluginDetails struct { Type string `json:"type"` Name string `json:"name"` + OCIImage string `json:"oci_image,omitempty" mapstructure:"oci_image"` + Runtime string `json:"runtime,omitempty"` Version string `json:"version,omitempty"` Builtin bool `json:"builtin"` DeprecationStatus string `json:"deprecation_status,omitempty" mapstructure:"deprecation_status"` diff --git a/command/plugin_list.go b/command/plugin_list.go index ccc09640c8..a325264eaf 100644 --- a/command/plugin_list.go +++ b/command/plugin_list.go @@ -160,9 +160,9 @@ func (c *PluginListCommand) simpleResponse(plugins *api.ListPluginsResponse, plu } func (c *PluginListCommand) detailedResponse(plugins *api.ListPluginsResponse) []string { - out := []string{"Name | Type | Version | Deprecation Status"} + out := []string{"Name | Type | Version | Container | Deprecation Status"} for _, plugin := range plugins.Details { - out = append(out, fmt.Sprintf("%s | %s | %s | %s", plugin.Name, plugin.Type, plugin.Version, plugin.DeprecationStatus)) + out = append(out, fmt.Sprintf("%s | %s | %s | %v | %s", plugin.Name, plugin.Type, plugin.Version, plugin.OCIImage != "", plugin.DeprecationStatus)) } return out diff --git a/sdk/helper/pluginutil/runner.go b/sdk/helper/pluginutil/runner.go index 5f5b23b5ec..6102995ef5 100644 --- a/sdk/helper/pluginutil/runner.go +++ b/sdk/helper/pluginutil/runner.go @@ -131,6 +131,8 @@ type VersionedPlugin struct { Type string `json:"type"` // string instead of consts.PluginType so that we get the string form in API responses. Name string `json:"name"` Version string `json:"version"` + OCIImage string `json:"oci_image,omitempty"` + Runtime string `json:"runtime,omitempty"` SHA256 string `json:"sha256,omitempty"` Builtin bool `json:"builtin"` DeprecationStatus string `json:"deprecation_status,omitempty"` diff --git a/vault/logical_system.go b/vault/logical_system.go index b687ee87f8..a7f8203e71 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -467,6 +467,12 @@ func (b *SystemBackend) handlePluginCatalogUntypedList(ctx context.Context, _ *l "version": p.Version, "builtin": p.Builtin, } + if p.OCIImage != "" { + entry["oci_image"] = p.OCIImage + } + if p.Runtime != "" { + entry["runtime"] = p.Runtime + } if p.SHA256 != "" { entry["sha256"] = p.SHA256 } diff --git a/vault/plugin_catalog.go b/vault/plugin_catalog.go index 52d8dbc5a5..b6c9d499cc 100644 --- a/vault/plugin_catalog.go +++ b/vault/plugin_catalog.go @@ -1122,6 +1122,8 @@ func (c *PluginCatalog) listInternal(ctx context.Context, pluginType consts.Plug result = append(result, pluginutil.VersionedPlugin{ Name: plugin.Name, Type: plugin.Type.String(), + OCIImage: plugin.OCIImage, + Runtime: plugin.Runtime, Version: plugin.Version, SHA256: hex.EncodeToString(plugin.Sha256), SemanticVersion: semanticVersion,