From 2d291a4d296223d43c3cef36d355bf82b18adbde Mon Sep 17 00:00:00 2001 From: Julian Koberg Date: Thu, 27 Feb 2025 18:54:55 +0100 Subject: [PATCH] feat(reva): bump reva to 2.27.7 Signed-off-by: Julian Koberg --- changelog/unreleased/bump-reva.md | 5 +++++ go.mod | 2 +- go.sum | 4 ++-- .../v2/internal/http/services/ocmd/protocols.go | 3 --- .../v2/pkg/auth/manager/ocmshares/ocmshares.go | 17 +++++++++++------ vendor/modules.txt | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 changelog/unreleased/bump-reva.md diff --git a/changelog/unreleased/bump-reva.md b/changelog/unreleased/bump-reva.md new file mode 100644 index 00000000000..c0d0cb197bd --- /dev/null +++ b/changelog/unreleased/bump-reva.md @@ -0,0 +1,5 @@ +Enhancement: Bump Reva + +Bumps reva version to 2.27.7 + +https://github.com/owncloud/ocis/pull/11078 diff --git a/go.mod b/go.mod index 0f3982a4e2b..cdd4d23e562 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/cenkalti/backoff v2.2.1+incompatible github.com/coreos/go-oidc/v3 v3.11.0 github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1 - github.com/cs3org/reva/v2 v2.27.6 + github.com/cs3org/reva/v2 v2.27.7 github.com/davidbyttow/govips/v2 v2.16.0 github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8 github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e diff --git a/go.sum b/go.sum index 265e1c99143..cb17047f87d 100644 --- a/go.sum +++ b/go.sum @@ -249,8 +249,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c= github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME= github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1 h1:RU6LT6mkD16xZs011+8foU7T3LrPvTTSWeTQ9OgfhkA= github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1/go.mod h1:DedpcqXl193qF/08Y04IO0PpxyyMu8+GrkD6kWK2MEQ= -github.com/cs3org/reva/v2 v2.27.6 h1:gRUBAo8NdDRVdeIDfLUCVvtADq48BROC6QZJBpN8PSg= -github.com/cs3org/reva/v2 v2.27.6/go.mod h1:1H26PMXoa1rDrIoZ7lGOerq1Bg07/5srYfRaKfxBSsc= +github.com/cs3org/reva/v2 v2.27.7 h1:KjTDcEgySC4Q9nFIrpBeq+8IDAetTTanx/PbLSzNphs= +github.com/cs3org/reva/v2 v2.27.7/go.mod h1:1H26PMXoa1rDrIoZ7lGOerq1Bg07/5srYfRaKfxBSsc= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= diff --git a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go index 882f42b4a9f..00e2d51f117 100644 --- a/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go +++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/ocmd/protocols.go @@ -70,9 +70,6 @@ func (w *WebDAV) ToOCMProtocol() *ocm.Protocol { perms.Permissions.CreateContainer = true perms.Permissions.Delete = true perms.Permissions.Move = true - perms.Permissions.ListGrants = true - case "share": - perms.Reshare = true } } diff --git a/vendor/github.com/cs3org/reva/v2/pkg/auth/manager/ocmshares/ocmshares.go b/vendor/github.com/cs3org/reva/v2/pkg/auth/manager/ocmshares/ocmshares.go index 80dc2279f5c..b5285bcda29 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/auth/manager/ocmshares/ocmshares.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/auth/manager/ocmshares/ocmshares.go @@ -46,8 +46,8 @@ func init() { } type manager struct { - c *config - gw gateway.GatewayAPIClient + c *config + gateway *pool.Selector[gateway.GatewayAPIClient] } type config struct { @@ -64,11 +64,11 @@ func New(m map[string]interface{}) (auth.Manager, error) { if err := mgr.Configure(m); err != nil { return nil, err } - gw, err := pool.GetGatewayServiceClient(mgr.c.GatewayAddr) + gw, err := pool.GatewaySelector(mgr.c.GatewayAddr) if err != nil { return nil, err } - mgr.gw = gw + mgr.gateway = gw return &mgr, nil } @@ -84,8 +84,13 @@ func (m *manager) Configure(ml map[string]interface{}) error { func (m *manager) Authenticate(ctx context.Context, ocmshare, sharedSecret string) (*userpb.User, map[string]*authpb.Scope, error) { log := appctx.GetLogger(ctx).With().Str("ocmshare", ocmshare).Logger() + gwc, err := m.gateway.Next() + if err != nil { + return nil, nil, err + } + // We need to use GetOCMShareByToken, as GetOCMShare would require a user in the context - shareRes, err := m.gw.GetOCMShareByToken(ctx, &ocm.GetOCMShareByTokenRequest{ + shareRes, err := gwc.GetOCMShareByToken(ctx, &ocm.GetOCMShareByTokenRequest{ Token: sharedSecret, }) @@ -128,7 +133,7 @@ func (m *manager) Authenticate(ctx context.Context, ocmshare, sharedSecret strin }, } - userRes, err := m.gw.GetAcceptedUser(ctx, &ocminvite.GetAcceptedUserRequest{ + userRes, err := gwc.GetAcceptedUser(ctx, &ocminvite.GetAcceptedUserRequest{ RemoteUserId: u, Opaque: o, }) diff --git a/vendor/modules.txt b/vendor/modules.txt index 6ef924620a0..ae56cc2281c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -371,7 +371,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1 github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1 github.com/cs3org/go-cs3apis/cs3/tx/v1beta1 github.com/cs3org/go-cs3apis/cs3/types/v1beta1 -# github.com/cs3org/reva/v2 v2.27.6 +# github.com/cs3org/reva/v2 v2.27.7 ## explicit; go 1.22.7 github.com/cs3org/reva/v2/cmd/revad/internal/grace github.com/cs3org/reva/v2/cmd/revad/runtime