aboutsummaryrefslogtreecommitdiff
path: root/weed/command/filer.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-02-18 12:11:52 -0800
committerChris Lu <chris.lu@gmail.com>2019-02-18 12:11:52 -0800
commit77b9af531d18e10b04b49b069b5f26a329ed4902 (patch)
treecae2524dfc445b352e5d6bab7a82f7af46b7a4c8 /weed/command/filer.go
parent55761ae806bc7cc8ab34424508aee5481131b941 (diff)
downloadseaweedfs-77b9af531d18e10b04b49b069b5f26a329ed4902.tar.xz
seaweedfs-77b9af531d18e10b04b49b069b5f26a329ed4902.zip
adding grpc mutual tls
Diffstat (limited to 'weed/command/filer.go')
-rw-r--r--weed/command/filer.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/command/filer.go b/weed/command/filer.go
index a07a67471..478b7d6bf 100644
--- a/weed/command/filer.go
+++ b/weed/command/filer.go
@@ -1,6 +1,8 @@
package command
import (
+ "github.com/chrislusf/seaweedfs/weed/security"
+ "github.com/spf13/viper"
"net/http"
"strconv"
"strings"
@@ -75,6 +77,8 @@ var cmdFiler = &Command{
func runFiler(cmd *Command, args []string) bool {
+ weed_server.LoadConfiguration("security", false)
+
f.startFiler()
return true
@@ -141,7 +145,7 @@ func (fo *FilerOptions) startFiler() {
if err != nil {
glog.Fatalf("failed to listen on grpc port %d: %v", grpcPort, err)
}
- grpcS := util.NewGrpcServer()
+ grpcS := util.NewGrpcServer(security.LoadServerTLS(viper.Sub("grpc"), "filer"))
filer_pb.RegisterSeaweedFilerServer(grpcS, fs)
reflection.Register(grpcS)
go grpcS.Serve(grpcL)