open-vault/sdk/plugin/mock
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
..
backend.go Add plugin version to GRPC interface (#17088) 2022-09-15 16:37:59 -07:00
backend_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
path_errors.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path_internal.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path_kv.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path_raw.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
path_special.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00