Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Commit

Permalink
update reva
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Feb 21, 2020
1 parent 584d47d commit 06425a6
Show file tree
Hide file tree
Showing 21 changed files with 236 additions and 754 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ go 1.13

require (
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cs3org/go-cs3apis v0.0.0-20191218073906-e3405ff6775e // indirect
github.com/cs3org/reva v0.0.2-0.20200115110931-4c7513415ec5
github.com/cs3org/reva v0.0.2-0.20200212114015-0dbce24f7e8b
github.com/gofrs/uuid v3.2.0+incompatible
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/micro/cli/v2 v2.1.1
Expand Down
16 changes: 16 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ github.com/ascarter/requestid v0.0.0-20170313220838-5b76ab3d4aee/go.mod h1:u7Wtt
github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.28.2 h1:j5IXG9CdyLfcVfICqo1PXVv+rua+QQHbkXuvuU/JF+8=
github.com/aws/aws-sdk-go v1.28.2/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.28.13 h1:JyCQQ86yil3hg7MtWdNH8Pbcgx92qlUV2v22Km63Mf4=
github.com/aws/aws-sdk-go v1.28.13/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
Expand Down Expand Up @@ -109,12 +111,15 @@ github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc
github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM=
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk=
github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c=
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok=
Expand All @@ -125,8 +130,12 @@ github.com/cs3org/go-cs3apis v0.0.0-20191128165347-19746c015c83 h1:9bcp1jc6+36XU
github.com/cs3org/go-cs3apis v0.0.0-20191128165347-19746c015c83/go.mod h1:IsVGyZrOLUQD48JIhlM/xb3Vz6He5o2+W0ZTfUGY+IU=
github.com/cs3org/go-cs3apis v0.0.0-20191218073906-e3405ff6775e h1:cPcpOoPLdsIV2Bw1xMJCIw4ZAejtQqA6J0U56YHOJeQ=
github.com/cs3org/go-cs3apis v0.0.0-20191218073906-e3405ff6775e/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/go-cs3apis v0.0.0-20200115100126-824a5f718250 h1:N/WWs9OegcgFlsUo7/iahxq+e3luhZKu0B8wLrWBsTQ=
github.com/cs3org/go-cs3apis v0.0.0-20200115100126-824a5f718250/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva v0.0.2-0.20200115110931-4c7513415ec5 h1:PkGon9KVtcApu462KRAmFV3iKHOk0S0CRoEzoar4eyE=
github.com/cs3org/reva v0.0.2-0.20200115110931-4c7513415ec5/go.mod h1:Hk3eCcdhtv4eIhKvRK736fQuOyS1HuHnUcz0Dq6NK1A=
github.com/cs3org/reva v0.0.2-0.20200212114015-0dbce24f7e8b h1:8kfSFbzmolP/ZAm455PsAjD5qSqpESryEjpK0ceAWS0=
github.com/cs3org/reva v0.0.2-0.20200212114015-0dbce24f7e8b/go.mod h1:/Sg6MOumvaYkxRJJNZ0c8AvDJe+sn7MJnnxJfwY2MhE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -185,6 +194,7 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM=
github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
Expand All @@ -208,6 +218,8 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
Expand Down Expand Up @@ -571,6 +583,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA=
go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY=
Expand Down Expand Up @@ -785,6 +799,8 @@ google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
Expand Down
14 changes: 3 additions & 11 deletions pkg/command/authbasic.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,12 @@ func AuthBasic(cfg *config.Config) *cli.Command {
"core": map[string]interface{}{
"max_cpus": cfg.Reva.AuthBasic.MaxCPUs,
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.AuthBasic.Network,
"address": cfg.Reva.AuthBasic.Addr,
// TODO extract interceptor config, which is the same for all grpc services
"interceptors": map[string]interface{}{
"auth": map[string]interface{}{
"token_manager": "jwt",
"token_managers": map[string]interface{}{
"jwt": map[string]interface{}{
"secret": cfg.Reva.JWTSecret,
},
},
},
},
// TODO build services dynamically
"services": map[string]interface{}{
"authprovider": map[string]interface{}{
Expand Down
14 changes: 3 additions & 11 deletions pkg/command/authbearer.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,12 @@ func AuthBearer(cfg *config.Config) *cli.Command {
"core": map[string]interface{}{
"max_cpus": cfg.Reva.AuthBearer.MaxCPUs,
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.AuthBearer.Network,
"address": cfg.Reva.AuthBearer.Addr,
// TODO extract interceptor config, which is the same for all grpc services
"interceptors": map[string]interface{}{
"auth": map[string]interface{}{
"token_manager": "jwt",
"token_managers": map[string]interface{}{
"jwt": map[string]interface{}{
"secret": cfg.Reva.JWTSecret,
},
},
},
},
// TODO build services dynamically
"services": map[string]interface{}{
"authprovider": map[string]interface{}{
Expand Down
53 changes: 6 additions & 47 deletions pkg/command/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,71 +82,30 @@ func Frontend(cfg *config.Config) *cli.Command {
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Frontend.MaxCPUs,
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
},
"http": map[string]interface{}{
"network": cfg.Reva.Frontend.Network,
"address": cfg.Reva.Frontend.Addr,
"middlewares": map[string]interface{}{
"auth": map[string]interface{}{
"gateway": cfg.Reva.Gateway.URL,
"credential_chain": []string{"basic", "bearer"},
"token_strategy": "header",
"token_writer": "header",
"token_manager": "jwt",
"token_managers": map[string]interface{}{
"jwt": map[string]interface{}{
"secret": cfg.Reva.JWTSecret,
},
},
},
"cors": map[string]interface{}{
"allowed_origins": []string{"*"},
"allowed_methods": []string{
"OPTIONS",
"GET",
"PUT",
"POST",
"DELETE",
"MKCOL",
"PROPFIND",
"PROPPATCH",
"MOVE",
"COPY",
"REPORT",
"SEARCH",
},
"allowed_headers": []string{
"Origin",
"Accept",
"Depth",
"Content-Type",
"X-Requested-With",
"Authorization",
"Ocs-Apirequest",
"If-Match",
"If-None-Match",
"Destination",
"Overwrite",
},
"allow_credentials": true,
"options_passthrough": false,
"allow_credentials": true,
},
},
// TODO build services dynamically
"services": map[string]interface{}{
"datagateway": map[string]interface{}{
"prefix": "data",
"gateway": "", // TODO not needed?
"transfer_shared_secret": cfg.Reva.TransferSecret,
},
"ocdav": map[string]interface{}{
"prefix": "",
"chunk_folder": "/var/tmp/revad/chunks",
"gateway": cfg.Reva.Gateway.URL,
"chunk_folder": "/var/tmp/reva/chunks",
"files_namespace": cfg.Reva.OCDav.DavFilesNamespace,
"webdav_namespace": cfg.Reva.OCDav.WebdavNamespace,
},
"ocs": map[string]interface{}{
"gateway": cfg.Reva.Gateway.URL,
"config": map[string]interface{}{
"version": "1.8",
"website": "reva",
Expand Down
31 changes: 11 additions & 20 deletions pkg/command/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,13 @@ func Gateway(cfg *config.Config) *cli.Command {
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Gateway.MaxCPUs,
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
},
"grpc": map[string]interface{}{
"network": cfg.Reva.Gateway.Network,
"address": cfg.Reva.Gateway.Addr,
// TODO extract interceptor config, which is the same for all grpc services
"interceptors": map[string]interface{}{
"auth": map[string]interface{}{
"token_manager": "jwt",
"token_managers": map[string]interface{}{
"jwt": map[string]interface{}{
"secret": cfg.Reva.JWTSecret,
},
},
},
},
// TODO build services dynamically
"services": map[string]interface{}{
"gateway": map[string]interface{}{
Expand All @@ -104,16 +97,13 @@ func Gateway(cfg *config.Config) *cli.Command {
"publicshareprovidersvc": cfg.Reva.Sharing.URL,
"ocmshareprovidersvc": cfg.Reva.Sharing.URL,
"commit_share_to_storage_grant": cfg.Reva.Gateway.CommitShareToStorageGrant,
"commit_share_to_storage_ref": cfg.Reva.Gateway.CommitShareToStorageRef,
"share_folder": cfg.Reva.Gateway.ShareFolder, // ShareFolder is the location where to create shares in the recipient's storage provider.
// other
"datagateway": cfg.Reva.Frontend.URL,
"transfer_shared_secret": cfg.Reva.TransferSecret,
"transfer_expires": cfg.Reva.TransferExpires,
"token_manager": "jwt",
"token_managers": map[string]interface{}{
"jwt": map[string]interface{}{
"secret": cfg.Reva.JWTSecret,
},
},
"disable_home_creation_on_login": cfg.Reva.Gateway.DisableHomeCreationOnLogin,
"datagateway": cfg.Reva.Frontend.URL,
"transfer_shared_secret": cfg.Reva.TransferSecret,
"transfer_expires": cfg.Reva.TransferExpires,
},
"authregistry": map[string]interface{}{
"driver": "static",
Expand All @@ -130,6 +120,7 @@ func Gateway(cfg *config.Config) *cli.Command {
"driver": "static",
"drivers": map[string]interface{}{
"static": map[string]interface{}{
"home_provider": cfg.Reva.StorageHome.MountPath,
"rules": map[string]interface{}{
cfg.Reva.StorageRoot.MountPath: cfg.Reva.StorageRoot.URL,
cfg.Reva.StorageRoot.MountID: cfg.Reva.StorageRoot.URL,
Expand Down
14 changes: 3 additions & 11 deletions pkg/command/sharing.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,12 @@ func Sharing(cfg *config.Config) *cli.Command {
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Sharing.MaxCPUs,
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.Sharing.Network,
"address": cfg.Reva.Sharing.Addr,
// TODO extract interceptor config, which is the same for all grpc services
"interceptors": map[string]interface{}{
"auth": map[string]interface{}{
"token_manager": "jwt",
"token_managers": map[string]interface{}{
"jwt": map[string]interface{}{
"secret": cfg.Reva.JWTSecret,
},
},
},
},
// TODO build services dynamically
"services": map[string]interface{}{
"usershareprovider": map[string]interface{}{
Expand Down
30 changes: 9 additions & 21 deletions pkg/command/storagehome.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,12 @@ func StorageHome(cfg *config.Config) *cli.Command {
"core": map[string]interface{}{
"max_cpus": cfg.Reva.StorageHome.MaxCPUs,
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.StorageHome.Network,
"address": cfg.Reva.StorageHome.Addr,
// TODO extract interceptor config, which is the same for all grpc services
"interceptors": map[string]interface{}{
"auth": map[string]interface{}{
"token_manager": "jwt",
"token_managers": map[string]interface{}{
"jwt": map[string]interface{}{
"secret": cfg.Reva.JWTSecret,
},
},
},
},
// TODO build services dynamically
"services": map[string]interface{}{
"storageprovider": map[string]interface{}{
Expand All @@ -114,7 +106,6 @@ func StorageHome(cfg *config.Config) *cli.Command {
"owncloud": map[string]interface{}{
"datadirectory": cfg.Reva.Storages.OwnCloud.Datadirectory,
"scan": cfg.Reva.Storages.OwnCloud.Scan,
"autocreate": cfg.Reva.Storages.OwnCloud.Autocreate,
"redis": cfg.Reva.Storages.OwnCloud.Redis,
},
"s3": map[string]interface{}{
Expand All @@ -126,21 +117,18 @@ func StorageHome(cfg *config.Config) *cli.Command {
"prefix": cfg.Reva.Storages.S3.Prefix,
},
},
"path_wrapper": cfg.Reva.StorageHome.PathWrapper,
"mount_path": cfg.Reva.StorageHome.MountPath,
"mount_id": cfg.Reva.StorageHome.MountID,
"expose_data_server": cfg.Reva.StorageHome.ExposeDataServer,
"path_wrapper": cfg.Reva.StorageHome.PathWrapper,
"path_wrappers": map[string]interface{}{
"context": map[string]interface{}{
"prefix": cfg.Reva.StorageHome.PathWrapperContext.Prefix,
},
},
"mount_path": cfg.Reva.StorageHome.MountPath,
"mount_id": cfg.Reva.StorageHome.MountID,
"expose_data_server": cfg.Reva.StorageHome.ExposeDataServer,
// TODO use cfg.Reva.StorageHomeData.URL, ?
"data_server_url": cfg.Reva.StorageHome.DataServerURL,
"available_checksums": map[string]interface{}{
"md5": 100,
"unset": 1000,
},
"data_server_url": cfg.Reva.StorageHome.DataServerURL,
"enable_home_creation": cfg.Reva.StorageHome.EnableHomeCreation,
},
},
},
Expand Down
18 changes: 3 additions & 15 deletions pkg/command/storagehomedata.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,12 @@ func StorageHomeData(cfg *config.Config) *cli.Command {
"core": map[string]interface{}{
"max_cpus": cfg.Reva.StorageHomeData.MaxCPUs,
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"http": map[string]interface{}{
"network": cfg.Reva.StorageHomeData.Network,
"address": cfg.Reva.StorageHomeData.Addr,
"middlewares": map[string]interface{}{
"auth": map[string]interface{}{
"gateway": cfg.Reva.Gateway.URL,
"credential_chain": []string{"basic", "bearer"},
"token_strategy": "header",
"token_writer": "header",
"token_manager": "jwt",
"token_managers": map[string]interface{}{
"jwt": map[string]interface{}{
"secret": cfg.Reva.JWTSecret,
},
},
},
},
// TODO build services dynamically
"services": map[string]interface{}{
"dataprovider": map[string]interface{}{
Expand Down Expand Up @@ -118,7 +107,6 @@ func StorageHomeData(cfg *config.Config) *cli.Command {
"owncloud": map[string]interface{}{
"datadirectory": cfg.Reva.Storages.OwnCloud.Datadirectory,
"scan": cfg.Reva.Storages.OwnCloud.Scan,
"autocreate": cfg.Reva.Storages.OwnCloud.Autocreate,
"redis": cfg.Reva.Storages.OwnCloud.Redis,
},
"s3": map[string]interface{}{
Expand Down
Loading

0 comments on commit 06425a6

Please sign in to comment.