mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-28 00:03:44 +00:00
Add plugin backend reload capability (#3112)
* Add plugin reload capability on all mounts for a specific plugin type * Comments cleanup * Add per-mount plugin backend reload, add tests * Fix typos * Remove old comment * Reuse existing storage view in reloadPluginCommon * Correctly handle reloading auth plugin backends * Update path to plugin/backend/reload * Use multierrors on reloadMatchingPluginMounts, attempt to reload all mounts provided * Use internal value as check to ensure plugin backend reload * Remove connection state from request for plugins at the moment * Minor cleanup * Refactor tests
This commit is contained in:
committed by
GitHub
parent
f2f0082ba5
commit
01d1c20e4c
@@ -9,15 +9,26 @@ import (
|
||||
// it is used to test the invalidate func.
|
||||
func pathInternal(b *backend) *framework.Path {
|
||||
return &framework.Path{
|
||||
Pattern: "internal",
|
||||
Fields: map[string]*framework.FieldSchema{},
|
||||
ExistenceCheck: b.pathExistenceCheck,
|
||||
Pattern: "internal",
|
||||
Fields: map[string]*framework.FieldSchema{
|
||||
"value": &framework.FieldSchema{Type: framework.TypeString},
|
||||
},
|
||||
Callbacks: map[logical.Operation]framework.OperationFunc{
|
||||
logical.ReadOperation: b.pathInternalRead,
|
||||
logical.UpdateOperation: b.pathInternalUpdate,
|
||||
logical.ReadOperation: b.pathInternalRead,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (b *backend) pathInternalUpdate(
|
||||
req *logical.Request, data *framework.FieldData) (*logical.Response, error) {
|
||||
value := data.Get("value").(string)
|
||||
b.internal = value
|
||||
// Return the secret
|
||||
return nil, nil
|
||||
|
||||
}
|
||||
|
||||
func (b *backend) pathInternalRead(
|
||||
req *logical.Request, data *framework.FieldData) (*logical.Response, error) {
|
||||
// Return the secret
|
||||
|
||||
Reference in New Issue
Block a user