mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Support running plugins in isolated containers (#22712)
Implements running plugins in containers to give them some degree of isolation from the main Vault process and other plugins. It only supports running on Linux initially, where it is easiest to manage unix socket communication across the container boundary. Additionally * Adds -env arg to vault plugin register. * Don't return env from 'vault plugin info' Historically it's been omitted, and it could conceivably have secret information in it, so if we want to return it in the response, it should probably only be via explicit opt-in. Skipping for now though as it's not the main purpose of the commit.
This commit is contained in:
@@ -144,6 +144,7 @@ type GetPluginResponse struct {
|
||||
Args []string `json:"args"`
|
||||
Builtin bool `json:"builtin"`
|
||||
Command string `json:"command"`
|
||||
OCIImage string `json:"oci_image"`
|
||||
Name string `json:"name"`
|
||||
SHA256 string `json:"sha256"`
|
||||
DeprecationStatus string `json:"deprecation_status,omitempty"`
|
||||
@@ -201,6 +202,13 @@ type RegisterPluginInput struct {
|
||||
|
||||
// Version is the optional version of the plugin being registered
|
||||
Version string `json:"version,omitempty"`
|
||||
|
||||
// OCIImage specifies the container image to run as a plugin.
|
||||
OCIImage string `json:"oci_image,omitempty"`
|
||||
|
||||
// Env specifies a list of key=value pairs to add to the plugin's environment
|
||||
// variables.
|
||||
Env []string `json:"env,omitempty"`
|
||||
}
|
||||
|
||||
// RegisterPlugin wraps RegisterPluginWithContext using context.Background.
|
||||
|
||||
Reference in New Issue
Block a user