open-vault/http
Christopher Swenson b136a7ecd8
Add plugin version to GRPC interface (#17088)
Add plugin version to GRPC interface

Added a version interface in the sdk/logical so that it can be shared between all plugin types, and then wired it up to RunningVersion in the mounts, auth list, and database systems.

I've tested that this works with auth, database, and secrets plugin types, with the following logic to populate RunningVersion:

If a plugin has a PluginVersion() method implemented, then that is used
If not, and the plugin is built into the Vault binary, then the go.mod version is used
Otherwise, the it will be the empty string.
My apologies for the length of this PR.

* Placeholder backend should be external

We use a placeholder backend (previously a framework.Backend) before a
GRPC plugin is lazy-loaded. This makes us later think the plugin is a
builtin plugin.

So we added a `placeholderBackend` type that overrides the
`IsExternal()` method so that later we know that the plugin is external,
and don't give it a default builtin version.
2022-09-15 16:37:59 -07:00
..
web_ui Make web_ui complient with Go's native embedding (#14246) 2022-02-24 09:12:36 -05:00
assets.go update gofumpt to 0.3.1 and reformat the repo (#17055) 2022-09-07 17:31:20 -07: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 update gofumpt to 0.3.1 and reformat the repo (#17055) 2022-09-07 17:31:20 -07:00
handler_test.go Add plugin version to GRPC interface (#17088) 2022-09-15 16:37:59 -07: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 update gofumpt to 0.3.1 and reformat the repo (#17055) 2022-09-07 17:31:20 -07:00
logical_test.go Parse query parameters for GET request turned in logical.ListOperation (#16991) 2022-09-02 14:21:25 -07:00
plugin_test.go Support version selection for database plugins (#16982) 2022-09-09 17:32:28 +01:00
sys_audit_test.go Re-add injecting into top routes (#5244) 2018-09-05 11:45:17 -04:00
sys_auth_test.go Add plugin version to GRPC interface (#17088) 2022-09-15 16:37:59 -07: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 Add plugin version to GRPC interface (#17088) 2022-09-15 16:37: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