mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
* Include SHA256 sum field in the list response for external plugins * Add changelog * remove mapstructure Co-authored-by: Zlaticanin <60530402+Zlaticanin@users.noreply.github.com>
This commit is contained in:
parent
a92bffe5ce
commit
ab45220ae3
3 changed files with 16 additions and 3 deletions
|
|
@ -42,6 +42,7 @@ type PluginDetails struct {
|
|||
Version string `json:"version,omitempty"`
|
||||
Builtin bool `json:"builtin"`
|
||||
DeprecationStatus string `json:"deprecation_status,omitempty" mapstructure:"deprecation_status"`
|
||||
SHA256 string `json:"sha256,omitempty"`
|
||||
}
|
||||
|
||||
// ListPlugins wraps ListPluginsWithContext using context.Background.
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ func TestListPlugins(t *testing.T) {
|
|||
expectedPlugins: map[PluginType][]string{
|
||||
PluginTypeCredential: {"alicloud"},
|
||||
PluginTypeDatabase: {"cassandra-database-plugin"},
|
||||
PluginTypeSecrets: {"ad", "alicloud"},
|
||||
PluginTypeSecrets: {"ad", "alicloud", "vault-plugin-secrets-azure"},
|
||||
},
|
||||
},
|
||||
"only auth plugins": {
|
||||
|
|
@ -73,7 +73,7 @@ func TestListPlugins(t *testing.T) {
|
|||
"only secret plugins": {
|
||||
input: ListPluginsInput{Type: PluginTypeSecrets},
|
||||
expectedPlugins: map[PluginType][]string{
|
||||
PluginTypeSecrets: {"ad", "alicloud"},
|
||||
PluginTypeSecrets: {"ad", "alicloud", "vault-plugin-secrets-azure"},
|
||||
},
|
||||
},
|
||||
} {
|
||||
|
|
@ -308,7 +308,8 @@ const listUntypedResponse = `{
|
|||
],
|
||||
"secret": [
|
||||
"ad",
|
||||
"alicloud"
|
||||
"alicloud",
|
||||
"vault-plugin-secrets-azure"
|
||||
],
|
||||
"some_other_unexpected_key": [
|
||||
{
|
||||
|
|
@ -346,6 +347,14 @@ const listUntypedResponse = `{
|
|||
"version": "v0.13.0+builtin",
|
||||
"builtin": true,
|
||||
"deprecation_status": "supported"
|
||||
},
|
||||
{
|
||||
"type": "secret",
|
||||
"name": "vault-plugin-secrets-azure",
|
||||
"version": "v0.24.0+ent",
|
||||
"builtin": false,
|
||||
"deprecation_status": "supported",
|
||||
"sha256": "8ba442dba253803685b05e35ad29dcdebc48dec16774614aa7a4ebe53c1e90e1"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
3
changelog/_10761.txt
Normal file
3
changelog/_10761.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
api: Add a SHA256 sum field to the json list response for external plugins.
|
||||
```
|
||||
Loading…
Reference in a new issue