aboutsummaryrefslogtreecommitdiff
path: root/weed/command/s3.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/s3.go
parent55761ae806bc7cc8ab34424508aee5481131b941 (diff)
downloadseaweedfs-77b9af531d18e10b04b49b069b5f26a329ed4902.tar.xz
seaweedfs-77b9af531d18e10b04b49b069b5f26a329ed4902.zip
adding grpc mutual tls
Diffstat (limited to 'weed/command/s3.go')
-rw-r--r--weed/command/s3.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/command/s3.go b/weed/command/s3.go
index 16a9490ff..a54ddd2f7 100644
--- a/weed/command/s3.go
+++ b/weed/command/s3.go
@@ -1,6 +1,9 @@
package command
import (
+ "github.com/chrislusf/seaweedfs/weed/security"
+ "github.com/chrislusf/seaweedfs/weed/server"
+ "github.com/spf13/viper"
"net/http"
"time"
@@ -46,6 +49,8 @@ var cmdS3 = &Command{
func runS3(cmd *Command, args []string) bool {
+ weed_server.LoadConfiguration("security", false)
+
filerGrpcAddress, err := parseFilerGrpcAddress(*s3options.filer, *s3options.filerGrpcPort)
if err != nil {
glog.Fatal(err)
@@ -59,6 +64,7 @@ func runS3(cmd *Command, args []string) bool {
FilerGrpcAddress: filerGrpcAddress,
DomainName: *s3options.domainName,
BucketsPath: *s3options.filerBucketsPath,
+ GrpcDialOption: security.LoadClientTLS(viper.Sub("grpc"), "client"),
})
if s3ApiServer_err != nil {
glog.Fatalf("S3 API Server startup error: %v", s3ApiServer_err)