Revert "AutoMTLS for secrets/auth plugins (#15671)" (#16377)

This reverts commit 39bcd5c715.
This commit is contained in:
John-Michael Faircloth
2022-07-20 10:36:23 -05:00
committed by GitHub
parent a5f6b1cc70
commit 58b88b8aca
14 changed files with 439 additions and 740 deletions

View File

@@ -20,10 +20,9 @@ var (
// GRPCBackendPlugin is the plugin.Plugin implementation that only supports GRPC
// transport
type GRPCBackendPlugin struct {
Factory logical.Factory
MetadataMode bool
AutoMTLSSupported bool
Logger log.Logger
Factory logical.Factory
MetadataMode bool
Logger log.Logger
// Embeding this will disable the netRPC protocol
plugin.NetRPCUnsupportedPlugin
@@ -42,13 +41,12 @@ func (b GRPCBackendPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server)
func (b *GRPCBackendPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) {
ret := &backendGRPCPluginClient{
client: pb.NewBackendClient(c),
clientConn: c,
broker: broker,
cleanupCh: make(chan struct{}),
doneCtx: ctx,
// Only run in metadata mode if mode is true and autoMTLS is not supported
metadataMode: b.MetadataMode && !b.AutoMTLSSupported,
client: pb.NewBackendClient(c),
clientConn: c,
broker: broker,
cleanupCh: make(chan struct{}),
doneCtx: ctx,
metadataMode: b.MetadataMode,
}
// Create the value and set the type