Skip to content

Commit a940ff0

Browse files
remove tls (#44)
Co-authored-by: Luke Lombardi <[email protected]>
1 parent 29d19f4 commit a940ff0

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

pkg/client.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package blobcache
22

33
import (
44
"context"
5-
"crypto/tls"
65
"io"
76
"sync"
87
"time"
@@ -11,7 +10,6 @@ import (
1110
rendezvous "github.com/beam-cloud/rendezvous"
1211
"github.com/hanwen/go-fuse/v2/fuse"
1312
"google.golang.org/grpc"
14-
"google.golang.org/grpc/credentials"
1513
"google.golang.org/grpc/credentials/insecure"
1614
"google.golang.org/grpc/metadata"
1715
)
@@ -137,11 +135,7 @@ func (c *BlobCacheClient) GetNearbyHosts() ([]*BlobCacheHost, error) {
137135
func (c *BlobCacheClient) addHost(host *BlobCacheHost) error {
138136
transportCredentials := grpc.WithTransportCredentials(insecure.NewCredentials())
139137

140-
isTLS := c.globalConfig.TLSEnabled
141-
if isTLS {
142-
h2creds := credentials.NewTLS(&tls.Config{NextProtos: []string{"h2"}})
143-
transportCredentials = grpc.WithTransportCredentials(h2creds)
144-
}
138+
// TODO: revisit TLS here for external addresses, for now since we're using the internal (private) addresses, it should only use TLS for the coordinator
145139

146140
addr := host.Addr
147141

pkg/discovery.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ func (d *DiscoveryClient) discoverHosts(ctx context.Context) ([]*BlobCacheHost,
9898

9999
// GetHostState attempts to connect to the gRPC service and verifies its availability
100100
func (d *DiscoveryClient) GetHostState(ctx context.Context, host *BlobCacheHost) (*BlobCacheHost, error) {
101+
transportCredentials := grpc.WithTransportCredentials(insecure.NewCredentials())
102+
101103
var dialOpts = []grpc.DialOption{
102-
grpc.WithTransportCredentials(insecure.NewCredentials()),
104+
transportCredentials,
103105
grpc.WithDefaultCallOptions(
104106
grpc.MaxCallRecvMsgSize(d.cfg.GRPCMessageSizeBytes),
105107
grpc.MaxCallSendMsgSize(d.cfg.GRPCMessageSizeBytes),

0 commit comments

Comments
 (0)