From d58d3d2de631da64f6a4ce59b72301969aec6118 Mon Sep 17 00:00:00 2001 From: Patrick Maier Date: Wed, 6 Oct 2021 17:39:39 +0200 Subject: [PATCH 01/16] 1.13.0 Release Notes --- docs/ocis/release_notes.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/ocis/release_notes.md b/docs/ocis/release_notes.md index 5aa286470d..63814b1a9c 100644 --- a/docs/ocis/release_notes.md +++ b/docs/ocis/release_notes.md @@ -7,6 +7,24 @@ geekdocEditPath: edit/master/docs/ocis geekdocFilePath: release_notes.md --- +## ownCloud Infinite Scale 1.13.0 Technology Preview + +Version 1.13.0 brings progress on the backend for the 'Spaces' feature. ownCloud Web and Infinite Scale now provide ZIP/TAR download for multiple files/folders and can integrate external file viewer/editor applications (e.g., Collabora Online, ONLYOFFICE, CodiMD, Microsoft Office Online). + +The most prominent changes in ownCloud Infinite Scale 1.13.0 and ownCloud Web 5.0.0 comprise: + +- Infinite Scale and Web now allow downloading multiple files or folders as archives [ocis#2509](https://github.com/owncloud/ocis/pull/2509) [cs3org/reva#2088](https://github.com/cs3org/reva/pull/2088) +- Infinite Scale and Web can now integrate external applications like file viewers/editors via the [cs3org/wopiserver](https://github.com/cs3org/wopiserver) (e.g., Collabora Online, ONLYOFFICE, CodiMD, Microsoft Office Online). The feature has been integrated for authenticated users and public links. [web#5805](https://github.com/owncloud/web/pull/5805) +- The 'Shared with me' page in ownCloud Web now clearly separates pending, declined and accepted shares. Pending shares are always displayed prominently so that users are aware and can react accordingly. [web#5814](https://github.com/owncloud/web/pull/5814) +- Legacy URLs (e.g., from the address bar, public links) from ownCloud Classic are now properly resolved after migrating to Infinite Scale and Web [cs3org/reva#1089](https://github.com/cs3org/reva/pull/1989) + +You can also read the full [ownCloud Infinite Scale changelog](https://github.com/owncloud/ocis/releases/tag/v1.13.0) and [ownCloud Web changelog](https://github.com/owncloud/web/releases/tag/v5.0.0) for further details on what has changed. + +### Breaking changes +{{< hint warning >}} +We are currently in a Tech Preview state and breaking changes may occur at any time. For more information see our [release roadmap]({{< ref "./release_roadmap" >}}) +{{< /hint >}} + ## ownCloud Infinite Scale 1.12.0 Technology Preview Version 1.12.0 is a maintenance release with the foundations for the 'Spaces' feature and for viewer/editor application integrations. The Infinite Scale backend has been further hardened by fixing known issues, improving error handling and stabilizing existing features. Apart from bugfixing, ownCloud Web 4.2.0 has received a number of usability and design improvements for sharing and the file list. From f520e3db1d3304126b30879eb684165d672c63dd Mon Sep 17 00:00:00 2001 From: Patrick Maier Date: Thu, 7 Oct 2021 14:47:20 +0200 Subject: [PATCH 02/16] Apply suggestions from code review Co-authored-by: Benedikt Kulmann --- docs/ocis/release_notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ocis/release_notes.md b/docs/ocis/release_notes.md index 63814b1a9c..77a9be7e70 100644 --- a/docs/ocis/release_notes.md +++ b/docs/ocis/release_notes.md @@ -11,14 +11,14 @@ geekdocFilePath: release_notes.md Version 1.13.0 brings progress on the backend for the 'Spaces' feature. ownCloud Web and Infinite Scale now provide ZIP/TAR download for multiple files/folders and can integrate external file viewer/editor applications (e.g., Collabora Online, ONLYOFFICE, CodiMD, Microsoft Office Online). -The most prominent changes in ownCloud Infinite Scale 1.13.0 and ownCloud Web 5.0.0 comprise: +The most prominent changes in ownCloud Infinite Scale 1.13.0 and ownCloud Web 4.3.0 comprise: - Infinite Scale and Web now allow downloading multiple files or folders as archives [ocis#2509](https://github.com/owncloud/ocis/pull/2509) [cs3org/reva#2088](https://github.com/cs3org/reva/pull/2088) - Infinite Scale and Web can now integrate external applications like file viewers/editors via the [cs3org/wopiserver](https://github.com/cs3org/wopiserver) (e.g., Collabora Online, ONLYOFFICE, CodiMD, Microsoft Office Online). The feature has been integrated for authenticated users and public links. [web#5805](https://github.com/owncloud/web/pull/5805) - The 'Shared with me' page in ownCloud Web now clearly separates pending, declined and accepted shares. Pending shares are always displayed prominently so that users are aware and can react accordingly. [web#5814](https://github.com/owncloud/web/pull/5814) - Legacy URLs (e.g., from the address bar, public links) from ownCloud Classic are now properly resolved after migrating to Infinite Scale and Web [cs3org/reva#1089](https://github.com/cs3org/reva/pull/1989) -You can also read the full [ownCloud Infinite Scale changelog](https://github.com/owncloud/ocis/releases/tag/v1.13.0) and [ownCloud Web changelog](https://github.com/owncloud/web/releases/tag/v5.0.0) for further details on what has changed. +You can also read the full [ownCloud Infinite Scale changelog](https://github.com/owncloud/ocis/releases/tag/v1.13.0) and [ownCloud Web changelog](https://github.com/owncloud/web/releases/tag/v4.3.0) for further details on what has changed. ### Breaking changes {{< hint warning >}} From e521c4c93c0f99b6799acf7952462b6a2af369a5 Mon Sep 17 00:00:00 2001 From: Patrick Maier Date: Thu, 7 Oct 2021 14:57:09 +0200 Subject: [PATCH 03/16] Update release_notes.md --- docs/ocis/release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ocis/release_notes.md b/docs/ocis/release_notes.md index 77a9be7e70..0961a74786 100644 --- a/docs/ocis/release_notes.md +++ b/docs/ocis/release_notes.md @@ -14,7 +14,7 @@ Version 1.13.0 brings progress on the backend for the 'Spaces' feature. ownCloud The most prominent changes in ownCloud Infinite Scale 1.13.0 and ownCloud Web 4.3.0 comprise: - Infinite Scale and Web now allow downloading multiple files or folders as archives [ocis#2509](https://github.com/owncloud/ocis/pull/2509) [cs3org/reva#2088](https://github.com/cs3org/reva/pull/2088) -- Infinite Scale and Web can now integrate external applications like file viewers/editors via the [cs3org/wopiserver](https://github.com/cs3org/wopiserver) (e.g., Collabora Online, ONLYOFFICE, CodiMD, Microsoft Office Online). The feature has been integrated for authenticated users and public links. [web#5805](https://github.com/owncloud/web/pull/5805) +- Infinite Scale and Web can now integrate external applications like file viewers/editors via the [cs3org/wopiserver](https://github.com/cs3org/wopiserver) (e.g., Collabora Online, ONLYOFFICE, CodiMD, Microsoft Office Online). [web#5805](https://github.com/owncloud/web/pull/5805) - The 'Shared with me' page in ownCloud Web now clearly separates pending, declined and accepted shares. Pending shares are always displayed prominently so that users are aware and can react accordingly. [web#5814](https://github.com/owncloud/web/pull/5814) - Legacy URLs (e.g., from the address bar, public links) from ownCloud Classic are now properly resolved after migrating to Infinite Scale and Web [cs3org/reva#1089](https://github.com/cs3org/reva/pull/1989) From 879827ca4baebf066119f1a1f203eab5e6aa661a Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 12 Oct 2021 14:00:33 +0200 Subject: [PATCH 04/16] 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 dd4db4e61f..3b99a9293a 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 0000000000..c2e775c288 --- /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 ba62015419..74b85dd746 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 30dbe0e59b..540780e47f 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 9ac8ca49ea..a8df40fa5b 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 39eb26d648..649e11a996 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 9b296758a1..e97fea4495 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 22127444ec..0000000000 --- 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 22aac81de8..9420df3161 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 b5f0abb514..b330760bd1 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 185c5c0a51..39ac38b94e 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 152e85e846..c9c35394f4 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 66b5198856..dde9a6aa5c 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 1acb353b86..d01757ae81 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 a8c11e9592..781705586d 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 98d83497cd..bbfcae1ee3 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 f3a61c9e01..b67b661e51 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 22cf245624..2e84707d19 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 d5ec742685..940368532c 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 b58905d764..50dab10901 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 60d673c07b..3333622e52 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 17105d7cc8..c3dde8871c 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 a23c942340..2efb5d1846 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 ce5961c18c..efe2db52ac 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 3e05ffa7c1..5d884c79d7 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 ef8b4e0fc3..b61d23f51b 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 a050c81df3..182882ecd3 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 330121fd3f..392c79f6f6 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 0658eaa9a1..16dd5a9d98 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 678e8dad84..b100abda60 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 706e78669a..2441d57bd3 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 05/16] 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 35253bf402..09b46ff147 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} From 570a85efb6f8254c910bcd46c208abf8cf0fae89 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 13 Oct 2021 07:12:22 +0200 Subject: [PATCH 06/16] prepare changelog --- CHANGELOG.md | 6 +++--- .../{unreleased => 1.13.0_2021-10-13}/appregistry-config.md | 0 .../archiver-capabilities-limits.md | 0 .../cleanup-source-license.md | 0 .../configure-users-metadata-storage-separately.md | 0 .../create-space-response.md | 0 .../create-spaces-odata.md | 0 .../expose-reva-archiver.md | 0 .../favorites-capability.md | 0 .../fix-account-resolver.md | 0 .../fix-builtime-version.md | 0 .../fix-gatewaysvc-everywhere.md | 0 .../fix-username-encoding.md | 0 changelog/{unreleased => 1.13.0_2021-10-13}/go-1-17.md | 0 .../make-allow-list-mimetypes-configurable.md | 0 .../mime-type-allow-creation.md | 0 .../optional-skip-demo-users-creation.md | 0 .../proxy-policy-claim-precedence.md | 0 .../redirect-invalid-links-to-oC-web.md | 0 .../remove-notifications-placeholder.md | 0 .../remove_proxy_assets.md | 0 .../{unreleased => 1.13.0_2021-10-13}/reva-auth-tokens.md | 0 .../reva-gateway-configuration.md | 0 .../reva-gateway-endpoint-config.md | 0 .../{unreleased => 1.13.0_2021-10-13}/reva-ldap-tls.md | 0 .../reva-token-expiration.md | 0 ...date-reva-to-477bb18843a97c6e392dd316e8735ccbe44f16ed.md | 0 .../{unreleased => 1.13.0_2021-10-13}/update-web-4.3.0.md | 0 28 files changed, 3 insertions(+), 3 deletions(-) rename changelog/{unreleased => 1.13.0_2021-10-13}/appregistry-config.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/archiver-capabilities-limits.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/cleanup-source-license.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/configure-users-metadata-storage-separately.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/create-space-response.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/create-spaces-odata.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/expose-reva-archiver.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/favorites-capability.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/fix-account-resolver.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/fix-builtime-version.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/fix-gatewaysvc-everywhere.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/fix-username-encoding.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/go-1-17.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/make-allow-list-mimetypes-configurable.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/mime-type-allow-creation.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/optional-skip-demo-users-creation.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/proxy-policy-claim-precedence.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/redirect-invalid-links-to-oC-web.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/remove-notifications-placeholder.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/remove_proxy_assets.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/reva-auth-tokens.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/reva-gateway-configuration.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/reva-gateway-endpoint-config.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/reva-ldap-tls.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/reva-token-expiration.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/update-reva-to-477bb18843a97c6e392dd316e8735ccbe44f16ed.md (100%) rename changelog/{unreleased => 1.13.0_2021-10-13}/update-web-4.3.0.md (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64497acb19..607c6eb793 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -# Changelog for [unreleased] (UNRELEASED) +# Changelog for [1.14.0] (2021-10-13) -The following sections list the changes for unreleased. +The following sections list the changes for 1.14.0. -[unreleased]: https://github.com/owncloud/ocis/compare/v1.12.0...master +[1.14.0]: https://github.com/owncloud/ocis/compare/v1.12.0...v1.14.0 ## Summary diff --git a/changelog/unreleased/appregistry-config.md b/changelog/1.13.0_2021-10-13/appregistry-config.md similarity index 100% rename from changelog/unreleased/appregistry-config.md rename to changelog/1.13.0_2021-10-13/appregistry-config.md diff --git a/changelog/unreleased/archiver-capabilities-limits.md b/changelog/1.13.0_2021-10-13/archiver-capabilities-limits.md similarity index 100% rename from changelog/unreleased/archiver-capabilities-limits.md rename to changelog/1.13.0_2021-10-13/archiver-capabilities-limits.md diff --git a/changelog/unreleased/cleanup-source-license.md b/changelog/1.13.0_2021-10-13/cleanup-source-license.md similarity index 100% rename from changelog/unreleased/cleanup-source-license.md rename to changelog/1.13.0_2021-10-13/cleanup-source-license.md diff --git a/changelog/unreleased/configure-users-metadata-storage-separately.md b/changelog/1.13.0_2021-10-13/configure-users-metadata-storage-separately.md similarity index 100% rename from changelog/unreleased/configure-users-metadata-storage-separately.md rename to changelog/1.13.0_2021-10-13/configure-users-metadata-storage-separately.md diff --git a/changelog/unreleased/create-space-response.md b/changelog/1.13.0_2021-10-13/create-space-response.md similarity index 100% rename from changelog/unreleased/create-space-response.md rename to changelog/1.13.0_2021-10-13/create-space-response.md diff --git a/changelog/unreleased/create-spaces-odata.md b/changelog/1.13.0_2021-10-13/create-spaces-odata.md similarity index 100% rename from changelog/unreleased/create-spaces-odata.md rename to changelog/1.13.0_2021-10-13/create-spaces-odata.md diff --git a/changelog/unreleased/expose-reva-archiver.md b/changelog/1.13.0_2021-10-13/expose-reva-archiver.md similarity index 100% rename from changelog/unreleased/expose-reva-archiver.md rename to changelog/1.13.0_2021-10-13/expose-reva-archiver.md diff --git a/changelog/unreleased/favorites-capability.md b/changelog/1.13.0_2021-10-13/favorites-capability.md similarity index 100% rename from changelog/unreleased/favorites-capability.md rename to changelog/1.13.0_2021-10-13/favorites-capability.md diff --git a/changelog/unreleased/fix-account-resolver.md b/changelog/1.13.0_2021-10-13/fix-account-resolver.md similarity index 100% rename from changelog/unreleased/fix-account-resolver.md rename to changelog/1.13.0_2021-10-13/fix-account-resolver.md diff --git a/changelog/unreleased/fix-builtime-version.md b/changelog/1.13.0_2021-10-13/fix-builtime-version.md similarity index 100% rename from changelog/unreleased/fix-builtime-version.md rename to changelog/1.13.0_2021-10-13/fix-builtime-version.md diff --git a/changelog/unreleased/fix-gatewaysvc-everywhere.md b/changelog/1.13.0_2021-10-13/fix-gatewaysvc-everywhere.md similarity index 100% rename from changelog/unreleased/fix-gatewaysvc-everywhere.md rename to changelog/1.13.0_2021-10-13/fix-gatewaysvc-everywhere.md diff --git a/changelog/unreleased/fix-username-encoding.md b/changelog/1.13.0_2021-10-13/fix-username-encoding.md similarity index 100% rename from changelog/unreleased/fix-username-encoding.md rename to changelog/1.13.0_2021-10-13/fix-username-encoding.md diff --git a/changelog/unreleased/go-1-17.md b/changelog/1.13.0_2021-10-13/go-1-17.md similarity index 100% rename from changelog/unreleased/go-1-17.md rename to changelog/1.13.0_2021-10-13/go-1-17.md diff --git a/changelog/unreleased/make-allow-list-mimetypes-configurable.md b/changelog/1.13.0_2021-10-13/make-allow-list-mimetypes-configurable.md similarity index 100% rename from changelog/unreleased/make-allow-list-mimetypes-configurable.md rename to changelog/1.13.0_2021-10-13/make-allow-list-mimetypes-configurable.md diff --git a/changelog/unreleased/mime-type-allow-creation.md b/changelog/1.13.0_2021-10-13/mime-type-allow-creation.md similarity index 100% rename from changelog/unreleased/mime-type-allow-creation.md rename to changelog/1.13.0_2021-10-13/mime-type-allow-creation.md diff --git a/changelog/unreleased/optional-skip-demo-users-creation.md b/changelog/1.13.0_2021-10-13/optional-skip-demo-users-creation.md similarity index 100% rename from changelog/unreleased/optional-skip-demo-users-creation.md rename to changelog/1.13.0_2021-10-13/optional-skip-demo-users-creation.md diff --git a/changelog/unreleased/proxy-policy-claim-precedence.md b/changelog/1.13.0_2021-10-13/proxy-policy-claim-precedence.md similarity index 100% rename from changelog/unreleased/proxy-policy-claim-precedence.md rename to changelog/1.13.0_2021-10-13/proxy-policy-claim-precedence.md diff --git a/changelog/unreleased/redirect-invalid-links-to-oC-web.md b/changelog/1.13.0_2021-10-13/redirect-invalid-links-to-oC-web.md similarity index 100% rename from changelog/unreleased/redirect-invalid-links-to-oC-web.md rename to changelog/1.13.0_2021-10-13/redirect-invalid-links-to-oC-web.md diff --git a/changelog/unreleased/remove-notifications-placeholder.md b/changelog/1.13.0_2021-10-13/remove-notifications-placeholder.md similarity index 100% rename from changelog/unreleased/remove-notifications-placeholder.md rename to changelog/1.13.0_2021-10-13/remove-notifications-placeholder.md diff --git a/changelog/unreleased/remove_proxy_assets.md b/changelog/1.13.0_2021-10-13/remove_proxy_assets.md similarity index 100% rename from changelog/unreleased/remove_proxy_assets.md rename to changelog/1.13.0_2021-10-13/remove_proxy_assets.md diff --git a/changelog/unreleased/reva-auth-tokens.md b/changelog/1.13.0_2021-10-13/reva-auth-tokens.md similarity index 100% rename from changelog/unreleased/reva-auth-tokens.md rename to changelog/1.13.0_2021-10-13/reva-auth-tokens.md diff --git a/changelog/unreleased/reva-gateway-configuration.md b/changelog/1.13.0_2021-10-13/reva-gateway-configuration.md similarity index 100% rename from changelog/unreleased/reva-gateway-configuration.md rename to changelog/1.13.0_2021-10-13/reva-gateway-configuration.md diff --git a/changelog/unreleased/reva-gateway-endpoint-config.md b/changelog/1.13.0_2021-10-13/reva-gateway-endpoint-config.md similarity index 100% rename from changelog/unreleased/reva-gateway-endpoint-config.md rename to changelog/1.13.0_2021-10-13/reva-gateway-endpoint-config.md diff --git a/changelog/unreleased/reva-ldap-tls.md b/changelog/1.13.0_2021-10-13/reva-ldap-tls.md similarity index 100% rename from changelog/unreleased/reva-ldap-tls.md rename to changelog/1.13.0_2021-10-13/reva-ldap-tls.md diff --git a/changelog/unreleased/reva-token-expiration.md b/changelog/1.13.0_2021-10-13/reva-token-expiration.md similarity index 100% rename from changelog/unreleased/reva-token-expiration.md rename to changelog/1.13.0_2021-10-13/reva-token-expiration.md diff --git a/changelog/unreleased/update-reva-to-477bb18843a97c6e392dd316e8735ccbe44f16ed.md b/changelog/1.13.0_2021-10-13/update-reva-to-477bb18843a97c6e392dd316e8735ccbe44f16ed.md similarity index 100% rename from changelog/unreleased/update-reva-to-477bb18843a97c6e392dd316e8735ccbe44f16ed.md rename to changelog/1.13.0_2021-10-13/update-reva-to-477bb18843a97c6e392dd316e8735ccbe44f16ed.md diff --git a/changelog/unreleased/update-web-4.3.0.md b/changelog/1.13.0_2021-10-13/update-web-4.3.0.md similarity index 100% rename from changelog/unreleased/update-web-4.3.0.md rename to changelog/1.13.0_2021-10-13/update-web-4.3.0.md From 5b9870d1d8d37efbb9c881b1b89ce63ec3400cb3 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Tue, 12 Oct 2021 15:01:51 +0200 Subject: [PATCH 07/16] fix panics in update drive handler --- graph/pkg/service/v0/drives.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graph/pkg/service/v0/drives.go b/graph/pkg/service/v0/drives.go index 9810eac0c0..c83a5de7d5 100644 --- a/graph/pkg/service/v0/drives.go +++ b/graph/pkg/service/v0/drives.go @@ -238,7 +238,8 @@ func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request) { req, err := godata.ParseRequest(sanitized, r.URL.Query(), true) if err != nil { - panic(err) + errorcode.GeneralException.Render(w, r, http.StatusBadRequest, err.Error()) + return } if req.FirstSegment.Identifier.Get() == "" { @@ -256,6 +257,7 @@ func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request) { if len(identifierParts) != 2 { errorcode.GeneralException.Render(w, r, http.StatusBadRequest, fmt.Sprintf("invalid resource id: %v", req.FirstSegment.Identifier.Get())) w.WriteHeader(http.StatusInternalServerError) + return } storageID, opaqueID := identifierParts[0], identifierParts[1] @@ -287,10 +289,12 @@ func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request) { resp, err := client.UpdateStorageSpace(r.Context(), updateSpaceRequest) if err != nil { w.WriteHeader(http.StatusInternalServerError) + return } if resp.GetStatus().GetCode() != v1beta11.Code_CODE_OK { errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "") + return } w.WriteHeader(http.StatusNoContent) From 3607bbb3a99e4ba1d4383868edadc3dd2f177acb Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 13 Oct 2021 13:04:43 +0200 Subject: [PATCH 08/16] fix changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 607c6eb793..c3698d15aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -# Changelog for [1.14.0] (2021-10-13) +# Changelog for [1.13.0] (2021-10-13) -The following sections list the changes for 1.14.0. +The following sections list the changes for 1.13.0. -[1.14.0]: https://github.com/owncloud/ocis/compare/v1.12.0...v1.14.0 +[1.13.0]: https://github.com/owncloud/ocis/compare/v1.12.0...v1.13.0 ## Summary From e303f5fa5109734cb1f682b3dc8c9df4082eeb90 Mon Sep 17 00:00:00 2001 From: Patrick Maier Date: Wed, 13 Oct 2021 13:26:49 +0200 Subject: [PATCH 09/16] capability for favorites --- docs/ocis/release_notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ocis/release_notes.md b/docs/ocis/release_notes.md index 0961a74786..a8b8a4a361 100644 --- a/docs/ocis/release_notes.md +++ b/docs/ocis/release_notes.md @@ -17,6 +17,7 @@ The most prominent changes in ownCloud Infinite Scale 1.13.0 and ownCloud Web 4. - Infinite Scale and Web can now integrate external applications like file viewers/editors via the [cs3org/wopiserver](https://github.com/cs3org/wopiserver) (e.g., Collabora Online, ONLYOFFICE, CodiMD, Microsoft Office Online). [web#5805](https://github.com/owncloud/web/pull/5805) - The 'Shared with me' page in ownCloud Web now clearly separates pending, declined and accepted shares. Pending shares are always displayed prominently so that users are aware and can react accordingly. [web#5814](https://github.com/owncloud/web/pull/5814) - Legacy URLs (e.g., from the address bar, public links) from ownCloud Classic are now properly resolved after migrating to Infinite Scale and Web [cs3org/reva#1089](https://github.com/cs3org/reva/pull/1989) +- A capability for the Favorites feature has been added [ocis#2599](https://github.com/owncloud/ocis/pull/2599) You can also read the full [ownCloud Infinite Scale changelog](https://github.com/owncloud/ocis/releases/tag/v1.13.0) and [ownCloud Web changelog](https://github.com/owncloud/web/releases/tag/v4.3.0) for further details on what has changed. From d5d33c7941608708a4c9a4910ae7660a66d24f42 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 13 Oct 2021 13:47:57 +0200 Subject: [PATCH 10/16] add default space quota --- graph/pkg/config/config.go | 3 ++- graph/pkg/flagset/flagset.go | 8 ++++++++ graph/pkg/service/v0/drives.go | 25 +++++++++++++++++-------- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/graph/pkg/config/config.go b/graph/pkg/config/config.go index e678250f54..4021472772 100644 --- a/graph/pkg/config/config.go +++ b/graph/pkg/config/config.go @@ -51,7 +51,8 @@ type TokenManager struct { } type Spaces struct { - WebDavBase string + WebDavBase string + DefaultQuota string } // Config combines all available configuration parts. diff --git a/graph/pkg/flagset/flagset.go b/graph/pkg/flagset/flagset.go index 9ac8ca49ea..e691b287fd 100644 --- a/graph/pkg/flagset/flagset.go +++ b/graph/pkg/flagset/flagset.go @@ -149,6 +149,14 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { Destination: &cfg.Spaces.WebDavBase, }, + &cli.StringFlag{ + Name: "default-space-quota", + Value: flags.OverrideDefaultString(cfg.Spaces.DefaultQuota, "1000000000"), + Usage: "default quota used for all spaces if no custom quota was given", + EnvVars: []string{"GRAPH_SPACES_DEFAULT_QUOTA"}, + Destination: &cfg.Spaces.DefaultQuota, + }, + &cli.StringFlag{ Name: "jwt-secret", Value: flags.OverrideDefaultString(cfg.TokenManager.JWTSecret, "Pive-Fumkiu4"), diff --git a/graph/pkg/service/v0/drives.go b/graph/pkg/service/v0/drives.go index c83a5de7d5..9be62567d6 100644 --- a/graph/pkg/service/v0/drives.go +++ b/graph/pkg/service/v0/drives.go @@ -7,6 +7,7 @@ import ( "net/http" "net/url" "path" + "strconv" "strings" "time" @@ -184,20 +185,27 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) { errorcode.GeneralException.Render(w, r, http.StatusBadRequest, "drives of type share cannot be created via this api") } - var quota uint64 - if drive.Quota != nil && drive.Quota.Total != nil { - quota = uint64(*drive.Quota.Total) - } else { - quota = 65536 // set default quota if no value was sent. + var maxBytes *int64 + switch { + case drive.Quota != nil && drive.Quota.Total != nil && *drive.Quota.Total >= 0: + maxBytes = drive.Quota.Total + case g.config.Spaces.DefaultQuota != "": + q, err := strconv.ParseInt(g.config.Spaces.DefaultQuota, 10, 64) + if err == nil && q >= 0 { + maxBytes = &q + } + } + + var quota provider.Quota + if maxBytes != nil { + quota.QuotaMaxBytes = uint64(*maxBytes) } csr := provider.CreateStorageSpaceRequest{ Owner: us, Type: driveType, Name: spaceName, - Quota: &provider.Quota{ - QuotaMaxBytes: quota, - }, + Quota: "a, } resp, err := client.CreateStorageSpace(r.Context(), &csr) @@ -208,6 +216,7 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) { if resp.GetStatus().GetCode() != v1beta11.Code_CODE_OK { errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "") + return } wdu, err := url.Parse(g.config.Spaces.WebDavBase) From 2a6e5454d26151ba5f27707aeec1d1d5bfa472ee Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 13 Oct 2021 14:13:26 +0200 Subject: [PATCH 11/16] send nil quota if not set --- graph/pkg/service/v0/drives.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/graph/pkg/service/v0/drives.go b/graph/pkg/service/v0/drives.go index 9be62567d6..26bba71e9b 100644 --- a/graph/pkg/service/v0/drives.go +++ b/graph/pkg/service/v0/drives.go @@ -55,6 +55,7 @@ func (g Graph) GetDrives(w http.ResponseWriter, r *http.Request) { } g.logger.Error().Err(err).Msg("error sending list storage spaces grpc request") errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, res.Status.Message) + return } wdu, err := url.Parse(g.config.Spaces.WebDavBase) @@ -179,10 +180,11 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) { driveType = *drive.DriveType } switch driveType { - case "": + case "", "project": driveType = "project" - case "share": - errorcode.GeneralException.Render(w, r, http.StatusBadRequest, "drives of type share cannot be created via this api") + default: + errorcode.GeneralException.Render(w, r, http.StatusBadRequest, fmt.Sprintf("drives of type %s cannot be created via this api", driveType)) + return } var maxBytes *int64 @@ -196,16 +198,16 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) { } } - var quota provider.Quota + var quota *provider.Quota if maxBytes != nil { - quota.QuotaMaxBytes = uint64(*maxBytes) + quota = &provider.Quota{QuotaMaxBytes: uint64(*maxBytes)} } csr := provider.CreateStorageSpaceRequest{ Owner: us, Type: driveType, Name: spaceName, - Quota: "a, + Quota: quota, } resp, err := client.CreateStorageSpace(r.Context(), &csr) From 7d2b75a93ba1b4b1bd46e44b83975e8a42694ab5 Mon Sep 17 00:00:00 2001 From: Willy Kloucek <34452982+wkloucek@users.noreply.github.com> Date: Wed, 13 Oct 2021 13:44:14 +0000 Subject: [PATCH 12/16] Automated changelog update [skip ci] --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3698d15aa..2327219833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +# Changelog for [unreleased] (UNRELEASED) + +The following sections list the changes for unreleased. + +[unreleased]: https://github.com/owncloud/ocis/compare/v1.13.0...master + +## Summary + +* Security - Don't expose services by default: [#2612](https://github.com/owncloud/ocis/issues/2612) + +## Details + +* Security - Don't expose services by default: [#2612](https://github.com/owncloud/ocis/issues/2612) + + 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 # Changelog for [1.13.0] (2021-10-13) The following sections list the changes for 1.13.0. From 492da79b09a932bb730b777776a0712e1f9e8283 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 13 Oct 2021 16:50:28 +0200 Subject: [PATCH 13/16] add changelog item --- changelog/unreleased/create-space-quota.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelog/unreleased/create-space-quota.md diff --git a/changelog/unreleased/create-space-quota.md b/changelog/unreleased/create-space-quota.md new file mode 100644 index 0000000000..31243fc048 --- /dev/null +++ b/changelog/unreleased/create-space-quota.md @@ -0,0 +1,6 @@ +Change: Configurable default quota + +When creating a new space a (configurable) default quota will be used (instead the hardcoded one) +One can set the EnvVar `GRAPH_SPACES_DEFAULT_QUOTA` to configure it + +https://jira.owncloud.com/browse/OCIS-2070 From 94accca55cd95d0747fe8397e0193f5ffd4f5b46 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 13 Oct 2021 17:04:41 +0200 Subject: [PATCH 14/16] use newly created issue --- changelog/unreleased/create-space-quota.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog/unreleased/create-space-quota.md b/changelog/unreleased/create-space-quota.md index 31243fc048..7651cf7460 100644 --- a/changelog/unreleased/create-space-quota.md +++ b/changelog/unreleased/create-space-quota.md @@ -3,4 +3,5 @@ Change: Configurable default quota When creating a new space a (configurable) default quota will be used (instead the hardcoded one) One can set the EnvVar `GRAPH_SPACES_DEFAULT_QUOTA` to configure it +https://github.com/owncloud/ocis/issues/2621 https://jira.owncloud.com/browse/OCIS-2070 From 00c663f3b676acdd72c0d7d3870b8ed5a8b99c84 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Thu, 14 Oct 2021 13:50:06 +0200 Subject: [PATCH 15/16] simplify quota creation logic --- graph/pkg/service/v0/drives.go | 36 ++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/graph/pkg/service/v0/drives.go b/graph/pkg/service/v0/drives.go index 26bba71e9b..14ea3fe63c 100644 --- a/graph/pkg/service/v0/drives.go +++ b/graph/pkg/service/v0/drives.go @@ -187,27 +187,11 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) { return } - var maxBytes *int64 - switch { - case drive.Quota != nil && drive.Quota.Total != nil && *drive.Quota.Total >= 0: - maxBytes = drive.Quota.Total - case g.config.Spaces.DefaultQuota != "": - q, err := strconv.ParseInt(g.config.Spaces.DefaultQuota, 10, 64) - if err == nil && q >= 0 { - maxBytes = &q - } - } - - var quota *provider.Quota - if maxBytes != nil { - quota = &provider.Quota{QuotaMaxBytes: uint64(*maxBytes)} - } - csr := provider.CreateStorageSpaceRequest{ Owner: us, Type: driveType, Name: spaceName, - Quota: quota, + Quota: getQuota(drive.Quota, g.config.Spaces.DefaultQuota), } resp, err := client.CreateStorageSpace(r.Context(), &csr) @@ -426,3 +410,21 @@ func formatDrives(baseURL *url.URL, mds []*storageprovider.StorageSpace) ([]*msg return responses, nil } + +func getQuota(quota *msgraph.Quota, defaultQuota string) *provider.Quota { + switch { + case quota != nil && quota.Total != nil: + if q := *quota.Total; q >= 0 { + return &provider.Quota{QuotaMaxBytes: uint64(q)} + } + fallthrough + case defaultQuota != "": + if q, err := strconv.ParseInt(defaultQuota, 10, 64); err == nil && q >= 0 { + return &provider.Quota{QuotaMaxBytes: uint64(q)} + } + fallthrough + default: + return nil + } + +} From ce136b494068cec7d234e29529408f4cb538e173 Mon Sep 17 00:00:00 2001 From: kobergj Date: Thu, 14 Oct 2021 13:44:05 +0000 Subject: [PATCH 16/16] Automated changelog update [skip ci] --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2327219833..94c321562e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The following sections list the changes for unreleased. ## Summary * Security - Don't expose services by default: [#2612](https://github.com/owncloud/ocis/issues/2612) +* Change - Configurable default quota: [#2621](https://github.com/owncloud/ocis/issues/2621) ## Details @@ -17,6 +18,14 @@ The following sections list the changes for unreleased. except the proxy which is listening on 0.0.0.0:9200. https://github.com/owncloud/ocis/issues/2612 + +* Change - Configurable default quota: [#2621](https://github.com/owncloud/ocis/issues/2621) + + When creating a new space a (configurable) default quota will be used (instead the hardcoded + one) One can set the EnvVar `GRAPH_SPACES_DEFAULT_QUOTA` to configure it + + https://github.com/owncloud/ocis/issues/2621 + https://jira.owncloud.com/browse/OCIS-2070 # Changelog for [1.13.0] (2021-10-13) The following sections list the changes for 1.13.0.