open-vault/sdk/plugin
Alexander Scheel 6930568076
Add path based primary write forwarding (PBPWF) - OSS (#18735)
* Add WriteForwardedStorage to sdk's plugin, logical in OSS

This should allow backends to specify paths to forward write
(storage.Put(...) and storage.Delete(...)) operations for.

Notably, these semantics are subject to change and shouldn't yet be
relied on.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Collect paths for write forwarding in OSS

This adds a path manager to Core, allowing tracking across all Vault
versions of paths which could use write forwarding if available. In
particular, even on OSS offerings, we'll need to template {{clusterId}}
into the paths, in the event of later upgrading to Enterprise. If we
didn't, we'd end up writing paths which will no longer be accessible
post-migration, due to write forwarding now replacing the sentinel with
the actual cluster identifier.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add forwarded writer implementation to OSS

Here, for paths given to us, we determine if we need to do cluster
translation and perform local writing. This is the OSS variant.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Wire up mount-specific request forwarding in OSS

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Clarify that state lock needs to be held to call HAState in OSS

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Move cluster sentinel constant to sdk/logical

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Expose ClusterID to Plugins via SystemView

This will let plugins learn what the Cluster's ID is, without having to
resort to hacks like writing a random string to its cluster-prefixed
namespace and then reading it once it has replicated.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add GRPC ClusterID implementation

For any external plugins which wish to use it.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-01-20 16:36:18 -05:00
..
mock Plugins: Tighten requirements for multiplexing (#17403) 2022-10-05 09:29:29 +01:00
pb Add path based primary write forwarding (PBPWF) - OSS (#18735) 2023-01-20 16:36:18 -05:00
backend.go fix: remove premature GRPC client connection close from vault (#17321) 2022-09-29 14:11:34 -07:00
grpc_backend.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
grpc_backend_client.go Add path based primary write forwarding (PBPWF) - OSS (#18735) 2023-01-20 16:36:18 -05:00
grpc_backend_server.go Add path based primary write forwarding (PBPWF) - OSS (#18735) 2023-01-20 16:36:18 -05:00
grpc_backend_test.go Plugins: Update running version everywhere running sha256 is set (#17292) 2022-09-23 11:19:38 +01:00
grpc_storage.go Check if sys view is missing in GRPC sys view (#18210) 2022-12-02 10:12:05 -08:00
grpc_system.go Add path based primary write forwarding (PBPWF) - OSS (#18735) 2023-01-20 16:36:18 -05:00
grpc_system_test.go Check if sys view is missing in GRPC sys view (#18210) 2022-12-02 10:12:05 -08:00
logger.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
logger_test.go feature: secrets/auth plugin multiplexing (#14946) 2022-08-29 21:42:26 -05:00
middleware.go Add plugin version to GRPC interface (#17088) 2022-09-15 16:37:59 -07:00
plugin.go Add plugin version to GRPC interface (#17088) 2022-09-15 16:37:59 -07:00
plugin_v5.go Add plugin version to GRPC interface (#17088) 2022-09-15 16:37:59 -07:00
serve.go feature: secrets/auth plugin multiplexing (#14946) 2022-08-29 21:42:26 -05:00
storage_test.go Check if sys view is missing in GRPC sys view (#18210) 2022-12-02 10:12:05 -08:00