open-vault/sdk/helper
John-Michael Faircloth b6c05fae33
feature: secrets/auth plugin multiplexing (#14946)
* enable registering backend muxed plugins in plugin catalog

* set the sysview on the pluginconfig to allow enabling secrets/auth plugins

* store backend instances in map

* store single implementations in the instances map

cleanup instance map and ensure we don't deadlock

* fix system backend unit tests

move GetMultiplexIDFromContext to pluginutil package

fix pluginutil test

fix dbplugin ut

* return error(s) if we can't get the plugin client

update comments

* refactor/move GetMultiplexIDFromContext test

* add changelog

* remove unnecessary field on pluginClient

* add unit tests to PluginCatalog for secrets/auth plugins

* fix comment

* return pluginClient from TestRunTestPlugin

* add multiplexed backend test

* honor metadatamode value in newbackend pluginconfig

* check that connection exists on cleanup

* add automtls to secrets/auth plugins

* don't remove apiclientmeta parsing

* use formatting directive for fmt.Errorf

* fix ut: remove tls provider func

* remove tlsproviderfunc from backend plugin tests

* use env var to prevent test plugin from running as a unit test

* WIP: remove lazy loading

* move non lazy loaded backend to new package

* use version wrapper for backend plugin factory

* remove backendVersionWrapper type

* implement getBackendPluginType for plugin catalog

* handle backend plugin v4 registration

* add plugin automtls env guard

* modify plugin factory to determine the backend to use

* remove old pluginsets from v5 and log pid in plugin catalog

* add reload mechanism via context

* readd v3 and v4 to pluginset

* call cleanup from reload if non-muxed

* move v5 backend code to new package

* use context reload for for ErrPluginShutdown case

* add wrapper on v5 backend

* fix run config UTs

* fix unit tests

- use v4/v5 mapping for plugin versions
- fix test build err
- add reload method on fakePluginClient
- add multiplexed cases for integration tests

* remove comment and update AutoMTLS field in test

* remove comment

* remove errwrap and unused context

* only support metadatamode false for v5 backend plugins

* update plugin catalog errors

* use const for env variables

* rename locks and remove unused

* remove unneeded nil check

* improvements based on staticcheck recommendations

* use const for single implementation string

* use const for context key

* use info default log level

* move pid to pluginClient struct

* remove v3 and v4 from multiplexed plugin set

* return from reload when non-multiplexed

* update automtls env string

* combine getBackend and getBrokeredClient

* update comments for plugin reload, Backend return val and log

* revert Backend return type

* allow non-muxed plugins to serve v5

* move v5 code to existing sdk plugin package

* do next export sdk fields now that we have removed extra plugin pkg

* set TLSProvider in ServeMultiplex for backwards compat

* use bool to flag multiplexing support on grpc backend server

* revert userpass main.go

* refactor plugin sdk

- update comments
- make use of multiplexing boolean and single implementation ID const

* update comment and use multierr

* attempt v4 if dispense fails on getPluginTypeForUnknown

* update comments on sdk plugin backend
2022-08-29 21:42:26 -05:00
..
authmetadata
base62
certutil Support for generating Delta CRLs (#16773) 2022-08-29 11:37:09 -04:00
cidrutil only check Contains if IP address (#14487) 2022-03-15 09:55:50 -06:00
compressutil reformat using 'make fmt' (#13794) 2022-01-27 10:06:34 -08:00
consts Vault 7133/registry status (#16846) 2022-08-23 16:34:30 -04:00
cryptoutil
custommetadata VAULT-7256: Add custom_metadata to namespaces (#16640) 2022-08-09 11:38:03 -04:00
dbtxn refactor: replace strings.Replace with strings.ReplaceAll (#15392) 2022-08-03 15:22:48 -04:00
errutil
hclutil
identitytpl
jsonutil
kdf reformat using 'make fmt' (#13794) 2022-01-27 10:06:34 -08:00
keysutil Revert "Do not mask RSA verification misuse errors as verification failures (#16695)" (#16756) 2022-08-22 10:15:15 -04:00
ldaputil Fix handling of username_as_alias during LDAP authentication (#15525) 2022-05-20 14:17:26 -07:00
license
locksutil
logging Add endpoints to provide ability to modify logging verbosity (#16111) 2022-06-27 11:39:53 -04:00
mlock
parseutil
password
pathmanager Use %q for quoted strings where appropriate (#15216) 2022-08-03 12:32:45 -06:00
pluginutil feature: secrets/auth plugin multiplexing (#14946) 2022-08-29 21:42:26 -05:00
pointerutil
policyutil
roottoken Add helper for encoding/decoding root tokens and OTP generation in SDK module (#10504) (#10505) 2021-12-01 08:05:49 -05:00
salt
strutil
template
tlsutil
tokenutil
useragent sdk/useragent: plugin version string consistent with Vault version string (#14912) 2022-04-05 10:07:33 -07:00
wrapping
xor Add helper for encoding/decoding root tokens and OTP generation in SDK module (#10504) (#10505) 2021-12-01 08:05:49 -05:00