mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
DBPW - Enables AutoMTLS for DB plugins (#10220)
This also temporarily disables couchbase, elasticsearch, and mongodbatlas because the `Serve` function needs to change signatures and those plugins are vendored in from external repos, causing problems when building.
This commit is contained in:
@@ -45,6 +45,7 @@ func NewPluginClient(ctx context.Context, sys pluginutil.RunnerUtil, pluginRunne
|
||||
pluginutil.HandshakeConfig(handshakeConfig),
|
||||
pluginutil.Logger(logger),
|
||||
pluginutil.MetadataMode(isMetadataMode),
|
||||
pluginutil.AutoMTLS(true),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package dbplugin
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/go-plugin"
|
||||
@@ -11,11 +10,11 @@ import (
|
||||
// Serve is called from within a plugin and wraps the provided
|
||||
// Database implementation in a databasePluginRPCServer object and starts a
|
||||
// RPC server.
|
||||
func Serve(db Database, tlsProvider func() (*tls.Config, error)) {
|
||||
plugin.Serve(ServeConfig(db, tlsProvider))
|
||||
func Serve(db Database) {
|
||||
plugin.Serve(ServeConfig(db))
|
||||
}
|
||||
|
||||
func ServeConfig(db Database, tlsProvider func() (*tls.Config, error)) *plugin.ServeConfig {
|
||||
func ServeConfig(db Database) *plugin.ServeConfig {
|
||||
err := pluginutil.OptionallyEnableMlock()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
@@ -35,7 +34,6 @@ func ServeConfig(db Database, tlsProvider func() (*tls.Config, error)) *plugin.S
|
||||
HandshakeConfig: handshakeConfig,
|
||||
VersionedPlugins: pluginSets,
|
||||
GRPCServer: plugin.DefaultGRPCServer,
|
||||
TLSProvider: tlsProvider,
|
||||
}
|
||||
|
||||
return conf
|
||||
|
||||
Reference in New Issue
Block a user