open-vault/builtin/logical/database
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
..
dbplugin Support version selection for database plugins (#16982) 2022-09-09 17:32:28 +01:00
backend.go Support version selection for database plugins (#16982) 2022-09-09 17:32:28 +01:00
backend_test.go Support version selection for database plugins (#16982) 2022-09-09 17:32:28 +01:00
credentials.go secrets/database: adds ability to manage alternative credential types and configuration (#15376) 2022-05-17 09:21:26 -07:00
credentials_test.go secrets/database: adds ability to manage alternative credential types and configuration (#15376) 2022-05-17 09:21:26 -07:00
mocks_test.go DBPW - Copy newdbplugin package to dbplugin/v5 (#10151) 2020-10-15 13:20:12 -06:00
mockv4.go DBPW - Copy newdbplugin package to dbplugin/v5 (#10151) 2020-10-15 13:20:12 -06:00
mockv5.go db plugin multiplexing: add test coverage (#14330) 2022-03-03 08:40:46 -06:00
path_config_connection.go Support version selection for database plugins (#16982) 2022-09-09 17:32:28 +01:00
path_creds_create.go secrets/database: adds ability to manage alternative credential types and configuration (#15376) 2022-05-17 09:21:26 -07:00
path_roles.go secrets/database: adds ability to manage alternative credential types and configuration (#15376) 2022-05-17 09:21:26 -07:00
path_roles_test.go secrets/database: adds ability to manage alternative credential types and configuration (#15376) 2022-05-17 09:21:26 -07:00
path_rotate_credentials.go Cleanup and simplify lock usage in database plugin (#15944) 2022-06-17 10:05:27 -07:00
rollback.go secrets/database: adds ability to manage alternative credential types and configuration (#15376) 2022-05-17 09:21:26 -07:00
rollback_test.go update gofumpt to 0.3.1 and reformat the repo (#17055) 2022-09-07 17:31:20 -07:00
rotation.go update gofumpt to 0.3.1 and reformat the repo (#17055) 2022-09-07 17:31:20 -07:00
rotation_test.go Pin MongoDB test container images pre-v6 (#16880) 2022-08-25 08:14:37 -07:00
secret_creds.go DBPW - Copy newdbplugin package to dbplugin/v5 (#10151) 2020-10-15 13:20:12 -06:00
version_wrapper.go Add plugin version to GRPC interface (#17088) 2022-09-15 16:37:59 -07:00
version_wrapper_test.go secrets/database: adds ability to manage alternative credential types and configuration (#15376) 2022-05-17 09:21:26 -07:00
versioning_large_test.go Support version selection for database plugins (#16982) 2022-09-09 17:32:28 +01:00