From 879827ca4baebf066119f1a1f203eab5e6aa661a Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 12 Oct 2021 14:00:33 +0200 Subject: [PATCH 1/2] don't expose services by default --- accounts/pkg/flagset/flagset.go | 4 +-- .../dont-expose-services-by-default.md | 7 ++++ glauth/pkg/flagset/flagset.go | 8 ++--- graph-explorer/pkg/flagset/flagset.go | 6 ++-- graph/pkg/flagset/flagset.go | 6 ++-- idp/pkg/flagset/flagset.go | 6 ++-- ocis/pkg/flagset/flagset.go | 8 ++--- ocis/pkg/runtime/cmd/root.go | 34 ------------------- ocs/pkg/flagset/flagset.go | 6 ++-- proxy/pkg/flagset/flagset.go | 4 +-- settings/pkg/flagset/flagset.go | 8 ++--- storage/pkg/command/groups.go | 10 +++--- storage/pkg/command/storagemetadata.go | 6 ++-- storage/pkg/command/users.go | 10 +++--- storage/pkg/flagset/appprovider.go | 4 +-- storage/pkg/flagset/authbasic.go | 4 +-- storage/pkg/flagset/authbearer.go | 4 +-- storage/pkg/flagset/frontend.go | 4 +-- storage/pkg/flagset/gateway.go | 4 +-- storage/pkg/flagset/groups.go | 4 +-- storage/pkg/flagset/health.go | 2 +- storage/pkg/flagset/sharing.go | 4 +-- storage/pkg/flagset/storagehome.go | 6 ++-- storage/pkg/flagset/storagemetadata.go | 6 ++-- storage/pkg/flagset/storagepubliclink.go | 4 +-- storage/pkg/flagset/storageusers.go | 6 ++-- storage/pkg/flagset/users.go | 4 +-- store/pkg/flagset/flagset.go | 11 ++++-- thumbnails/pkg/flagset/flagset.go | 6 ++-- web/pkg/flagset/flagset.go | 6 ++-- webdav/pkg/flagset/flagset.go | 6 ++-- 31 files changed, 94 insertions(+), 114 deletions(-) create mode 100644 changelog/unreleased/dont-expose-services-by-default.md delete mode 100644 ocis/pkg/runtime/cmd/root.go diff --git a/accounts/pkg/flagset/flagset.go b/accounts/pkg/flagset/flagset.go index dd4db4e61f8..3b99a9293a5 100644 --- a/accounts/pkg/flagset/flagset.go +++ b/accounts/pkg/flagset/flagset.go @@ -87,7 +87,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9181"), + Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9181"), Usage: "Address to bind http server", EnvVars: []string{"ACCOUNTS_HTTP_ADDR"}, Destination: &cfg.HTTP.Addr, @@ -115,7 +115,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "grpc-addr", - Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "0.0.0.0:9180"), + Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "127.0.0.1:9180"), Usage: "Address to bind grpc server", EnvVars: []string{"ACCOUNTS_GRPC_ADDR"}, Destination: &cfg.GRPC.Addr, diff --git a/changelog/unreleased/dont-expose-services-by-default.md b/changelog/unreleased/dont-expose-services-by-default.md new file mode 100644 index 00000000000..c2e775c288a --- /dev/null +++ b/changelog/unreleased/dont-expose-services-by-default.md @@ -0,0 +1,7 @@ +Security: Don't expose services by default + +We've changed the bind behaviour for all non public facing services. Before this PR +all services would listen on all interfaces. After this PR, all services listen on +127.0.0.1 only, except the proxy which is listening on 0.0.0.0:9200. + +https://github.com/owncloud/ocis/issues/2612 diff --git a/glauth/pkg/flagset/flagset.go b/glauth/pkg/flagset/flagset.go index ba62015419d..74b85dd746f 100644 --- a/glauth/pkg/flagset/flagset.go +++ b/glauth/pkg/flagset/flagset.go @@ -38,7 +38,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9129"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9129"), Usage: "Address to debug endpoint", EnvVars: []string{"GLAUTH_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -98,7 +98,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9129"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9129"), Usage: "Address to bind debug server", EnvVars: []string{"GLAUTH_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -132,7 +132,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "ldap-addr", - Value: flags.OverrideDefaultString(cfg.Ldap.Addr, "0.0.0.0:9125"), + Value: flags.OverrideDefaultString(cfg.Ldap.Addr, "127.0.0.1:9125"), Usage: "Address to bind ldap server", EnvVars: []string{"GLAUTH_LDAP_ADDR"}, Destination: &cfg.Ldap.Addr, @@ -147,7 +147,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "ldaps-addr", - Value: flags.OverrideDefaultString(cfg.Ldaps.Addr, "0.0.0.0:9126"), + Value: flags.OverrideDefaultString(cfg.Ldaps.Addr, "127.0.0.1:9126"), Usage: "Address to bind ldap server", EnvVars: []string{"GLAUTH_LDAPS_ADDR"}, Destination: &cfg.Ldaps.Addr, diff --git a/graph-explorer/pkg/flagset/flagset.go b/graph-explorer/pkg/flagset/flagset.go index 30dbe0e59b1..540780e47f4 100644 --- a/graph-explorer/pkg/flagset/flagset.go +++ b/graph-explorer/pkg/flagset/flagset.go @@ -35,7 +35,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9136"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9136"), Usage: "Address to debug endpoint", EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -88,7 +88,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9136"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9136"), Usage: "Address to bind debug server", EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -114,7 +114,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9135"), + Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9135"), Usage: "Address to bind http server", EnvVars: []string{"GRAPH_EXPLORER_HTTP_ADDR"}, Destination: &cfg.HTTP.Addr, diff --git a/graph/pkg/flagset/flagset.go b/graph/pkg/flagset/flagset.go index 9ac8ca49ea2..a8df40fa5b2 100644 --- a/graph/pkg/flagset/flagset.go +++ b/graph/pkg/flagset/flagset.go @@ -42,7 +42,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9124"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9124"), Usage: "Address to debug endpoint", EnvVars: []string{"GRAPH_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -95,7 +95,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9124"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9124"), Usage: "Address to bind debug server", EnvVars: []string{"GRAPH_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -121,7 +121,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9120"), + Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9120"), Usage: "Address to bind http server", EnvVars: []string{"GRAPH_HTTP_ADDR"}, Destination: &cfg.HTTP.Addr, diff --git a/idp/pkg/flagset/flagset.go b/idp/pkg/flagset/flagset.go index 39eb26d6489..649e11a9969 100644 --- a/idp/pkg/flagset/flagset.go +++ b/idp/pkg/flagset/flagset.go @@ -38,7 +38,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9134"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9134"), Usage: "Address to debug endpoint", EnvVars: []string{"IDP_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -98,7 +98,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9134"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9134"), Usage: "Address to bind debug server", EnvVars: []string{"IDP_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -124,7 +124,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9130"), + Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9130"), Usage: "Address to bind http server", EnvVars: []string{"IDP_HTTP_ADDR"}, Destination: &cfg.HTTP.Addr, diff --git a/ocis/pkg/flagset/flagset.go b/ocis/pkg/flagset/flagset.go index 9b296758a14..e97fea44953 100644 --- a/ocis/pkg/flagset/flagset.go +++ b/ocis/pkg/flagset/flagset.go @@ -104,7 +104,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: "0.0.0.0:9010", + Value: "127.0.0.1:9010", Usage: "Address to debug endpoint", EnvVars: []string{"OCIS_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -117,7 +117,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: "0.0.0.0:9010", + Value: "127.0.0.1:9010", Usage: "Address to bind debug server", EnvVars: []string{"OCIS_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -143,7 +143,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: "0.0.0.0:9000", + Value: "127.0.0.1:9000", Usage: "Address to bind http server", EnvVars: []string{"OCIS_HTTP_ADDR"}, Destination: &cfg.HTTP.Addr, @@ -157,7 +157,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "grpc-addr", - Value: "0.0.0.0:9001", + Value: "127.0.0.1:9001", Usage: "Address to bind grpc server", EnvVars: []string{"OCIS_GRPC_ADDR"}, Destination: &cfg.GRPC.Addr, diff --git a/ocis/pkg/runtime/cmd/root.go b/ocis/pkg/runtime/cmd/root.go deleted file mode 100644 index 22127444ece..00000000000 --- a/ocis/pkg/runtime/cmd/root.go +++ /dev/null @@ -1,34 +0,0 @@ -package cmd - -import ( - "github.com/owncloud/ocis/ocis/pkg/runtime/config" - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -var ( - rootCmd = &cobra.Command{ - Use: "pman", - Short: "RPC Process Manager", - } -) - -// RootCmd returns a configured root command. -func RootCmd(cfg *config.Config) *cobra.Command { - rootCmd.PersistentFlags().StringVarP(&cfg.Hostname, "hostname", "n", "localhost", "host with a running oCIS runtime.") - rootCmd.PersistentFlags().StringVarP(&cfg.Port, "port", "p", "10666", "port to send messages to the rpc oCIS runtime.") - rootCmd.PersistentFlags().BoolVarP(&cfg.KeepAlive, "keep-alive", "k", false, "restart supervised processes that abruptly die.") - - if err := viper.BindPFlag("hostname", rootCmd.PersistentFlags().Lookup("hostname")); err != nil { - panic(err) - } - if err := viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port")); err != nil { - panic(err) - } - - rootCmd.AddCommand(List(cfg)) - rootCmd.AddCommand(Run(cfg)) - rootCmd.AddCommand(Kill(cfg)) - - return rootCmd -} diff --git a/ocs/pkg/flagset/flagset.go b/ocs/pkg/flagset/flagset.go index 22aac81de8b..9420df3161c 100644 --- a/ocs/pkg/flagset/flagset.go +++ b/ocs/pkg/flagset/flagset.go @@ -11,7 +11,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9114"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9114"), Usage: "Address to debug endpoint", EnvVars: []string{"OCS_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -90,7 +90,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9114"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9114"), Usage: "Address to bind debug server", EnvVars: []string{"OCS_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -116,7 +116,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9110"), + Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9110"), Usage: "Address to bind http server", EnvVars: []string{"OCS_HTTP_ADDR"}, Destination: &cfg.HTTP.Addr, diff --git a/proxy/pkg/flagset/flagset.go b/proxy/pkg/flagset/flagset.go index b5f0abb514e..b330760bd12 100644 --- a/proxy/pkg/flagset/flagset.go +++ b/proxy/pkg/flagset/flagset.go @@ -42,7 +42,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9109"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9109"), Usage: "Address to debug endpoint", EnvVars: []string{"PROXY_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -102,7 +102,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9205"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9205"), Usage: "Address to bind debug server", EnvVars: []string{"PROXY_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, diff --git a/settings/pkg/flagset/flagset.go b/settings/pkg/flagset/flagset.go index 185c5c0a510..39ac38b94e3 100644 --- a/settings/pkg/flagset/flagset.go +++ b/settings/pkg/flagset/flagset.go @@ -35,7 +35,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9194"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9194"), Usage: "Address to debug endpoint", EnvVars: []string{"SETTINGS_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -89,7 +89,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9194"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9194"), Usage: "Address to bind debug server", EnvVars: []string{"SETTINGS_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -115,7 +115,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9190"), + Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9190"), Usage: "Address to bind http server", EnvVars: []string{"SETTINGS_HTTP_ADDR"}, Destination: &cfg.HTTP.Addr, @@ -143,7 +143,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "grpc-addr", - Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "0.0.0.0:9191"), + Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "127.0.0.1:9191"), Usage: "Address to bind grpc server", EnvVars: []string{"SETTINGS_GRPC_ADDR"}, Destination: &cfg.GRPC.Addr, diff --git a/storage/pkg/command/groups.go b/storage/pkg/command/groups.go index 152e85e846e..c9c35394f45 100644 --- a/storage/pkg/command/groups.go +++ b/storage/pkg/command/groups.go @@ -157,22 +157,22 @@ func groupsConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]inter } } -// GroupProvider allows for the storage-groupprovider command to be embedded and supervised by a suture supervisor tree. -type GroupProvider struct { +// GroupSutureService allows for the storage-groupprovider command to be embedded and supervised by a suture supervisor tree. +type GroupSutureService struct { cfg *config.Config } -// NewGroupProvider creates a new storage.GroupProvider +// NewGroupProviderSutureService creates a new storage.GroupProvider func NewGroupProvider(cfg *ociscfg.Config) suture.Service { if cfg.Mode == 0 { cfg.Storage.Reva.Groups.Supervised = true } - return GroupProvider{ + return GroupSutureService{ cfg: cfg.Storage, } } -func (s GroupProvider) Serve(ctx context.Context) error { +func (s GroupSutureService) Serve(ctx context.Context) error { s.cfg.Reva.Groups.Context = ctx f := &flag.FlagSet{} cmdFlags := Groups(s.cfg).Flags diff --git a/storage/pkg/command/storagemetadata.go b/storage/pkg/command/storagemetadata.go index 66b51988566..dde9a6aa5c8 100644 --- a/storage/pkg/command/storagemetadata.go +++ b/storage/pkg/command/storagemetadata.go @@ -159,7 +159,7 @@ func storageMetadataFromStruct(c *cli.Context, cfg *config.Config) map[string]in } // SutureService allows for the storage-metadata command to be embedded and supervised by a suture supervisor tree. -type SutureService struct { +type MetadataSutureService struct { cfg *config.Config } @@ -168,12 +168,12 @@ func NewStorageMetadata(cfg *ociscfg.Config) suture.Service { if cfg.Mode == 0 { cfg.Storage.Reva.StorageMetadata.Supervised = true } - return SutureService{ + return MetadataSutureService{ cfg: cfg.Storage, } } -func (s SutureService) Serve(ctx context.Context) error { +func (s MetadataSutureService) Serve(ctx context.Context) error { s.cfg.Reva.StorageMetadata.Context = ctx f := &flag.FlagSet{} cmdFlags := StorageMetadata(s.cfg).Flags diff --git a/storage/pkg/command/users.go b/storage/pkg/command/users.go index 1acb353b861..d01757ae817 100644 --- a/storage/pkg/command/users.go +++ b/storage/pkg/command/users.go @@ -178,22 +178,22 @@ func usersConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]interf return rcfg } -// UserProvider allows for the storage-userprovider command to be embedded and supervised by a suture supervisor tree. -type UserProvider struct { +// UserProviderSutureService allows for the storage-userprovider command to be embedded and supervised by a suture supervisor tree. +type UserProviderSutureService struct { cfg *config.Config } -// NewUserProvider creates a new storage.UserProvider +// NewUserProviderSutureService creates a new storage.UserProvider func NewUserProvider(cfg *ociscfg.Config) suture.Service { if cfg.Mode == 0 { cfg.Storage.Reva.Users.Supervised = true } - return UserProvider{ + return UserProviderSutureService{ cfg: cfg.Storage, } } -func (s UserProvider) Serve(ctx context.Context) error { +func (s UserProviderSutureService) Serve(ctx context.Context) error { s.cfg.Reva.Users.Context = ctx f := &flag.FlagSet{} cmdFlags := Users(s.cfg).Flags diff --git a/storage/pkg/flagset/appprovider.go b/storage/pkg/flagset/appprovider.go index a8c11e9592e..781705586d4 100644 --- a/storage/pkg/flagset/appprovider.go +++ b/storage/pkg/flagset/appprovider.go @@ -13,7 +13,7 @@ func AppProviderWithConfig(cfg *config.Config) []cli.Flag { // debug ports are the odd ports &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.AppProvider.DebugAddr, "0.0.0.0:9165"), + Value: flags.OverrideDefaultString(cfg.Reva.AppProvider.DebugAddr, "127.0.0.1:9165"), Usage: "Address to bind debug server", EnvVars: []string{"APP_PROVIDER_BASIC_DEBUG_ADDR"}, Destination: &cfg.Reva.AppProvider.DebugAddr, @@ -34,7 +34,7 @@ func AppProviderWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "addr", - Value: flags.OverrideDefaultString(cfg.Reva.AppProvider.GRPCAddr, "0.0.0.0:9164"), + Value: flags.OverrideDefaultString(cfg.Reva.AppProvider.GRPCAddr, "127.0.0.1:9164"), Usage: "Address to bind storage service", EnvVars: []string{"APP_PROVIDER_BASIC_GRPC_ADDR"}, Destination: &cfg.Reva.AppProvider.GRPCAddr, diff --git a/storage/pkg/flagset/authbasic.go b/storage/pkg/flagset/authbasic.go index 98d83497cd0..bbfcae1ee3c 100644 --- a/storage/pkg/flagset/authbasic.go +++ b/storage/pkg/flagset/authbasic.go @@ -13,7 +13,7 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag { // debug ports are the odd ports &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.AuthBasic.DebugAddr, "0.0.0.0:9147"), + Value: flags.OverrideDefaultString(cfg.Reva.AuthBasic.DebugAddr, "127.0.0.1:9147"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_AUTH_BASIC_DEBUG_ADDR"}, Destination: &cfg.Reva.AuthBasic.DebugAddr, @@ -49,7 +49,7 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "addr", - Value: flags.OverrideDefaultString(cfg.Reva.AuthBasic.GRPCAddr, "0.0.0.0:9146"), + Value: flags.OverrideDefaultString(cfg.Reva.AuthBasic.GRPCAddr, "127.0.0.1:9146"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_AUTH_BASIC_GRPC_ADDR"}, Destination: &cfg.Reva.AuthBasic.GRPCAddr, diff --git a/storage/pkg/flagset/authbearer.go b/storage/pkg/flagset/authbearer.go index f3a61c9e018..b67b661e515 100644 --- a/storage/pkg/flagset/authbearer.go +++ b/storage/pkg/flagset/authbearer.go @@ -13,7 +13,7 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag { // debug ports are the odd ports &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.AuthBearer.DebugAddr, "0.0.0.0:9149"), + Value: flags.OverrideDefaultString(cfg.Reva.AuthBearer.DebugAddr, "127.0.0.1:9149"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_AUTH_BEARER_DEBUG_ADDR"}, Destination: &cfg.Reva.AuthBearer.DebugAddr, @@ -95,7 +95,7 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "addr", - Value: flags.OverrideDefaultString(cfg.Reva.AuthBearer.GRPCAddr, "0.0.0.0:9148"), + Value: flags.OverrideDefaultString(cfg.Reva.AuthBearer.GRPCAddr, "127.0.0.1:9148"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_AUTH_BEARER_GRPC_ADDR"}, Destination: &cfg.Reva.AuthBearer.GRPCAddr, diff --git a/storage/pkg/flagset/frontend.go b/storage/pkg/flagset/frontend.go index 22cf245624f..2e84707d191 100644 --- a/storage/pkg/flagset/frontend.go +++ b/storage/pkg/flagset/frontend.go @@ -14,7 +14,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag { // debug ports are the odd ports &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.Frontend.DebugAddr, "0.0.0.0:9141"), + Value: flags.OverrideDefaultString(cfg.Reva.Frontend.DebugAddr, "127.0.0.1:9141"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_FRONTEND_DEBUG_ADDR"}, Destination: &cfg.Reva.Frontend.DebugAddr, @@ -88,7 +88,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "addr", - Value: flags.OverrideDefaultString(cfg.Reva.Frontend.HTTPAddr, "0.0.0.0:9140"), + Value: flags.OverrideDefaultString(cfg.Reva.Frontend.HTTPAddr, "127.0.0.1:9140"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_FRONTEND_HTTP_ADDR"}, Destination: &cfg.Reva.Frontend.HTTPAddr, diff --git a/storage/pkg/flagset/gateway.go b/storage/pkg/flagset/gateway.go index d5ec742685a..940368532c7 100644 --- a/storage/pkg/flagset/gateway.go +++ b/storage/pkg/flagset/gateway.go @@ -13,7 +13,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { // debug ports are the odd ports &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.Gateway.DebugAddr, "0.0.0.0:9143"), + Value: flags.OverrideDefaultString(cfg.Reva.Gateway.DebugAddr, "127.0.0.1:9143"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_GATEWAY_DEBUG_ADDR"}, Destination: &cfg.Reva.Gateway.DebugAddr, @@ -48,7 +48,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "addr", - Value: flags.OverrideDefaultString(cfg.Reva.Gateway.GRPCAddr, "0.0.0.0:9142"), + Value: flags.OverrideDefaultString(cfg.Reva.Gateway.GRPCAddr, "127.0.0.1:9142"), Usage: "Address to bind REVA service", EnvVars: []string{"STORAGE_GATEWAY_GRPC_ADDR"}, Destination: &cfg.Reva.Gateway.GRPCAddr, diff --git a/storage/pkg/flagset/groups.go b/storage/pkg/flagset/groups.go index b58905d7648..50dab10901b 100644 --- a/storage/pkg/flagset/groups.go +++ b/storage/pkg/flagset/groups.go @@ -13,7 +13,7 @@ func GroupsWithConfig(cfg *config.Config) []cli.Flag { // debug ports are the odd ports &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.Groups.DebugAddr, "0.0.0.0:9161"), + Value: flags.OverrideDefaultString(cfg.Reva.Groups.DebugAddr, "127.0.0.1:9161"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_GROUPPROVIDER_DEBUG_ADDR"}, Destination: &cfg.Reva.Groups.DebugAddr, @@ -42,7 +42,7 @@ func GroupsWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "addr", - Value: flags.OverrideDefaultString(cfg.Reva.Groups.GRPCAddr, "0.0.0.0:9160"), + Value: flags.OverrideDefaultString(cfg.Reva.Groups.GRPCAddr, "127.0.0.1:9160"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_GROUPPROVIDER_ADDR"}, Destination: &cfg.Reva.Groups.GRPCAddr, diff --git a/storage/pkg/flagset/health.go b/storage/pkg/flagset/health.go index 60d673c07bb..3333622e520 100644 --- a/storage/pkg/flagset/health.go +++ b/storage/pkg/flagset/health.go @@ -11,7 +11,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9109"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9109"), Usage: "Address to debug endpoint", EnvVars: []string{"STORAGE_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, diff --git a/storage/pkg/flagset/sharing.go b/storage/pkg/flagset/sharing.go index 17105d7cc85..c3dde8871cb 100644 --- a/storage/pkg/flagset/sharing.go +++ b/storage/pkg/flagset/sharing.go @@ -13,7 +13,7 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag { // debug ports are the odd ports &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.Sharing.DebugAddr, "0.0.0.0:9151"), + Value: flags.OverrideDefaultString(cfg.Reva.Sharing.DebugAddr, "127.0.0.1:9151"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_SHARING_DEBUG_ADDR"}, Destination: &cfg.Reva.Sharing.DebugAddr, @@ -42,7 +42,7 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "addr", - Value: flags.OverrideDefaultString(cfg.Reva.Sharing.GRPCAddr, "0.0.0.0:9150"), + Value: flags.OverrideDefaultString(cfg.Reva.Sharing.GRPCAddr, "127.0.0.1:9150"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_SHARING_GRPC_ADDR"}, Destination: &cfg.Reva.Sharing.GRPCAddr, diff --git a/storage/pkg/flagset/storagehome.go b/storage/pkg/flagset/storagehome.go index a23c9423409..2efb5d1846a 100644 --- a/storage/pkg/flagset/storagehome.go +++ b/storage/pkg/flagset/storagehome.go @@ -14,7 +14,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag { // debug ports are the odd ports &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.DebugAddr, "0.0.0.0:9156"), + Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.DebugAddr, "127.0.0.1:9156"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_HOME_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageHome.DebugAddr, @@ -33,7 +33,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "grpc-addr", - Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.GRPCAddr, "0.0.0.0:9154"), + Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.GRPCAddr, "127.0.0.1:9154"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_HOME_GRPC_ADDR"}, Destination: &cfg.Reva.StorageHome.GRPCAddr, @@ -47,7 +47,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.HTTPAddr, "0.0.0.0:9155"), + Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.HTTPAddr, "127.0.0.1:9155"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_HOME_HTTP_ADDR"}, Destination: &cfg.Reva.StorageHome.HTTPAddr, diff --git a/storage/pkg/flagset/storagemetadata.go b/storage/pkg/flagset/storagemetadata.go index ce5961c18c2..efe2db52ac5 100644 --- a/storage/pkg/flagset/storagemetadata.go +++ b/storage/pkg/flagset/storagemetadata.go @@ -12,7 +12,7 @@ func StorageMetadata(cfg *config.Config) []cli.Flag { f := []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.DebugAddr, "0.0.0.0:9217"), + Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.DebugAddr, "127.0.0.1:9217"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_METADATA_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageMetadata.DebugAddr, @@ -26,7 +26,7 @@ func StorageMetadata(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "grpc-addr", - Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.GRPCAddr, "0.0.0.0:9215"), + Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.GRPCAddr, "127.0.0.1:9215"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_METADATA_GRPC_PROVIDER_ADDR"}, Destination: &cfg.Reva.StorageMetadata.GRPCAddr, @@ -47,7 +47,7 @@ func StorageMetadata(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.HTTPAddr, "0.0.0.0:9216"), + Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.HTTPAddr, "127.0.0.1:9216"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_METADATA_HTTP_ADDR"}, Destination: &cfg.Reva.StorageMetadata.HTTPAddr, diff --git a/storage/pkg/flagset/storagepubliclink.go b/storage/pkg/flagset/storagepubliclink.go index 3e05ffa7c16..5d884c79d79 100644 --- a/storage/pkg/flagset/storagepubliclink.go +++ b/storage/pkg/flagset/storagepubliclink.go @@ -12,7 +12,7 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.DebugAddr, "0.0.0.0:9179"), + Value: flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.DebugAddr, "127.0.0.1:9179"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_PUBLIC_LINK_DEBUG_ADDR"}, Destination: &cfg.Reva.StoragePublicLink.DebugAddr, @@ -27,7 +27,7 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "addr", - Value: flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.GRPCAddr, "0.0.0.0:9178"), + Value: flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.GRPCAddr, "127.0.0.1:9178"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_PUBLIC_LINK_GRPC_ADDR"}, Destination: &cfg.Reva.StoragePublicLink.GRPCAddr, diff --git a/storage/pkg/flagset/storageusers.go b/storage/pkg/flagset/storageusers.go index ef8b4e0fc32..b61d23f51bb 100644 --- a/storage/pkg/flagset/storageusers.go +++ b/storage/pkg/flagset/storageusers.go @@ -14,7 +14,7 @@ func StorageUsersWithConfig(cfg *config.Config) []cli.Flag { // debug ports are the odd ports &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.DebugAddr, "0.0.0.0:9159"), + Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.DebugAddr, "127.0.0.1:9159"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_USERS_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageUsers.DebugAddr, @@ -33,7 +33,7 @@ func StorageUsersWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "grpc-addr", - Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.GRPCAddr, "0.0.0.0:9157"), + Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.GRPCAddr, "127.0.0.1:9157"), Usage: "GRPC Address to bind users storage", EnvVars: []string{"STORAGE_USERS_GRPC_ADDR"}, Destination: &cfg.Reva.StorageUsers.GRPCAddr, @@ -47,7 +47,7 @@ func StorageUsersWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.HTTPAddr, "0.0.0.0:9158"), + Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.HTTPAddr, "127.0.0.1:9158"), Usage: "HTTP Address to bind users storage", EnvVars: []string{"STORAGE_USERS_HTTP_ADDR"}, Destination: &cfg.Reva.StorageUsers.HTTPAddr, diff --git a/storage/pkg/flagset/users.go b/storage/pkg/flagset/users.go index a050c81df38..182882ecd33 100644 --- a/storage/pkg/flagset/users.go +++ b/storage/pkg/flagset/users.go @@ -13,7 +13,7 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag { // debug ports are the odd ports &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Reva.Users.DebugAddr, "0.0.0.0:9145"), + Value: flags.OverrideDefaultString(cfg.Reva.Users.DebugAddr, "127.0.0.1:9145"), Usage: "Address to bind debug server", EnvVars: []string{"STORAGE_USERPROVIDER_DEBUG_ADDR"}, Destination: &cfg.Reva.Users.DebugAddr, @@ -42,7 +42,7 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "addr", - Value: flags.OverrideDefaultString(cfg.Reva.Users.GRPCAddr, "0.0.0.0:9144"), + Value: flags.OverrideDefaultString(cfg.Reva.Users.GRPCAddr, "127.0.0.1:9144"), Usage: "Address to bind storage service", EnvVars: []string{"STORAGE_USERPROVIDER_ADDR"}, Destination: &cfg.Reva.Users.GRPCAddr, diff --git a/store/pkg/flagset/flagset.go b/store/pkg/flagset/flagset.go index 330121fd3fb..392c79f6f61 100644 --- a/store/pkg/flagset/flagset.go +++ b/store/pkg/flagset/flagset.go @@ -42,7 +42,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9460"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9464"), Usage: "Address to debug endpoint", EnvVars: []string{"STORE_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -95,7 +95,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9460"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9464"), Usage: "Address to bind debug server", EnvVars: []string{"STORE_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -126,6 +126,13 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"STORE_GRPC_NAMESPACE"}, Destination: &cfg.Service.Namespace, }, + &cli.StringFlag{ + Name: "grpc-addr", + Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "127.0.0.1:9460"), + Usage: "Address to bind grpc server", + EnvVars: []string{"STORE_GRPC_ADDR"}, + Destination: &cfg.GRPC.Addr, + }, &cli.StringFlag{ Name: "name", Value: flags.OverrideDefaultString(cfg.Service.Name, "store"), diff --git a/thumbnails/pkg/flagset/flagset.go b/thumbnails/pkg/flagset/flagset.go index 0658eaa9a13..16dd5a9d98e 100644 --- a/thumbnails/pkg/flagset/flagset.go +++ b/thumbnails/pkg/flagset/flagset.go @@ -12,7 +12,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9189"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9189"), Usage: "Address to debug endpoint", EnvVars: []string{"THUMBNAILS_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -90,7 +90,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9189"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9189"), Usage: "Address to bind debug server", EnvVars: []string{"THUMBNAILS_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -123,7 +123,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "grpc-addr", - Value: flags.OverrideDefaultString(cfg.Server.Address, "0.0.0.0:9185"), + Value: flags.OverrideDefaultString(cfg.Server.Address, "127.0.0.1:9185"), Usage: "Address to bind grpc server", EnvVars: []string{"THUMBNAILS_GRPC_ADDR"}, Destination: &cfg.Server.Address, diff --git a/web/pkg/flagset/flagset.go b/web/pkg/flagset/flagset.go index 678e8dad84f..b100abda60c 100644 --- a/web/pkg/flagset/flagset.go +++ b/web/pkg/flagset/flagset.go @@ -35,7 +35,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9104"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9104"), Usage: "Address to debug endpoint", EnvVars: []string{"WEB_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -95,7 +95,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9104"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9104"), Usage: "Address to bind debug server", EnvVars: []string{"WEB_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -121,7 +121,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9100"), + Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9100"), Usage: "Address to bind http server", EnvVars: []string{"WEB_HTTP_ADDR"}, Destination: &cfg.HTTP.Addr, diff --git a/webdav/pkg/flagset/flagset.go b/webdav/pkg/flagset/flagset.go index 706e78669a5..2441d57bd3c 100644 --- a/webdav/pkg/flagset/flagset.go +++ b/webdav/pkg/flagset/flagset.go @@ -11,7 +11,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9119"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9119"), Usage: "Address to debug endpoint", EnvVars: []string{"WEBDAV_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -89,7 +89,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "debug-addr", - Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9119"), + Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9119"), Usage: "Address to bind debug server", EnvVars: []string{"WEBDAV_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, @@ -115,7 +115,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { }, &cli.StringFlag{ Name: "http-addr", - Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9115"), + Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9115"), Usage: "Address to bind http server", EnvVars: []string{"WEBDAV_HTTP_ADDR"}, Destination: &cfg.HTTP.Addr, From e17eda71607d105e4cab408397e5e745d0228fc8 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 12 Oct 2021 14:08:09 +0200 Subject: [PATCH 2/2] fix wopi deployment example --- deployments/examples/ocis_wopi/docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deployments/examples/ocis_wopi/docker-compose.yml b/deployments/examples/ocis_wopi/docker-compose.yml index 35253bf4027..09b46ff147e 100644 --- a/deployments/examples/ocis_wopi/docker-compose.yml +++ b/deployments/examples/ocis_wopi/docker-compose.yml @@ -67,6 +67,7 @@ services: OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please} OCIS_TRANSFER_SECRET: ${STORAGE_TRANSFER_SECRET:-replace-me-with-a-transfer-secret} # app registry + STORAGE_GATEWAY_GRPC_ADDR: 0.0.0.0:9142 # make the REVA gateway accessible to the app drivers STORAGE_APP_REGISTRY_MIMETYPES_JSON: /var/tmp/ocis/app-config/mimetypes.json volumes: - ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh @@ -90,6 +91,7 @@ services: command: storage-app-provider server environment: REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142} + APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164 APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-collabora:9164 OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4} OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please} @@ -115,6 +117,7 @@ services: #command: storage-app-provider server environment: REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142} + APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164 APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-onlyoffice:9164 OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4} OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please} @@ -142,6 +145,7 @@ services: #command: storage-app-provider server environment: REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142} + APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164 APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-codimd:9164 OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4} OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}