adding grpc mutual tls
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user