From e7814f9525d6e50cd2a77a35519fa1747fcd96f2 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Thu, 12 Jan 2023 15:21:48 +0100 Subject: [PATCH] add expiration to user and group shares --- changelog/unreleased/share-expiration.md | 5 +++++ go.mod | 4 ++++ go.sum | 8 ++++---- services/frontend/pkg/revaconfig/config.go | 3 +++ services/sharing/pkg/revaconfig/config.go | 6 ++++++ 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/share-expiration.md diff --git a/changelog/unreleased/share-expiration.md b/changelog/unreleased/share-expiration.md new file mode 100644 index 00000000000..66c54b66fc6 --- /dev/null +++ b/changelog/unreleased/share-expiration.md @@ -0,0 +1,5 @@ +Enhancement: Add expiration to user and group shares + +Added expiration to user and group shares. + +https://github.com/owncloud/ocis/pull/5389 diff --git a/go.mod b/go.mod index 7518b1b1eb8..f877393aaca 100644 --- a/go.mod +++ b/go.mod @@ -287,3 +287,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect stash.kopano.io/kgol/kcc-go/v5 v5.0.1 // indirect ) + +replace github.com/cs3org/reva/v2 => github.com/c0rby/reva/v2 v2.0.0-20230112142349-b6c1d3966df2 + +replace github.com/cs3org/go-cs3apis => github.com/c0rby/go-cs3apis v0.0.0-20230110100311-5b424f1baa35 diff --git a/go.sum b/go.sum index 1d9711e038b..ce7d8055fde 100644 --- a/go.sum +++ b/go.sum @@ -283,6 +283,10 @@ github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBW github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bwesterb/go-ristretto v1.2.1/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= +github.com/c0rby/go-cs3apis v0.0.0-20230110100311-5b424f1baa35 h1:bbpRY/l4z5MTH+TRGZdkIqDM9JXQQewJdO1o+80zcok= +github.com/c0rby/go-cs3apis v0.0.0-20230110100311-5b424f1baa35/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= +github.com/c0rby/reva/v2 v2.0.0-20230112142349-b6c1d3966df2 h1:47GoBFGEulM/ZcKOPimhN7xaVOPy1P2Fp8sp57OTCe0= +github.com/c0rby/reva/v2 v2.0.0-20230112142349-b6c1d3966df2/go.mod h1:u73Df9JAZsDj43GIjQIb3DO1PLJuPutZXkRqQH0oGXA= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -342,10 +346,6 @@ github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3p github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD96t1A= github.com/crewjam/saml v0.4.9 h1:X2jDv4dv3IvfT9t+RhADavzNFAcq3fVxzTCIH3G605U= github.com/crewjam/saml v0.4.9/go.mod h1:9Zh6dWPtB3MSzTRt8fIFH60Z351QQ+s7hCU3J/tTlA4= -github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965 h1:y4n2j68LLnvac+zw/al8MfPgO5aQiIwLmHM/JzYN8AM= -github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/reva/v2 v2.12.1-0.20230110081316-da324d280315 h1:pfOiXbiYW9ZPwpLOxtzSOuocanSoplhi8NE4KbQxhbk= -github.com/cs3org/reva/v2 v2.12.1-0.20230110081316-da324d280315/go.mod h1:GpocVB1w6yxeSr1VBsO9jztmt1SyNC4lCwudLwDzxHQ= 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/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index 283423e8d98..82926ab6a90 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -247,6 +247,9 @@ func FrontendConfigFromStruct(cfg *config.Config) (map[string]interface{}, error "version": "1.0.0", }, }, + "expire_date": map[string]interface{}{ + "enabled": true, + }, }, "user_enumeration": map[string]interface{}{ "enabled": true, diff --git a/services/sharing/pkg/revaconfig/config.go b/services/sharing/pkg/revaconfig/config.go index eb24939c873..8af76974c55 100644 --- a/services/sharing/pkg/revaconfig/config.go +++ b/services/sharing/pkg/revaconfig/config.go @@ -69,6 +69,12 @@ func SharingConfigFromStruct(cfg *config.Config) map[string]interface{} { "service_user_idp": cfg.UserSharingDrivers.JSONCS3.SystemUserIDP, "machine_auth_apikey": cfg.UserSharingDrivers.JSONCS3.SystemUserAPIKey, "ttl": cfg.UserSharingDrivers.JSONCS3.CacheTTL, + "events": map[string]interface{}{ + "natsaddress": cfg.Events.Addr, + "natsclusterid": cfg.Events.ClusterID, + "tlsinsecure": cfg.Events.TLSInsecure, + "tlsrootcacertificate": cfg.Events.TLSRootCaCertPath, + }, }, }, },