From fcf958c8bf7ca18fb9fc2fb10273d5be272e03e1 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Thu, 9 Mar 2023 16:08:51 +0100 Subject: [PATCH] update reva to include the password enforcement fixes --- changelog/unreleased/public-link-password.md | 5 +++++ go.mod | 2 +- go.sum | 2 ++ services/sharing/pkg/revaconfig/config.go | 14 +++++++------- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/changelog/unreleased/public-link-password.md b/changelog/unreleased/public-link-password.md index 1b5324f12..fddffa3df 100644 --- a/changelog/unreleased/public-link-password.md +++ b/changelog/unreleased/public-link-password.md @@ -2,4 +2,9 @@ Enhancement: Add config option to enforce passwords on public links Added a new config option to enforce passwords on public links with "Uploader, Editor, Contributor" roles. +The new options are: +`OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD`, `SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD` and `FRONTEND_OCS_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD`. +Check the docs on how to properly set them. + +https://github.com/owncloud/ocis/pull/5785 https://github.com/owncloud/ocis/pull/5720 diff --git a/go.mod b/go.mod index 5128ac0a5..36b677872 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/blevesearch/bleve/v2 v2.3.6 github.com/coreos/go-oidc/v3 v3.4.0 github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965 - github.com/cs3org/reva/v2 v2.12.1-0.20230308104654-4ebb727fa197 + github.com/cs3org/reva/v2 v2.12.1-0.20230309145911-3ddca079da2c github.com/disintegration/imaging v1.6.2 github.com/ggwhite/go-masker v1.0.9 github.com/go-chi/chi/v5 v5.0.7 diff --git a/go.sum b/go.sum index 853be9e1c..ab966d2ca 100644 --- a/go.sum +++ b/go.sum @@ -344,6 +344,8 @@ github.com/crewjam/saml v0.4.10 h1:Rjs6x4s/aQFXiaPjw3uhB4VdxRqoxHXOJrrj4BsMn9o= github.com/crewjam/saml v0.4.10/go.mod h1:9Zh6dWPtB3MSzTRt8fIFH60Z351QQ+s7hCU3J/tTlA4= github.com/cs3org/reva/v2 v2.12.1-0.20230308104654-4ebb727fa197 h1:CGUH/W7ZNN3pm7ElRq3vYfVIkoHj3975EY7veaR/nyY= github.com/cs3org/reva/v2 v2.12.1-0.20230308104654-4ebb727fa197/go.mod h1:EGPAVHVqMHZ6GBo4T6QMw13D0djGU8ZCi/o5siJ9IUs= +github.com/cs3org/reva/v2 v2.12.1-0.20230309145911-3ddca079da2c h1:uCeS2jKpvnarxRrnbawVyD8OPvplecRHd8oJusoOxq0= +github.com/cs3org/reva/v2 v2.12.1-0.20230309145911-3ddca079da2c/go.mod h1:EGPAVHVqMHZ6GBo4T6QMw13D0djGU8ZCi/o5siJ9IUs= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= diff --git a/services/sharing/pkg/revaconfig/config.go b/services/sharing/pkg/revaconfig/config.go index 63b3f4649..082f57732 100644 --- a/services/sharing/pkg/revaconfig/config.go +++ b/services/sharing/pkg/revaconfig/config.go @@ -79,8 +79,7 @@ func SharingConfigFromStruct(cfg *config.Config) map[string]interface{} { }, }, "publicshareprovider": map[string]interface{}{ - "driver": cfg.PublicSharingDriver, - "writeable_share_must_have_password": cfg.WriteableShareMustHavePassword, + "driver": cfg.PublicSharingDriver, "drivers": map[string]interface{}{ "json": map[string]interface{}{ "file": cfg.PublicSharingDrivers.JSON.File, @@ -104,11 +103,12 @@ func SharingConfigFromStruct(cfg *config.Config) map[string]interface{} { "machine_auth_apikey": cfg.PublicSharingDrivers.CS3.SystemUserAPIKey, }, "jsoncs3": map[string]interface{}{ - "gateway_addr": cfg.Reva.Address, - "provider_addr": cfg.PublicSharingDrivers.JSONCS3.ProviderAddr, - "service_user_id": cfg.PublicSharingDrivers.JSONCS3.SystemUserID, - "service_user_idp": cfg.PublicSharingDrivers.JSONCS3.SystemUserIDP, - "machine_auth_apikey": cfg.PublicSharingDrivers.JSONCS3.SystemUserAPIKey, + "gateway_addr": cfg.Reva.Address, + "provider_addr": cfg.PublicSharingDrivers.JSONCS3.ProviderAddr, + "service_user_id": cfg.PublicSharingDrivers.JSONCS3.SystemUserID, + "service_user_idp": cfg.PublicSharingDrivers.JSONCS3.SystemUserIDP, + "machine_auth_apikey": cfg.PublicSharingDrivers.JSONCS3.SystemUserAPIKey, + "writeable_share_must_have_password": cfg.WriteableShareMustHavePassword, }, }, },