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