mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-30 18:17:55 +00:00 
			
		
		
		
	Plugins: Consistently use plugin_version (#17171)
* Delete Sha field, rename RunningSha -> RunningSha256 * Rename version -> plugin_version
This commit is contained in:
		| @@ -247,7 +247,7 @@ type MountInput struct { | ||||
| 	SealWrap              bool              `json:"seal_wrap" mapstructure:"seal_wrap"` | ||||
| 	ExternalEntropyAccess bool              `json:"external_entropy_access" mapstructure:"external_entropy_access"` | ||||
| 	Options               map[string]string `json:"options"` | ||||
| 	Version               string            `json:"version,omitempty"` | ||||
| 	PluginVersion         string            `json:"plugin_version,omitempty"` | ||||
|  | ||||
| 	// Deprecated: Newer server responses should be returning this information in the | ||||
| 	// Type field (json: "type") instead. | ||||
| @@ -282,10 +282,9 @@ type MountOutput struct { | ||||
| 	Local                 bool              `json:"local"` | ||||
| 	SealWrap              bool              `json:"seal_wrap" mapstructure:"seal_wrap"` | ||||
| 	ExternalEntropyAccess bool              `json:"external_entropy_access" mapstructure:"external_entropy_access"` | ||||
| 	Version               string            `json:"version"` | ||||
| 	RunningVersion        string            `json:"running_version"` | ||||
| 	Sha                   string            `json:"sha"` | ||||
| 	RunningSha            string            `json:"running_sha"` | ||||
| 	PluginVersion         string            `json:"plugin_version" mapstructure:"plugin_version"` | ||||
| 	RunningVersion        string            `json:"running_plugin_version" mapstructure:"running_plugin_version"` | ||||
| 	RunningSha256         string            `json:"running_sha256" mapstructure:"running_sha256"` | ||||
| 	DeprecationStatus     string            `json:"deprecation_status" mapstructure:"deprecation_status"` | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -38,7 +38,7 @@ func TestListMounts(t *testing.T) { | ||||
| 			t.Errorf("Unexpected mount: %s: %+v", path, mount) | ||||
| 			continue | ||||
| 		} | ||||
| 		if expected.Type != mount.Type || expected.Version != mount.Version { | ||||
| 		if expected.Type != mount.Type || expected.Version != mount.PluginVersion { | ||||
| 			t.Errorf("Mount did not match: %s -> expected %+v but got %+v", path, expected, mount) | ||||
| 		} | ||||
| 	} | ||||
| @@ -49,7 +49,7 @@ func TestListMounts(t *testing.T) { | ||||
| 			t.Errorf("Expected mount not found mount: %s: %+v", path, expected) | ||||
| 			continue | ||||
| 		} | ||||
| 		if expected.Type != mount.Type || expected.Version != mount.Version { | ||||
| 		if expected.Type != mount.Type || expected.Version != mount.PluginVersion { | ||||
| 			t.Errorf("Mount did not match: %s -> expected %+v but got %+v", path, expected, mount) | ||||
| 		} | ||||
| 	} | ||||
| @@ -76,13 +76,12 @@ const listMountsResponse = `{ | ||||
|       "external_entropy_access": false, | ||||
|       "local": true, | ||||
|       "options": null, | ||||
|       "running_sha": "", | ||||
|       "running_version": "", | ||||
|       "plugin_version": "v1.0.0", | ||||
|       "running_sha256": "", | ||||
|       "running_plugin_version": "", | ||||
|       "seal_wrap": false, | ||||
|       "sha": "", | ||||
|       "type": "cubbyhole", | ||||
|       "uuid": "575063dc-5ef8-4487-c842-22c494c19a6f", | ||||
|       "version": "v1.0.0" | ||||
|       "uuid": "575063dc-5ef8-4487-c842-22c494c19a6f" | ||||
|     }, | ||||
|     "identity/": { | ||||
|       "accessor": "identity_6e01c327", | ||||
| @@ -98,13 +97,12 @@ const listMountsResponse = `{ | ||||
|       "external_entropy_access": false, | ||||
|       "local": false, | ||||
|       "options": null, | ||||
|       "running_sha": "", | ||||
|       "running_version": "", | ||||
|       "plugin_version": "", | ||||
|       "running_sha256": "", | ||||
|       "running_plugin_version": "", | ||||
|       "seal_wrap": false, | ||||
|       "sha": "", | ||||
|       "type": "identity", | ||||
|       "uuid": "187d7eba-3471-554b-c2d9-1479612c8046", | ||||
|       "version": "" | ||||
|       "uuid": "187d7eba-3471-554b-c2d9-1479612c8046" | ||||
|     }, | ||||
|     "secret/": { | ||||
|       "accessor": "kv_3e2f282f", | ||||
| @@ -119,13 +117,12 @@ const listMountsResponse = `{ | ||||
|       "options": { | ||||
|         "version": "2" | ||||
|       }, | ||||
|       "running_sha": "", | ||||
|       "running_version": "", | ||||
|       "plugin_version": "", | ||||
|       "running_sha256": "", | ||||
|       "running_plugin_version": "", | ||||
|       "seal_wrap": false, | ||||
|       "sha": "", | ||||
|       "type": "kv", | ||||
|       "uuid": "13375e0f-876e-7e96-0a3e-076f37b6b69d", | ||||
|       "version": "" | ||||
|       "uuid": "13375e0f-876e-7e96-0a3e-076f37b6b69d" | ||||
|     }, | ||||
|     "sys/": { | ||||
|       "accessor": "system_93503264", | ||||
| @@ -141,13 +138,12 @@ const listMountsResponse = `{ | ||||
|       "external_entropy_access": false, | ||||
|       "local": false, | ||||
|       "options": null, | ||||
|       "running_sha": "", | ||||
|       "running_version": "", | ||||
|       "plugin_version": "", | ||||
|       "running_sha256": "", | ||||
|       "running_plugin_version": "", | ||||
|       "seal_wrap": true, | ||||
|       "sha": "", | ||||
|       "type": "system", | ||||
|       "uuid": "1373242d-cc4d-c023-410b-7f336e7ba0a8", | ||||
|       "version": "" | ||||
|       "uuid": "1373242d-cc4d-c023-410b-7f336e7ba0a8" | ||||
|     } | ||||
|   } | ||||
| }` | ||||
|   | ||||
| @@ -204,7 +204,7 @@ func (c *AuthEnableCommand) Flags() *FlagSets { | ||||
| 		Name:    "plugin-version", | ||||
| 		Target:  &c.flagPluginVersion, | ||||
| 		Default: "", | ||||
| 		Usage:   "Select the version of the plugin to enable.", | ||||
| 		Usage:   "Select the semantic version of the plugin to enable.", | ||||
| 	}) | ||||
|  | ||||
| 	return set | ||||
| @@ -270,7 +270,7 @@ func (c *AuthEnableCommand) Run(args []string) int { | ||||
|  | ||||
| 	authOpts := &api.EnableAuthOptions{ | ||||
| 		Type:                  authType, | ||||
| 		Version:               c.flagPluginVersion, | ||||
| 		PluginVersion:         c.flagPluginVersion, | ||||
| 		Description:           c.flagDescription, | ||||
| 		Local:                 c.flagLocal, | ||||
| 		SealWrap:              c.flagSealWrap, | ||||
|   | ||||
| @@ -121,7 +121,7 @@ func (c *AuthListCommand) simpleMounts(auths map[string]*api.AuthMount) []string | ||||
| 	out := []string{"Path | Type | Accessor | Description | Version"} | ||||
| 	for _, path := range paths { | ||||
| 		mount := auths[path] | ||||
| 		out = append(out, fmt.Sprintf("%s | %s | %s | %s | %s", path, mount.Type, mount.Accessor, mount.Description, mount.Version)) | ||||
| 		out = append(out, fmt.Sprintf("%s | %s | %s | %s | %s", path, mount.Type, mount.Accessor, mount.Description, mount.PluginVersion)) | ||||
| 	} | ||||
|  | ||||
| 	return out | ||||
| @@ -175,7 +175,7 @@ func (c *AuthListCommand) detailedMounts(auths map[string]*api.AuthMount) []stri | ||||
| 			mount.Options, | ||||
| 			mount.Description, | ||||
| 			mount.UUID, | ||||
| 			mount.Version, | ||||
| 			mount.PluginVersion, | ||||
| 			mount.DeprecationStatus, | ||||
| 		)) | ||||
| 	} | ||||
|   | ||||
| @@ -19,7 +19,7 @@ var ( | ||||
| type PluginDeregisterCommand struct { | ||||
| 	*BaseCommand | ||||
|  | ||||
| 	flagVersion string | ||||
| 	flagPluginVersion string | ||||
| } | ||||
|  | ||||
| func (c *PluginDeregisterCommand) Synopsis() string { | ||||
| @@ -54,9 +54,9 @@ func (c *PluginDeregisterCommand) Flags() *FlagSets { | ||||
|  | ||||
| 	f.StringVar(&StringVar{ | ||||
| 		Name:       "version", | ||||
| 		Target:     &c.flagVersion, | ||||
| 		Target:     &c.flagPluginVersion, | ||||
| 		Completion: complete.PredictAnything, | ||||
| 		Usage: "Version of the plugin to deregister. If unset, " + | ||||
| 		Usage: "Semantic version of the plugin to deregister. If unset, " + | ||||
| 			"only an unversioned plugin may be deregistered.", | ||||
| 	}) | ||||
|  | ||||
| @@ -108,10 +108,10 @@ func (c *PluginDeregisterCommand) Run(args []string) int { | ||||
| 		return 2 | ||||
| 	} | ||||
| 	pluginName := strings.TrimSpace(pluginNameRaw) | ||||
| 	if c.flagVersion != "" { | ||||
| 		_, err := semver.NewSemver(c.flagVersion) | ||||
| 	if c.flagPluginVersion != "" { | ||||
| 		_, err := semver.NewSemver(c.flagPluginVersion) | ||||
| 		if err != nil { | ||||
| 			c.UI.Error(fmt.Sprintf("version %q is not a valid semantic version: %v", c.flagVersion, err)) | ||||
| 			c.UI.Error(fmt.Sprintf("version %q is not a valid semantic version: %v", c.flagPluginVersion, err)) | ||||
| 			return 2 | ||||
| 		} | ||||
| 	} | ||||
| @@ -119,7 +119,7 @@ func (c *PluginDeregisterCommand) Run(args []string) int { | ||||
| 	if err := client.Sys().DeregisterPlugin(&api.DeregisterPluginInput{ | ||||
| 		Name:    pluginName, | ||||
| 		Type:    pluginType, | ||||
| 		Version: c.flagVersion, | ||||
| 		Version: c.flagPluginVersion, | ||||
| 	}); err != nil { | ||||
| 		c.UI.Error(fmt.Sprintf("Error deregistering plugin named %s: %s", pluginName, err)) | ||||
| 		return 2 | ||||
|   | ||||
| @@ -85,7 +85,7 @@ func (c *PluginRegisterCommand) Flags() *FlagSets { | ||||
| 		Name:       "version", | ||||
| 		Target:     &c.flagVersion, | ||||
| 		Completion: complete.PredictAnything, | ||||
| 		Usage:      "Version of the plugin. Optional.", | ||||
| 		Usage:      "Semantic version of the plugin. Optional.", | ||||
| 	}) | ||||
|  | ||||
| 	return set | ||||
|   | ||||
| @@ -414,10 +414,9 @@ func TestSysMounts_headerAuth(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{"version": "1"}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"sys/": map[string]interface{}{ | ||||
| 				"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -432,10 +431,9 @@ func TestSysMounts_headerAuth(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              true, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.DefaultBuiltinVersion, | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 			}, | ||||
| 			"cubbyhole/": map[string]interface{}{ | ||||
| 				"description":             "per-token private secret storage", | ||||
| @@ -449,10 +447,9 @@ func TestSysMounts_headerAuth(t *testing.T) { | ||||
| 				"local":                  true, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			}, | ||||
| 			"identity/": map[string]interface{}{ | ||||
| 				"description":             "identity store", | ||||
| @@ -467,10 +464,9 @@ func TestSysMounts_headerAuth(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			}, | ||||
| 		}, | ||||
| 		"secret/": map[string]interface{}{ | ||||
| @@ -485,10 +481,9 @@ func TestSysMounts_headerAuth(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{"version": "1"}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"sys/": map[string]interface{}{ | ||||
| 			"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -503,10 +498,9 @@ func TestSysMounts_headerAuth(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              true, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.DefaultBuiltinVersion, | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 		}, | ||||
| 		"cubbyhole/": map[string]interface{}{ | ||||
| 			"description":             "per-token private secret storage", | ||||
| @@ -520,10 +514,9 @@ func TestSysMounts_headerAuth(t *testing.T) { | ||||
| 			"local":                  true, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 		}, | ||||
| 		"identity/": map[string]interface{}{ | ||||
| 			"description":             "identity store", | ||||
| @@ -538,10 +531,9 @@ func TestSysMounts_headerAuth(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 		}, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
|   | ||||
| @@ -43,10 +43,9 @@ func TestSysAuth(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": "", | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": "", | ||||
| 			}, | ||||
| 		}, | ||||
| 		"token/": map[string]interface{}{ | ||||
| @@ -62,10 +61,9 @@ func TestSysAuth(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": "", | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": "", | ||||
| 		}, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
| @@ -128,10 +126,9 @@ func TestSysEnableAuth(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeCredential, "approle"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeCredential, "approle"), | ||||
| 			}, | ||||
| 			"token/": map[string]interface{}{ | ||||
| 				"description":             "token based credentials", | ||||
| @@ -146,10 +143,9 @@ func TestSysEnableAuth(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": "", | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": "", | ||||
| 			}, | ||||
| 		}, | ||||
| 		"foo/": map[string]interface{}{ | ||||
| @@ -166,10 +162,9 @@ func TestSysEnableAuth(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeCredential, "approle"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeCredential, "approle"), | ||||
| 		}, | ||||
| 		"token/": map[string]interface{}{ | ||||
| 			"description":             "token based credentials", | ||||
| @@ -184,10 +179,9 @@ func TestSysEnableAuth(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": "", | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": "", | ||||
| 		}, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
| @@ -252,10 +246,9 @@ func TestSysDisableAuth(t *testing.T) { | ||||
| 				"local":                   false, | ||||
| 				"seal_wrap":               false, | ||||
| 				"options":                 interface{}(nil), | ||||
| 				"sha":                     "", | ||||
| 				"running_sha":             "", | ||||
| 				"running_version":         "", | ||||
| 				"version":                 "", | ||||
| 				"plugin_version":          "", | ||||
| 				"running_sha256":          "", | ||||
| 				"running_plugin_version":  "", | ||||
| 			}, | ||||
| 		}, | ||||
| 		"token/": map[string]interface{}{ | ||||
| @@ -271,10 +264,9 @@ func TestSysDisableAuth(t *testing.T) { | ||||
| 			"local":                   false, | ||||
| 			"seal_wrap":               false, | ||||
| 			"options":                 interface{}(nil), | ||||
| 			"sha":                     "", | ||||
| 			"running_sha":             "", | ||||
| 			"running_version":         "", | ||||
| 			"version":                 "", | ||||
| 			"plugin_version":          "", | ||||
| 			"running_sha256":          "", | ||||
| 			"running_plugin_version":  "", | ||||
| 		}, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
| @@ -531,10 +523,9 @@ func TestSysRemountAuth(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"token/": map[string]interface{}{ | ||||
| 				"description":             "token based credentials", | ||||
| @@ -549,10 +540,9 @@ func TestSysRemountAuth(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": "", | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": "", | ||||
| 			}, | ||||
| 		}, | ||||
| 		"bar/": map[string]interface{}{ | ||||
| @@ -568,10 +558,9 @@ func TestSysRemountAuth(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"token/": map[string]interface{}{ | ||||
| 			"description":             "token based credentials", | ||||
| @@ -586,10 +575,9 @@ func TestSysRemountAuth(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": "", | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": "", | ||||
| 		}, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
|   | ||||
| @@ -43,10 +43,9 @@ func TestSysMounts(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{"version": "1"}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"sys/": map[string]interface{}{ | ||||
| 				"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -61,10 +60,9 @@ func TestSysMounts(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              true, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.DefaultBuiltinVersion, | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 			}, | ||||
| 			"cubbyhole/": map[string]interface{}{ | ||||
| 				"description":             "per-token private secret storage", | ||||
| @@ -78,10 +76,9 @@ func TestSysMounts(t *testing.T) { | ||||
| 				"local":                  true, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			}, | ||||
| 			"identity/": map[string]interface{}{ | ||||
| 				"description":             "identity store", | ||||
| @@ -96,10 +93,9 @@ func TestSysMounts(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			}, | ||||
| 		}, | ||||
| 		"secret/": map[string]interface{}{ | ||||
| @@ -114,10 +110,9 @@ func TestSysMounts(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{"version": "1"}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"sys/": map[string]interface{}{ | ||||
| 			"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -132,10 +127,9 @@ func TestSysMounts(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              true, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.DefaultBuiltinVersion, | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 		}, | ||||
| 		"cubbyhole/": map[string]interface{}{ | ||||
| 			"description":             "per-token private secret storage", | ||||
| @@ -149,10 +143,9 @@ func TestSysMounts(t *testing.T) { | ||||
| 			"local":                  true, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 		}, | ||||
| 		"identity/": map[string]interface{}{ | ||||
| 			"description":             "identity store", | ||||
| @@ -167,10 +160,9 @@ func TestSysMounts(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 		}, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
| @@ -232,10 +224,9 @@ func TestSysMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{"version": "1"}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"secret/": map[string]interface{}{ | ||||
| 				"description":             "key/value secret storage", | ||||
| @@ -249,10 +240,9 @@ func TestSysMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{"version": "1"}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"sys/": map[string]interface{}{ | ||||
| 				"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -267,10 +257,9 @@ func TestSysMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              true, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.DefaultBuiltinVersion, | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 			}, | ||||
| 			"cubbyhole/": map[string]interface{}{ | ||||
| 				"description":             "per-token private secret storage", | ||||
| @@ -284,10 +273,9 @@ func TestSysMount(t *testing.T) { | ||||
| 				"local":                  true, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			}, | ||||
| 			"identity/": map[string]interface{}{ | ||||
| 				"description":             "identity store", | ||||
| @@ -302,10 +290,9 @@ func TestSysMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			}, | ||||
| 		}, | ||||
| 		"foo/": map[string]interface{}{ | ||||
| @@ -320,10 +307,9 @@ func TestSysMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{"version": "1"}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"secret/": map[string]interface{}{ | ||||
| 			"description":             "key/value secret storage", | ||||
| @@ -337,10 +323,9 @@ func TestSysMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{"version": "1"}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"sys/": map[string]interface{}{ | ||||
| 			"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -355,10 +340,9 @@ func TestSysMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              true, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.DefaultBuiltinVersion, | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 		}, | ||||
| 		"cubbyhole/": map[string]interface{}{ | ||||
| 			"description":             "per-token private secret storage", | ||||
| @@ -372,10 +356,9 @@ func TestSysMount(t *testing.T) { | ||||
| 			"local":                  true, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 		}, | ||||
| 		"identity/": map[string]interface{}{ | ||||
| 			"description":             "identity store", | ||||
| @@ -390,10 +373,9 @@ func TestSysMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 		}, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
| @@ -490,10 +472,9 @@ func TestSysRemount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"secret/": map[string]interface{}{ | ||||
| 				"description":             "key/value secret storage", | ||||
| @@ -507,10 +488,9 @@ func TestSysRemount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{"version": "1"}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"sys/": map[string]interface{}{ | ||||
| 				"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -525,10 +505,9 @@ func TestSysRemount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              true, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.DefaultBuiltinVersion, | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 			}, | ||||
| 			"cubbyhole/": map[string]interface{}{ | ||||
| 				"description":             "per-token private secret storage", | ||||
| @@ -542,10 +521,9 @@ func TestSysRemount(t *testing.T) { | ||||
| 				"local":                  true, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			}, | ||||
| 			"identity/": map[string]interface{}{ | ||||
| 				"description":             "identity store", | ||||
| @@ -560,10 +538,9 @@ func TestSysRemount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			}, | ||||
| 		}, | ||||
| 		"bar/": map[string]interface{}{ | ||||
| @@ -578,10 +555,9 @@ func TestSysRemount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"secret/": map[string]interface{}{ | ||||
| 			"description":             "key/value secret storage", | ||||
| @@ -595,10 +571,9 @@ func TestSysRemount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{"version": "1"}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"sys/": map[string]interface{}{ | ||||
| 			"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -613,10 +588,9 @@ func TestSysRemount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              true, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.DefaultBuiltinVersion, | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 		}, | ||||
| 		"cubbyhole/": map[string]interface{}{ | ||||
| 			"description":             "per-token private secret storage", | ||||
| @@ -630,10 +604,9 @@ func TestSysRemount(t *testing.T) { | ||||
| 			"local":                  true, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 		}, | ||||
| 		"identity/": map[string]interface{}{ | ||||
| 			"description":             "identity store", | ||||
| @@ -648,10 +621,9 @@ func TestSysRemount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 		}, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
| @@ -713,10 +685,9 @@ func TestSysUnmount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{"version": "1"}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"sys/": map[string]interface{}{ | ||||
| 				"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -731,10 +702,9 @@ func TestSysUnmount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              true, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.DefaultBuiltinVersion, | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 			}, | ||||
| 			"cubbyhole/": map[string]interface{}{ | ||||
| 				"description":             "per-token private secret storage", | ||||
| @@ -748,10 +718,9 @@ func TestSysUnmount(t *testing.T) { | ||||
| 				"local":                  true, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			}, | ||||
| 			"identity/": map[string]interface{}{ | ||||
| 				"description":             "identity store", | ||||
| @@ -766,10 +735,9 @@ func TestSysUnmount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			}, | ||||
| 		}, | ||||
| 		"secret/": map[string]interface{}{ | ||||
| @@ -784,10 +752,9 @@ func TestSysUnmount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{"version": "1"}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"sys/": map[string]interface{}{ | ||||
| 			"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -802,10 +769,9 @@ func TestSysUnmount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              true, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.DefaultBuiltinVersion, | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 		}, | ||||
| 		"cubbyhole/": map[string]interface{}{ | ||||
| 			"description":             "per-token private secret storage", | ||||
| @@ -819,10 +785,9 @@ func TestSysUnmount(t *testing.T) { | ||||
| 			"local":                  true, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 		}, | ||||
| 		"identity/": map[string]interface{}{ | ||||
| 			"description":             "identity store", | ||||
| @@ -837,10 +802,9 @@ func TestSysUnmount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 		}, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
| @@ -988,10 +952,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"secret/": map[string]interface{}{ | ||||
| 				"description":             "key/value secret storage", | ||||
| @@ -1005,10 +968,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{"version": "1"}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"sys/": map[string]interface{}{ | ||||
| 				"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -1023,10 +985,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              true, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.DefaultBuiltinVersion, | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 			}, | ||||
| 			"cubbyhole/": map[string]interface{}{ | ||||
| 				"description":             "per-token private secret storage", | ||||
| @@ -1040,10 +1001,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 				"local":                  true, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			}, | ||||
| 			"identity/": map[string]interface{}{ | ||||
| 				"description":             "identity store", | ||||
| @@ -1058,10 +1018,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			}, | ||||
| 		}, | ||||
| 		"foo/": map[string]interface{}{ | ||||
| @@ -1076,10 +1035,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"secret/": map[string]interface{}{ | ||||
| 			"description":             "key/value secret storage", | ||||
| @@ -1093,10 +1051,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{"version": "1"}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"sys/": map[string]interface{}{ | ||||
| 			"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -1111,10 +1068,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              true, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.DefaultBuiltinVersion, | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 		}, | ||||
| 		"cubbyhole/": map[string]interface{}{ | ||||
| 			"description":             "per-token private secret storage", | ||||
| @@ -1128,10 +1084,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 			"local":                  true, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 		}, | ||||
| 		"identity/": map[string]interface{}{ | ||||
| 			"description":             "identity store", | ||||
| @@ -1146,10 +1101,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 		}, | ||||
| 	} | ||||
| 	testResponseStatus(t, resp, 200) | ||||
| @@ -1237,10 +1191,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{"version": "1"}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"secret/": map[string]interface{}{ | ||||
| 				"description":             "key/value secret storage", | ||||
| @@ -1254,10 +1207,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]interface{}{"version": "1"}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			}, | ||||
| 			"sys/": map[string]interface{}{ | ||||
| 				"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -1272,10 +1224,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              true, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.DefaultBuiltinVersion, | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 			}, | ||||
| 			"cubbyhole/": map[string]interface{}{ | ||||
| 				"description":             "per-token private secret storage", | ||||
| @@ -1289,10 +1240,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 				"local":                  true, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			}, | ||||
| 			"identity/": map[string]interface{}{ | ||||
| 				"description":             "identity store", | ||||
| @@ -1307,10 +1257,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                interface{}(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 				"version":         "", | ||||
| 				"plugin_version":         "", | ||||
| 				"running_sha256":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			}, | ||||
| 		}, | ||||
| 		"foo/": map[string]interface{}{ | ||||
| @@ -1325,10 +1274,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{"version": "1"}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"secret/": map[string]interface{}{ | ||||
| 			"description":             "key/value secret storage", | ||||
| @@ -1342,10 +1290,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]interface{}{"version": "1"}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"sys/": map[string]interface{}{ | ||||
| 			"description":             "system endpoints used for control, policy and debugging", | ||||
| @@ -1360,10 +1307,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              true, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 		}, | ||||
| 		"cubbyhole/": map[string]interface{}{ | ||||
| 			"description":             "per-token private secret storage", | ||||
| @@ -1377,10 +1323,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 			"local":                  true, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 		}, | ||||
| 		"identity/": map[string]interface{}{ | ||||
| 			"description":             "identity store", | ||||
| @@ -1395,10 +1340,9 @@ func TestSysTuneMount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                interface{}(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"version":         "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_sha256":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 		}, | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -896,10 +896,9 @@ func (b *SystemBackend) mountInfo(ctx context.Context, entry *MountEntry) map[st | ||||
| 		"external_entropy_access": entry.ExternalEntropyAccess, | ||||
| 		"options":                 entry.Options, | ||||
| 		"uuid":                    entry.UUID, | ||||
| 		"version":                 entry.Version, | ||||
| 		"sha":                     entry.Sha, | ||||
| 		"running_version":         entry.RunningVersion, | ||||
| 		"running_sha":             entry.RunningSha, | ||||
| 		"plugin_version":          entry.Version, | ||||
| 		"running_plugin_version":  entry.RunningVersion, | ||||
| 		"running_sha256":          entry.RunningSha256, | ||||
| 	} | ||||
| 	entryConfig := map[string]interface{}{ | ||||
| 		"default_lease_ttl": int64(entry.Config.DefaultLeaseTTL.Seconds()), | ||||
| @@ -999,7 +998,7 @@ func (b *SystemBackend) handleMount(ctx context.Context, req *logical.Request, d | ||||
| 	sealWrap := data.Get("seal_wrap").(bool) | ||||
| 	externalEntropyAccess := data.Get("external_entropy_access").(bool) | ||||
| 	options := data.Get("options").(map[string]string) | ||||
| 	version := data.Get("version").(string) | ||||
| 	version := data.Get("plugin_version").(string) | ||||
| 	if version != "" { | ||||
| 		v, err := semver.NewSemver(version) | ||||
| 		if err != nil { | ||||
| @@ -2256,7 +2255,7 @@ func (b *SystemBackend) handleEnableAuth(ctx context.Context, req *logical.Reque | ||||
| 	sealWrap := data.Get("seal_wrap").(bool) | ||||
| 	externalEntropyAccess := data.Get("external_entropy_access").(bool) | ||||
| 	options := data.Get("options").(map[string]string) | ||||
| 	version := data.Get("version").(string) | ||||
| 	version := data.Get("plugin_version").(string) | ||||
| 	if version != "" { | ||||
| 		v, err := semver.NewSemver(version) | ||||
| 		if err != nil { | ||||
|   | ||||
| @@ -1600,7 +1600,7 @@ func (b *SystemBackend) authPaths() []*framework.Path { | ||||
| 					Type:        framework.TypeKVPairs, | ||||
| 					Description: strings.TrimSpace(sysHelp["auth_options"][0]), | ||||
| 				}, | ||||
| 				"version": { | ||||
| 				"plugin_version": { | ||||
| 					Type:        framework.TypeString, | ||||
| 					Description: strings.TrimSpace(sysHelp["plugin-catalog_version"][0]), | ||||
| 				}, | ||||
| @@ -1975,7 +1975,7 @@ func (b *SystemBackend) mountPaths() []*framework.Path { | ||||
| 					Type:        framework.TypeKVPairs, | ||||
| 					Description: strings.TrimSpace(sysHelp["mount_options"][0]), | ||||
| 				}, | ||||
| 				"version": { | ||||
| 				"plugin_version": { | ||||
| 					Type:        framework.TypeString, | ||||
| 					Description: strings.TrimSpace(sysHelp["plugin-catalog_version"][0]), | ||||
| 				}, | ||||
|   | ||||
| @@ -173,10 +173,9 @@ func TestSystemBackend_mounts(t *testing.T) { | ||||
| 			"options": map[string]string{ | ||||
| 				"version": "1", | ||||
| 			}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 		"sys/": map[string]interface{}{ | ||||
| 			"type":                    "system", | ||||
| @@ -193,10 +192,9 @@ func TestSystemBackend_mounts(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              true, | ||||
| 			"options":                map[string]string(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": versions.DefaultBuiltinVersion, | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 		"cubbyhole/": map[string]interface{}{ | ||||
| 			"description":             "per-token private secret storage", | ||||
| @@ -212,10 +210,9 @@ func TestSystemBackend_mounts(t *testing.T) { | ||||
| 			"local":                  true, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]string(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 		"identity/": map[string]interface{}{ | ||||
| 			"description":             "identity store", | ||||
| @@ -232,10 +229,9 @@ func TestSystemBackend_mounts(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]string(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 	} | ||||
| 	if diff := deep.Equal(resp.Data, exp); len(diff) > 0 { | ||||
| @@ -302,10 +298,9 @@ func TestSystemBackend_mount(t *testing.T) { | ||||
| 			"options": map[string]string{ | ||||
| 				"version": "1", | ||||
| 			}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 		"sys/": map[string]interface{}{ | ||||
| 			"type":                    "system", | ||||
| @@ -322,10 +317,9 @@ func TestSystemBackend_mount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              true, | ||||
| 			"options":                map[string]string(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": versions.DefaultBuiltinVersion, | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 		"cubbyhole/": map[string]interface{}{ | ||||
| 			"description":             "per-token private secret storage", | ||||
| @@ -341,10 +335,9 @@ func TestSystemBackend_mount(t *testing.T) { | ||||
| 			"local":                  true, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]string(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 		"identity/": map[string]interface{}{ | ||||
| 			"description":             "identity store", | ||||
| @@ -361,10 +354,9 @@ func TestSystemBackend_mount(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]string(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 		"prod/secret/": map[string]interface{}{ | ||||
| 			"description":             "", | ||||
| @@ -382,10 +374,9 @@ func TestSystemBackend_mount(t *testing.T) { | ||||
| 			"options": map[string]string{ | ||||
| 				"version": "1", | ||||
| 			}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 	} | ||||
| 	if diff := deep.Equal(resp.Data, exp); len(diff) > 0 { | ||||
| @@ -1858,10 +1849,9 @@ func TestSystemBackend_authTable(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]string(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": "", | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 	} | ||||
| 	if diff := deep.Equal(resp.Data, exp); diff != nil { | ||||
| @@ -1926,10 +1916,9 @@ func TestSystemBackend_enableAuth(t *testing.T) { | ||||
| 			"local":                  true, | ||||
| 			"seal_wrap":              true, | ||||
| 			"options":                map[string]string{}, | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": versions.DefaultBuiltinVersion, | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 		"token/": map[string]interface{}{ | ||||
| 			"type":                    "token", | ||||
| @@ -1946,10 +1935,9 @@ func TestSystemBackend_enableAuth(t *testing.T) { | ||||
| 			"local":                  false, | ||||
| 			"seal_wrap":              false, | ||||
| 			"options":                map[string]string(nil), | ||||
| 			"sha":             "", | ||||
| 			"running_sha":     "", | ||||
| 			"version":         "", | ||||
| 			"running_version": "", | ||||
| 			"plugin_version":         "", | ||||
| 			"running_plugin_version": "", | ||||
| 			"running_sha256":         "", | ||||
| 		}, | ||||
| 	} | ||||
| 	if diff := deep.Equal(resp.Data, exp); diff != nil { | ||||
| @@ -3327,10 +3315,9 @@ func TestSystemBackend_InternalUIMounts(t *testing.T) { | ||||
| 				"options": map[string]string{ | ||||
| 					"version": "1", | ||||
| 				}, | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"version":         "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"plugin_version":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "kv"), | ||||
| 				"running_sha256":         "", | ||||
| 			}, | ||||
| 			"sys/": map[string]interface{}{ | ||||
| 				"type":                    "system", | ||||
| @@ -3347,10 +3334,9 @@ func TestSystemBackend_InternalUIMounts(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              true, | ||||
| 				"options":                map[string]string(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"version":         "", | ||||
| 				"running_version": versions.DefaultBuiltinVersion, | ||||
| 				"plugin_version":         "", | ||||
| 				"running_plugin_version": versions.DefaultBuiltinVersion, | ||||
| 				"running_sha256":         "", | ||||
| 			}, | ||||
| 			"cubbyhole/": map[string]interface{}{ | ||||
| 				"description":             "per-token private secret storage", | ||||
| @@ -3366,10 +3352,9 @@ func TestSystemBackend_InternalUIMounts(t *testing.T) { | ||||
| 				"local":                  true, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]string(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"version":         "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 				"plugin_version":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "cubbyhole"), | ||||
| 				"running_sha256":         "", | ||||
| 			}, | ||||
| 			"identity/": map[string]interface{}{ | ||||
| 				"description":             "identity store", | ||||
| @@ -3386,10 +3371,9 @@ func TestSystemBackend_InternalUIMounts(t *testing.T) { | ||||
| 				"local":                  false, | ||||
| 				"seal_wrap":              false, | ||||
| 				"options":                map[string]string(nil), | ||||
| 				"sha":             "", | ||||
| 				"running_sha":     "", | ||||
| 				"version":         "", | ||||
| 				"running_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 				"plugin_version":         "", | ||||
| 				"running_plugin_version": versions.GetBuiltinVersion(consts.PluginTypeSecrets, "identity"), | ||||
| 				"running_sha256":         "", | ||||
| 			}, | ||||
| 		}, | ||||
| 		"auth": map[string]interface{}{ | ||||
| @@ -3408,10 +3392,9 @@ func TestSystemBackend_InternalUIMounts(t *testing.T) { | ||||
| 				"uuid":                    resp.Data["auth"].(map[string]interface{})["token/"].(map[string]interface{})["uuid"], | ||||
| 				"local":                   false, | ||||
| 				"seal_wrap":               false, | ||||
| 				"sha":                     "", | ||||
| 				"running_sha":             "", | ||||
| 				"version":                 "", | ||||
| 				"running_version":         "", | ||||
| 				"plugin_version":          "", | ||||
| 				"running_plugin_version":  "", | ||||
| 				"running_sha256":          "", | ||||
| 			}, | ||||
| 		}, | ||||
| 	} | ||||
|   | ||||
| @@ -331,10 +331,9 @@ type MountEntry struct { | ||||
| 	synthesizedConfigCache sync.Map | ||||
|  | ||||
| 	// version info | ||||
| 	Version        string `json:"version,omitempty"`         // The semantic version of the mounted plugin, e.g. v1.2.3. | ||||
| 	Sha            string `json:"sha,omitempty"`             // The SHA256 sum of the plugin binary. | ||||
| 	RunningVersion string `json:"running_version,omitempty"` // The semantic version of the mounted plugin as reported by the plugin. | ||||
| 	RunningSha     string `json:"running_sha,omitempty"` | ||||
| 	Version        string `json:"plugin_version,omitempty"`         // The semantic version of the mounted plugin, e.g. v1.2.3. | ||||
| 	RunningVersion string `json:"running_plugin_version,omitempty"` // The semantic version of the mounted plugin as reported by the plugin. | ||||
| 	RunningSha256  string `json:"running_sha256,omitempty"` | ||||
| } | ||||
|  | ||||
| // MountConfig is used to hold settable options | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tom Proctor
					Tom Proctor