open-vault/http
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
..
web_ui Make web_ui complient with Go's native embedding (#14246) 2022-02-24 09:12:36 -05:00
assets.go Convert to Go 1.17 go:build directive (#13579) 2022-01-05 12:02:03 -06:00
assets_stub.go Convert to Go 1.17 go:build directive (#13579) 2022-01-05 12:02:03 -06:00
auth_token_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
cors.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
custom_header_test.go reformat using 'make fmt' (#13794) 2022-01-27 10:06:34 -08:00
forwarded_for_test.go Revert "Migrate internalshared out (#9727)" (#10141) 2020-10-13 16:38:21 -07:00
forwarding_bench_test.go Update deps for consul-template 0.29.0 (#15293) 2022-05-05 10:30:40 -07:00
forwarding_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
handler.go Cleanup bool checks (#14102) 2022-02-18 07:35:53 -07:00
handler_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
help.go Vault-4010 Unauthenticated panic when processing "help" requests (#14704) 2022-03-24 12:19:14 -07:00
help_test.go Vault-4010 Unauthenticated panic when processing "help" requests (#14704) 2022-03-24 12:19:14 -07:00
http_test.go Customizing HTTP headers in the config file (#12485) 2021-10-13 11:06:33 -04:00
logical.go Add an OCSP responder to Vault's PKI plugin (#16723) 2022-08-22 14:06:15 -04:00
logical_test.go Address test flakiness in TestLogical_AuditPort (#16546) 2022-08-03 10:14:17 -04:00
plugin_test.go feature: secrets/auth plugin multiplexing (#14946) 2022-08-29 21:42:26 -05:00
sys_audit_test.go Re-add injecting into top routes (#5244) 2018-09-05 11:45:17 -04:00
sys_auth_test.go Vault 4632 auth remount oss (#14141) 2022-02-18 08:04:21 -08:00
sys_config_cors_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
sys_config_state_test.go Vault 3992 ToB Config and Plugins Permissions (#14817) 2022-04-04 09:45:41 -07:00
sys_feature_flags.go Feature flags API (#10613) 2021-01-06 16:05:00 -06:00
sys_generate_root.go SSCT Tokens Feature [OSS] (#14109) 2022-02-17 11:43:07 -08:00
sys_generate_root_test.go SSCT Tokens Feature [OSS] (#14109) 2022-02-17 11:43:07 -08:00
sys_health.go Migrate to sdk/internalshared libs in go-secure-stdlib (#12090) 2021-07-15 20:17:31 -04:00
sys_health_test.go OSS parts of #1891 (sys/health license addition) (#11676) 2021-05-20 13:32:15 -04:00
sys_hostinfo_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
sys_in_flight_requests.go reformat using 'make fmt' (#13794) 2022-01-27 10:06:34 -08:00
sys_in_flight_requests_test.go VAULT-1564 report in-flight requests (#13024) 2021-12-08 17:34:42 -05:00
sys_init.go Validate parameters for vault operator init (#16379) 2022-07-25 12:45:04 -07:00
sys_init_test.go OSS portion of wrapper-v2 (#16811) 2022-08-23 15:37:16 -04:00
sys_internal_test.go Kv preflight (#4430) 2018-04-23 15:00:02 -07:00
sys_leader.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
sys_leader_test.go core: Record the time a node became active (#10489) 2020-12-11 16:50:19 -08:00
sys_lease_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
sys_metrics.go Customizing HTTP headers in the config file (#12485) 2021-10-13 11:06:33 -04:00
sys_metrics_test.go Authenticate to "login" endpoint for non-existent mount path bug (#13162) 2021-11-22 17:06:59 -08:00
sys_monitor_test.go api/monitor: Adding log format to monitor command and debug (#15536) 2022-05-24 13:10:53 -04:00
sys_mount_test.go Revert "MFA (#14049)" (#14135) 2022-02-17 13:17:59 -07:00
sys_mounts_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
sys_policy_test.go Re-add injecting into top routes (#5244) 2018-09-05 11:45:17 -04:00
sys_raft.go Use %q for quoted strings where appropriate (#15216) 2022-08-03 12:32:45 -06:00
sys_rekey.go Support processing parameters sent as a URL-encoded form (#8325) 2020-02-12 14:20:22 -08:00
sys_rekey_test.go The big one (#5346) 2018-09-17 23:03:00 -04:00
sys_rotate_test.go OSS side barrier encryption tracking and automatic rotation (#11007) 2021-02-25 14:27:25 -06:00
sys_seal.go Implement sys/seal-status and sys/leader in system backend (#10725) 2021-01-20 14:04:24 -06:00
sys_seal_test.go Add build date (#14957) 2022-04-19 14:28:08 -04:00
sys_wrapping_test.go VAULT-7698 Fix ignored parameter warnings for endpoint arbitrary data options (#16794) 2022-08-23 08:51:23 -04:00
testing.go reformat using 'make fmt' (#13794) 2022-01-27 10:06:34 -08:00
unwrapping_raw_body_test.go Revert the WithContext changes to vault tests (#14947) 2022-04-07 15:12:58 -04:00
util.go VAULT-6614 Enable role based quotas for lease-count quotas (OSS) (#16157) 2022-07-05 13:02:00 -04:00