From 800384e37963fff6daadc8b58433b3da5eea5360 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Mon, 2 May 2022 17:29:54 +0200 Subject: [PATCH 1/7] only delete flock if file is no longer locked Signed-off-by: jkoberg --- pkg/storage/utils/filelocks/filelocks.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/storage/utils/filelocks/filelocks.go b/pkg/storage/utils/filelocks/filelocks.go index b392116f8a1..7fd9e39ac55 100644 --- a/pkg/storage/utils/filelocks/filelocks.go +++ b/pkg/storage/utils/filelocks/filelocks.go @@ -140,7 +140,9 @@ func ReleaseLock(lock *flock.Flock) error { err = lock.Unlock() if err == nil { - err = os.Remove(n) + if !lock.Locked() { + err = os.Remove(n) + } } releaseMutexedFlock(n) From 28d8d2578a8f717288eaeff4327c6a4770e8ed1c Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 3 May 2022 12:13:00 +0545 Subject: [PATCH 2/7] Bump CORE_COMMITID (#2818) --- .drone.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.env b/.drone.env index 9ceccb7e9a5..fa334c47a11 100644 --- a/.drone.env +++ b/.drone.env @@ -1,3 +1,3 @@ # The test runner source for API tests -CORE_COMMITID=f73c5f6086921d858d19c1013f1cbf762c8e27dd +CORE_COMMITID=4ee9352f4df70cb49cdd539f5a6f0275d369605a CORE_BRANCH=master From afc8ead0c9a6a0acc5b46bf27a8b18ad458c098d Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 3 May 2022 14:27:29 +0200 Subject: [PATCH 3/7] centralize space id util functions (#2816) --- .../centralize-space-id-functions.md | 5 + internal/grpc/interceptors/auth/scope.go | 8 +- .../grpc/services/gateway/storageprovider.go | 5 +- .../services/gateway/usershareprovider.go | 4 +- .../publicstorageprovider.go | 34 +-- .../sharesstorageprovider.go | 32 +-- .../storageprovider/storageprovider.go | 32 +-- .../http/services/appprovider/appprovider.go | 16 +- internal/http/services/archiver/handler.go | 8 +- internal/http/services/owncloud/ocdav/get.go | 4 +- internal/http/services/owncloud/ocdav/head.go | 4 +- internal/http/services/owncloud/ocdav/meta.go | 12 +- internal/http/services/owncloud/ocdav/move.go | 4 +- .../services/owncloud/ocdav/ocdav_test.go | 4 +- .../owncloud/ocdav/propfind/propfind.go | 8 +- internal/http/services/owncloud/ocdav/put.go | 4 +- .../http/services/owncloud/ocdav/spaces.go | 3 +- .../http/services/owncloud/ocdav/trashbin.go | 4 +- internal/http/services/owncloud/ocdav/tus.go | 4 +- .../http/services/owncloud/ocdav/versions.go | 4 +- .../handlers/apps/sharing/shares/shares.go | 12 +- .../handlers/apps/sharing/shares/spaces.go | 4 +- pkg/rhttp/datatx/manager/spaces/spaces.go | 4 +- pkg/rhttp/datatx/utils/download/download.go | 3 +- pkg/storage/fs/owncloudsql/spaces.go | 4 +- pkg/storage/utils/decomposedfs/spaces.go | 22 +- pkg/storagespace/storagespace.go | 151 ++++++++++ pkg/storagespace/storagespace_test.go | 267 ++++++++++++++++++ pkg/utils/resourceid/owncloud.go | 89 ------ pkg/utils/resourceid/owncloud_test.go | 154 ---------- pkg/utils/utils.go | 75 ----- pkg/utils/utils_test.go | 128 --------- 32 files changed, 546 insertions(+), 566 deletions(-) create mode 100644 changelog/unreleased/centralize-space-id-functions.md create mode 100644 pkg/storagespace/storagespace.go create mode 100644 pkg/storagespace/storagespace_test.go delete mode 100644 pkg/utils/resourceid/owncloud.go delete mode 100644 pkg/utils/resourceid/owncloud_test.go diff --git a/changelog/unreleased/centralize-space-id-functions.md b/changelog/unreleased/centralize-space-id-functions.md new file mode 100644 index 00000000000..0401d645e2a --- /dev/null +++ b/changelog/unreleased/centralize-space-id-functions.md @@ -0,0 +1,5 @@ +Change: Merge the utility functions for space ids/references into one package + +Merged the utility functions regarding space ids or references into one package. Also updated the functions to support the newly added provider id in the spaces id. + +https://github.com/cs3org/reva/pull/2816 diff --git a/internal/grpc/interceptors/auth/scope.go b/internal/grpc/interceptors/auth/scope.go index 0097680ea19..67730fd3dda 100644 --- a/internal/grpc/interceptors/auth/scope.go +++ b/internal/grpc/interceptors/auth/scope.go @@ -40,9 +40,9 @@ import ( "github.com/cs3org/reva/v2/pkg/errtypes" statuspkg "github.com/cs3org/reva/v2/pkg/rgrpc/status" "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" + "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/cs3org/reva/v2/pkg/token" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "google.golang.org/grpc/metadata" ) @@ -137,7 +137,7 @@ func resolveLightweightScope(ctx context.Context, ref *provider.Reference, scope } for _, share := range shares.Shares { - shareKey := "lw:" + user.Id.OpaqueId + scopeDelimiter + resourceid.OwnCloudResourceIDWrap(share.Share.ResourceId) + shareKey := "lw:" + user.Id.OpaqueId + scopeDelimiter + storagespace.FormatResourceID(*share.Share.ResourceId) _ = scopeExpansionCache.SetWithExpire(shareKey, nil, scopeCacheExpiration*time.Second) if ref.ResourceId != nil && utils.ResourceIDEqual(share.Share.ResourceId, ref.ResourceId) { @@ -174,7 +174,7 @@ func resolveUserShare(ctx context.Context, ref *provider.Reference, scope *authp func checkCacheForNestedResource(ctx context.Context, ref *provider.Reference, resource *provider.ResourceId, client gateway.GatewayAPIClient, mgr token.Manager) error { // Check if this ref is cached - key := resourceid.OwnCloudResourceIDWrap(resource) + scopeDelimiter + getRefKey(ref) + key := storagespace.FormatResourceID(*resource) + scopeDelimiter + getRefKey(ref) if _, err := scopeExpansionCache.Get(key); err == nil { return nil } @@ -397,5 +397,5 @@ func getRefKey(ref *provider.Reference) string { if ref.Path != "" { return ref.Path } - return resourceid.OwnCloudResourceIDWrap(ref.ResourceId) + return storagespace.FormatResourceID(*ref.ResourceId) } diff --git a/internal/grpc/services/gateway/storageprovider.go b/internal/grpc/services/gateway/storageprovider.go index e076185c818..756bc61aa9f 100644 --- a/internal/grpc/services/gateway/storageprovider.go +++ b/internal/grpc/services/gateway/storageprovider.go @@ -45,6 +45,7 @@ import ( "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" sdk "github.com/cs3org/reva/v2/pkg/sdk/common" "github.com/cs3org/reva/v2/pkg/share" + "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/cs3org/reva/v2/pkg/utils" "github.com/golang-jwt/jwt" "github.com/pkg/errors" @@ -221,7 +222,7 @@ func (s *svc) ListStorageSpaces(ctx context.Context, req *provider.ListStorageSp for _, f := range req.Filters { switch f.Type { case provider.ListStorageSpacesRequest_Filter_TYPE_ID: - sid, oid, err := utils.SplitStorageSpaceID(f.GetId().OpaqueId) + sid, oid, err := storagespace.SplitID(f.GetId().OpaqueId) if err != nil { continue } @@ -308,7 +309,7 @@ func (s *svc) DeleteStorageSpace(ctx context.Context, req *provider.DeleteStorag _, purge = opaque.Map["purge"] } - storageid, opaqeid, err := utils.SplitStorageSpaceID(req.Id.OpaqueId) + storageid, opaqeid, err := storagespace.SplitID(req.Id.OpaqueId) if err != nil { return &provider.DeleteStorageSpaceResponse{ Status: status.NewStatusFromErrType(ctx, fmt.Sprintf("gateway could not split space id %s", req.GetId().GetOpaqueId()), err), diff --git a/internal/grpc/services/gateway/usershareprovider.go b/internal/grpc/services/gateway/usershareprovider.go index 85e1d2519dd..e1ee3ebf34c 100644 --- a/internal/grpc/services/gateway/usershareprovider.go +++ b/internal/grpc/services/gateway/usershareprovider.go @@ -34,8 +34,8 @@ import ( "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" "github.com/cs3org/reva/v2/pkg/share" "github.com/cs3org/reva/v2/pkg/storage/utils/grants" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/pkg/errors" ) @@ -779,7 +779,7 @@ func refIsSpaceRoot(ref *provider.ResourceId) bool { if ref.StorageId == "" || ref.OpaqueId == "" { return false } - sid, _ := resourceid.StorageIDUnwrap(ref.GetStorageId()) + _, sid := storagespace.SplitStorageID(ref.GetStorageId()) return sid == ref.OpaqueId } diff --git a/internal/grpc/services/publicstorageprovider/publicstorageprovider.go b/internal/grpc/services/publicstorageprovider/publicstorageprovider.go index c7b1596e57e..f959398596e 100644 --- a/internal/grpc/services/publicstorageprovider/publicstorageprovider.go +++ b/internal/grpc/services/publicstorageprovider/publicstorageprovider.go @@ -37,9 +37,9 @@ import ( "github.com/cs3org/reva/v2/pkg/rgrpc" "github.com/cs3org/reva/v2/pkg/rgrpc/status" "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/mitchellh/mapstructure" "github.com/pkg/errors" "go.opentelemetry.io/otel/attribute" @@ -104,7 +104,7 @@ func New(m map[string]interface{}, ss *grpc.Server) (rgrpc.Service, error) { func (s *service) SetArbitraryMetadata(ctx context.Context, req *provider.SetArbitraryMetadataRequest) (*provider.SetArbitraryMetadataResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) @@ -126,7 +126,7 @@ func (s *service) UnsetArbitraryMetadata(ctx context.Context, req *provider.Unse // SetLock puts a lock on the given reference func (s *service) SetLock(ctx context.Context, req *provider.SetLockRequest) (*provider.SetLockResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) @@ -144,7 +144,7 @@ func (s *service) SetLock(ctx context.Context, req *provider.SetLockRequest) (*p // GetLock returns an existing lock on the given reference func (s *service) GetLock(ctx context.Context, req *provider.GetLockRequest) (*provider.GetLockResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) @@ -162,7 +162,7 @@ func (s *service) GetLock(ctx context.Context, req *provider.GetLockRequest) (*p // RefreshLock refreshes an existing lock on the given reference func (s *service) RefreshLock(ctx context.Context, req *provider.RefreshLockRequest) (*provider.RefreshLockResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) @@ -180,7 +180,7 @@ func (s *service) RefreshLock(ctx context.Context, req *provider.RefreshLockRequ // Unlock removes an existing lock from the given reference func (s *service) Unlock(ctx context.Context, req *provider.UnlockRequest) (*provider.UnlockResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) @@ -197,7 +197,7 @@ func (s *service) Unlock(ctx context.Context, req *provider.UnlockRequest) (*pro func (s *service) InitiateFileDownload(ctx context.Context, req *provider.InitiateFileDownloadRequest) (*provider.InitiateFileDownloadResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } statReq := &provider.StatRequest{Ref: req.Ref} @@ -323,7 +323,7 @@ func (s *service) initiateFileDownload(ctx context.Context, req *provider.Initia func (s *service) InitiateFileUpload(ctx context.Context, req *provider.InitiateFileUploadRequest) (*provider.InitiateFileUploadResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } cs3Ref, _, ls, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) @@ -411,7 +411,7 @@ func (s *service) CreateStorageSpace(ctx context.Context, req *provider.CreateSt func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStorageSpacesRequest) (*provider.ListStorageSpacesResponse, error) { for i, f := range req.Filters { if f.Type == provider.ListStorageSpacesRequest_Filter_TYPE_ID { - id, _ := resourceid.StorageIDUnwrap(f.GetId().GetOpaqueId()) + _, id := storagespace.SplitStorageID(f.GetId().GetOpaqueId()) req.Filters[i].Term = &provider.ListStorageSpacesRequest_Filter_Id{Id: &provider.StorageSpaceId{OpaqueId: id}} break } @@ -431,7 +431,7 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora } spaceTypes[spaceType] = exists case provider.ListStorageSpacesRequest_Filter_TYPE_ID: - spaceid, shareid, err := utils.SplitStorageSpaceID(f.GetId().OpaqueId) + spaceid, shareid, err := storagespace.SplitID(f.GetId().OpaqueId) if err != nil { continue } @@ -549,7 +549,7 @@ func (s *service) DeleteStorageSpace(ctx context.Context, req *provider.DeleteSt func (s *service) CreateContainer(ctx context.Context, req *provider.CreateContainerRequest) (*provider.CreateContainerResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } ctx, span := rtrace.Provider.Tracer("publicstorageprovider").Start(ctx, "CreateContainer") @@ -593,7 +593,7 @@ func (s *service) CreateContainer(ctx context.Context, req *provider.CreateConta func (s *service) TouchFile(ctx context.Context, req *provider.TouchFileRequest) (*provider.TouchFileResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } ref, _, _, st, err := s.translatePublicRefToCS3Ref(ctx, req.Ref) @@ -610,7 +610,7 @@ func (s *service) TouchFile(ctx context.Context, req *provider.TouchFileRequest) func (s *service) Delete(ctx context.Context, req *provider.DeleteRequest) (*provider.DeleteResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } ctx, span := rtrace.Provider.Tracer("publicstorageprovider").Start(ctx, "Delete") @@ -654,10 +654,10 @@ func (s *service) Delete(ctx context.Context, req *provider.DeleteRequest) (*pro func (s *service) Move(ctx context.Context, req *provider.MoveRequest) (*provider.MoveResponse, error) { if req.Source.GetResourceId() != nil { - req.Source.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Source.ResourceId.StorageId) + _, req.Source.ResourceId.StorageId = storagespace.SplitStorageID(req.Source.ResourceId.StorageId) } if req.Destination.GetResourceId() != nil { - req.Destination.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Destination.ResourceId.StorageId) + _, req.Destination.ResourceId.StorageId = storagespace.SplitStorageID(req.Destination.ResourceId.StorageId) } ctx, span := rtrace.Provider.Tracer("publicstorageprovider").Start(ctx, "Move") @@ -724,7 +724,7 @@ func (s *service) Move(ctx context.Context, req *provider.MoveRequest) (*provide func (s *service) Stat(ctx context.Context, req *provider.StatRequest) (*provider.StatResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } ctx, span := rtrace.Provider.Tracer("publicstorageprovider").Start(ctx, "Stat") @@ -825,7 +825,7 @@ func (s *service) ListContainerStream(req *provider.ListContainerStreamRequest, func (s *service) ListContainer(ctx context.Context, req *provider.ListContainerRequest) (*provider.ListContainerResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } share, ok := extractLinkFromScope(ctx) diff --git a/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go b/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go index 18323a344ca..ec8f2f63b80 100644 --- a/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go +++ b/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go @@ -26,7 +26,7 @@ import ( "strings" "github.com/cs3org/reva/v2/pkg/share" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" + "github.com/cs3org/reva/v2/pkg/storagespace" "google.golang.org/grpc" codes "google.golang.org/grpc/codes" gstatus "google.golang.org/grpc/status" @@ -107,7 +107,7 @@ func New(gateway gateway.GatewayAPIClient, c collaboration.CollaborationAPIClien func (s *service) SetArbitraryMetadata(ctx context.Context, req *provider.SetArbitraryMetadataRequest) (*provider.SetArbitraryMetadataResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } receivedShare, rpcStatus, err := s.resolveReference(ctx, req.Ref) @@ -135,7 +135,7 @@ func (s *service) SetArbitraryMetadata(ctx context.Context, req *provider.SetArb func (s *service) UnsetArbitraryMetadata(ctx context.Context, req *provider.UnsetArbitraryMetadataRequest) (*provider.UnsetArbitraryMetadataResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } receivedShare, rpcStatus, err := s.resolveReference(ctx, req.Ref) @@ -163,7 +163,7 @@ func (s *service) UnsetArbitraryMetadata(ctx context.Context, req *provider.Unse func (s *service) InitiateFileDownload(ctx context.Context, req *provider.InitiateFileDownloadRequest) (*provider.InitiateFileDownloadResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } receivedShare, rpcStatus, err := s.resolveReference(ctx, req.Ref) @@ -219,7 +219,7 @@ func (s *service) InitiateFileDownload(ctx context.Context, req *provider.Initia func (s *service) InitiateFileUpload(ctx context.Context, req *provider.InitiateFileUploadRequest) (*provider.InitiateFileUploadResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } receivedShare, rpcStatus, err := s.resolveReference(ctx, req.Ref) @@ -308,7 +308,7 @@ func (s *service) CreateStorageSpace(ctx context.Context, req *provider.CreateSt func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStorageSpacesRequest) (*provider.ListStorageSpacesResponse, error) { for i, f := range req.Filters { if f.Type == provider.ListStorageSpacesRequest_Filter_TYPE_ID { - id, _ := resourceid.StorageIDUnwrap(f.GetId().GetOpaqueId()) + _, id := storagespace.SplitStorageID(f.GetId().GetOpaqueId()) req.Filters[i].Term = &provider.ListStorageSpacesRequest_Filter_Id{Id: &provider.StorageSpaceId{OpaqueId: id}} break } @@ -334,7 +334,7 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora } spaceTypes[spaceType] = exists case provider.ListStorageSpacesRequest_Filter_TYPE_ID: - spaceid, shareid, err := utils.SplitStorageSpaceID(f.GetId().OpaqueId) + spaceid, shareid, err := storagespace.SplitID(f.GetId().OpaqueId) if err != nil { continue } @@ -499,7 +499,7 @@ func (s *service) DeleteStorageSpace(ctx context.Context, req *provider.DeleteSt func (s *service) CreateContainer(ctx context.Context, req *provider.CreateContainerRequest) (*provider.CreateContainerResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } receivedShare, rpcStatus, err := s.resolveReference(ctx, req.Ref) @@ -526,7 +526,7 @@ func (s *service) CreateContainer(ctx context.Context, req *provider.CreateConta func (s *service) Delete(ctx context.Context, req *provider.DeleteRequest) (*provider.DeleteResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } receivedShare, rpcStatus, err := s.resolveReference(ctx, req.Ref) @@ -567,10 +567,10 @@ func (s *service) Delete(ctx context.Context, req *provider.DeleteRequest) (*pro func (s *service) Move(ctx context.Context, req *provider.MoveRequest) (*provider.MoveResponse, error) { if req.Source.GetResourceId() != nil { - req.Source.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Source.ResourceId.StorageId) + _, req.Source.ResourceId.StorageId = storagespace.SplitStorageID(req.Source.ResourceId.StorageId) } if req.Destination.GetResourceId() != nil { - req.Destination.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Destination.ResourceId.StorageId) + _, req.Destination.ResourceId.StorageId = storagespace.SplitStorageID(req.Destination.ResourceId.StorageId) } appctx.GetLogger(ctx).Debug(). @@ -671,7 +671,7 @@ func (s *service) Unlock(ctx context.Context, req *provider.UnlockRequest) (*pro func (s *service) Stat(ctx context.Context, req *provider.StatRequest) (*provider.StatResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } if isVirtualRoot(req.Ref.ResourceId) && (req.Ref.Path == "" || req.Ref.Path == ".") { @@ -756,7 +756,7 @@ func isVirtualRoot(id *provider.ResourceId) bool { } func (s *service) ListContainer(ctx context.Context, req *provider.ListContainerRequest) (*provider.ListContainerResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } if isVirtualRoot(req.Ref.ResourceId) { @@ -792,7 +792,7 @@ func (s *service) ListContainer(ctx context.Context, req *provider.ListContainer } func (s *service) ListFileVersions(ctx context.Context, req *provider.ListFileVersionsRequest) (*provider.ListFileVersionsResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } receivedShare, rpcStatus, err := s.resolveReference(ctx, req.Ref) @@ -820,7 +820,7 @@ func (s *service) ListFileVersions(ctx context.Context, req *provider.ListFileVe func (s *service) RestoreFileVersion(ctx context.Context, req *provider.RestoreFileVersionRequest) (*provider.RestoreFileVersionResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } receivedShare, rpcStatus, err := s.resolveReference(ctx, req.Ref) @@ -897,7 +897,7 @@ func (s *service) TouchFile(ctx context.Context, req *provider.TouchFileRequest) // GetQuota returns 0 free quota. It is virtual ... the shares may have a different quota ... func (s *service) GetQuota(ctx context.Context, req *provider.GetQuotaRequest) (*provider.GetQuotaResponse, error) { if req.Ref.GetResourceId() != nil { - req.Ref.ResourceId.StorageId, _ = resourceid.StorageIDUnwrap(req.Ref.ResourceId.StorageId) + _, req.Ref.ResourceId.StorageId = storagespace.SplitStorageID(req.Ref.ResourceId.StorageId) } // FIXME use req.Ref to get real quota diff --git a/internal/grpc/services/storageprovider/storageprovider.go b/internal/grpc/services/storageprovider/storageprovider.go index cfdd2bec164..c21b56e21df 100644 --- a/internal/grpc/services/storageprovider/storageprovider.go +++ b/internal/grpc/services/storageprovider/storageprovider.go @@ -41,9 +41,9 @@ import ( "github.com/cs3org/reva/v2/pkg/rhttp/router" "github.com/cs3org/reva/v2/pkg/storage" "github.com/cs3org/reva/v2/pkg/storage/fs/registry" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/mitchellh/mapstructure" "github.com/pkg/errors" "go.opentelemetry.io/otel/attribute" @@ -497,15 +497,15 @@ func (s *service) CreateStorageSpace(ctx context.Context, req *provider.CreateSt }, nil } - resp.StorageSpace.Id.OpaqueId = resourceid.StorageIDWrap(resp.StorageSpace.Id.GetOpaqueId(), s.conf.MountID) - resp.StorageSpace.Root.StorageId = resourceid.StorageIDWrap(resp.StorageSpace.Root.GetStorageId(), s.conf.MountID) + resp.StorageSpace.Id.OpaqueId = storagespace.FormatStorageID(s.conf.MountID, resp.StorageSpace.Id.GetOpaqueId()) + resp.StorageSpace.Root.StorageId = storagespace.FormatStorageID(s.conf.MountID, resp.StorageSpace.Root.GetStorageId()) return resp, nil } func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStorageSpacesRequest) (*provider.ListStorageSpacesResponse, error) { for i, f := range req.Filters { if f.Type == provider.ListStorageSpacesRequest_Filter_TYPE_ID { - id, _ := resourceid.StorageIDUnwrap(f.GetId().GetOpaqueId()) + _, id := storagespace.SplitStorageID(f.GetId().GetOpaqueId()) req.Filters[i].Term = &provider.ListStorageSpacesRequest_Filter_Id{Id: &provider.StorageSpaceId{OpaqueId: id}} break } @@ -549,8 +549,8 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora log.Error().Str("service", "storageprovider").Str("driver", s.conf.Driver).Interface("space", sp).Msg("space is missing space id and root id") continue } - sp.Id.OpaqueId = resourceid.StorageIDWrap(sp.Id.GetOpaqueId(), s.conf.MountID) - sp.Root.StorageId = resourceid.StorageIDWrap(sp.Root.GetStorageId(), s.conf.MountID) + sp.Id.OpaqueId = storagespace.FormatStorageID(s.conf.MountID, sp.Id.GetOpaqueId()) + sp.Root.StorageId = storagespace.FormatStorageID(s.conf.MountID, sp.Root.GetStorageId()) } return &provider.ListStorageSpacesResponse{ @@ -561,8 +561,8 @@ func (s *service) ListStorageSpaces(ctx context.Context, req *provider.ListStora func (s *service) UpdateStorageSpace(ctx context.Context, req *provider.UpdateStorageSpaceRequest) (*provider.UpdateStorageSpaceResponse, error) { if req.GetStorageSpace().GetId() != nil { - req.StorageSpace.Id.OpaqueId, _ = resourceid.StorageIDUnwrap(req.StorageSpace.Id.OpaqueId) - req.StorageSpace.Root.StorageId, _ = resourceid.StorageIDUnwrap(req.StorageSpace.Root.StorageId) + _, req.StorageSpace.Id.OpaqueId = storagespace.SplitStorageID(req.StorageSpace.Id.OpaqueId) + _, req.StorageSpace.Root.StorageId = storagespace.SplitStorageID(req.StorageSpace.Root.StorageId) } res, err := s.storage.UpdateStorageSpace(ctx, req) @@ -574,14 +574,14 @@ func (s *service) UpdateStorageSpace(ctx context.Context, req *provider.UpdateSt Msg("failed to update storage space") return nil, err } - res.StorageSpace.Id.OpaqueId = resourceid.StorageIDWrap(res.StorageSpace.Id.GetOpaqueId(), s.conf.MountID) - res.StorageSpace.Root.StorageId = resourceid.StorageIDWrap(res.StorageSpace.Root.GetStorageId(), s.conf.MountID) + res.StorageSpace.Id.OpaqueId = storagespace.FormatStorageID(s.conf.MountID, res.StorageSpace.Id.GetOpaqueId()) + res.StorageSpace.Root.StorageId = storagespace.FormatStorageID(s.conf.MountID, res.StorageSpace.Root.GetStorageId()) return res, nil } func (s *service) DeleteStorageSpace(ctx context.Context, req *provider.DeleteStorageSpaceRequest) (*provider.DeleteStorageSpaceResponse, error) { if req.GetId() != nil { - req.Id.OpaqueId, _ = resourceid.StorageIDUnwrap(req.Id.OpaqueId) + _, req.Id.OpaqueId = storagespace.SplitStorageID(req.Id.OpaqueId) } if err := s.storage.DeleteStorageSpace(ctx, req); err != nil { @@ -726,7 +726,7 @@ func (s *service) Stat(ctx context.Context, req *provider.StatRequest) (*provide if providerID == "" { providerID = s.conf.MountID } - md.Id.StorageId = resourceid.StorageIDWrap(md.Id.GetStorageId(), providerID) + md.Id.StorageId = storagespace.FormatStorageID(providerID, md.Id.GetStorageId()) return &provider.StatResponse{ Status: status.NewOK(ctx), Info: md, @@ -794,7 +794,7 @@ func (s *service) ListContainer(ctx context.Context, req *provider.ListContainer } for _, i := range res.Infos { - i.Id.StorageId = resourceid.StorageIDWrap(i.Id.GetStorageId(), s.conf.MountID) + i.Id.StorageId = storagespace.FormatStorageID(s.conf.MountID, i.Id.GetStorageId()) } return res, nil } @@ -905,7 +905,7 @@ func (s *service) ListRecycle(ctx context.Context, req *provider.ListRecycleRequ for _, i := range items { if i.Ref != nil && i.Ref.ResourceId != nil { - i.Ref.ResourceId.StorageId = resourceid.StorageIDWrap(i.Ref.GetResourceId().GetStorageId(), s.conf.MountID) + i.Ref.ResourceId.StorageId = storagespace.FormatStorageID(s.conf.MountID, i.Ref.GetResourceId().GetStorageId()) } } res := &provider.ListRecycleResponse{ @@ -1244,13 +1244,13 @@ func (v descendingMtime) Swap(i, j int) { func unwrapProviderID(id *provider.ResourceId) string { var spid string if id != nil { - id.StorageId, spid = resourceid.StorageIDUnwrap(id.StorageId) + spid, id.StorageId = storagespace.SplitStorageID(id.StorageId) } return spid } func rewrapProviderID(id *provider.ResourceId, spid string) { if id != nil { - id.StorageId = resourceid.StorageIDWrap(id.StorageId, spid) + id.StorageId = storagespace.FormatStorageID(spid, id.StorageId) } } diff --git a/internal/http/services/appprovider/appprovider.go b/internal/http/services/appprovider/appprovider.go index e73cfdaf725..06cda3b13c9 100644 --- a/internal/http/services/appprovider/appprovider.go +++ b/internal/http/services/appprovider/appprovider.go @@ -34,8 +34,8 @@ import ( "github.com/cs3org/reva/v2/pkg/rhttp" "github.com/cs3org/reva/v2/pkg/rhttp/global" "github.com/cs3org/reva/v2/pkg/sharedconf" + "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/go-chi/chi" ua "github.com/mileusna/useragent" "github.com/mitchellh/mapstructure" @@ -135,8 +135,8 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) { return } - parentContainerRef := resourceid.OwnCloudResourceIDUnwrap(parentContainerID) - if parentContainerRef == nil { + parentContainerRef, err := storagespace.ParseID(parentContainerID) + if err != nil { writeError(w, r, appErrorInvalidParameter, "invalid parent container ID", nil) return } @@ -155,7 +155,7 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) { statParentContainerReq := &provider.StatRequest{ Ref: &provider.Reference{ - ResourceId: parentContainerRef, + ResourceId: &parentContainerRef, }, } parentContainer, err := client.Stat(ctx, statParentContainerReq) @@ -271,7 +271,7 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) { js, err := json.Marshal( map[string]interface{}{ - "file_id": resourceid.OwnCloudResourceIDWrap(statRes.Info.Id), + "file_id": storagespace.FormatResourceID(*statRes.Info.Id), }, ) if err != nil { @@ -334,14 +334,14 @@ func (s *svc) handleOpen(w http.ResponseWriter, r *http.Request) { return } - resourceID := resourceid.OwnCloudResourceIDUnwrap(fileID) - if resourceID == nil { + resourceID, err := storagespace.ParseID(fileID) + if err != nil { writeError(w, r, appErrorInvalidParameter, "invalid file ID", nil) return } fileRef := &provider.Reference{ - ResourceId: resourceID, + ResourceId: &resourceID, Path: ".", } diff --git a/internal/http/services/archiver/handler.go b/internal/http/services/archiver/handler.go index c56eae581c3..8726a9e6bef 100644 --- a/internal/http/services/archiver/handler.go +++ b/internal/http/services/archiver/handler.go @@ -39,7 +39,7 @@ import ( "github.com/cs3org/reva/v2/pkg/sharedconf" "github.com/cs3org/reva/v2/pkg/storage/utils/downloader" "github.com/cs3org/reva/v2/pkg/storage/utils/walker" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" + "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/gdexlab/go-render/render" ua "github.com/mileusna/useragent" "github.com/mitchellh/mapstructure" @@ -129,12 +129,12 @@ func (s *svc) getResources(ctx context.Context, paths, ids []string) ([]*provide for _, id := range ids { // id is base64 encoded and after decoding has the form : - decodedID := resourceid.OwnCloudResourceIDUnwrap(id) - if decodedID == nil { + decodedID, err := storagespace.ParseID(id) + if err != nil { return nil, errors.New("could not unwrap given file id") } - resources = append(resources, decodedID) + resources = append(resources, &decodedID) } diff --git a/internal/http/services/owncloud/ocdav/get.go b/internal/http/services/owncloud/ocdav/get.go index 6b1413ac68f..40225324071 100644 --- a/internal/http/services/owncloud/ocdav/get.go +++ b/internal/http/services/owncloud/ocdav/get.go @@ -37,9 +37,9 @@ import ( "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/spacelookup" "github.com/cs3org/reva/v2/pkg/appctx" "github.com/cs3org/reva/v2/pkg/rhttp" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/rs/zerolog" ) @@ -146,7 +146,7 @@ func (s *svc) handleGet(ctx context.Context, w http.ResponseWriter, r *http.Requ w.Header().Set(net.HeaderContentDisposistion, "attachment; filename*=UTF-8''"+ path.Base(r.URL.Path)+"; filename=\""+path.Base(r.URL.Path)+"\"") w.Header().Set(net.HeaderETag, info.Etag) - w.Header().Set(net.HeaderOCFileID, resourceid.OwnCloudResourceIDWrap(info.Id)) + w.Header().Set(net.HeaderOCFileID, storagespace.FormatResourceID(*info.Id)) w.Header().Set(net.HeaderOCETag, info.Etag) t := utils.TSToTime(info.Mtime).UTC() lastModifiedString := t.Format(time.RFC1123Z) diff --git a/internal/http/services/owncloud/ocdav/head.go b/internal/http/services/owncloud/ocdav/head.go index 1882d52a208..d5dd7c74477 100644 --- a/internal/http/services/owncloud/ocdav/head.go +++ b/internal/http/services/owncloud/ocdav/head.go @@ -27,8 +27,8 @@ import ( "strings" "time" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" @@ -93,7 +93,7 @@ func (s *svc) handleHead(ctx context.Context, w http.ResponseWriter, r *http.Req info := res.Info w.Header().Set(net.HeaderContentType, info.MimeType) w.Header().Set(net.HeaderETag, info.Etag) - w.Header().Set(net.HeaderOCFileID, resourceid.OwnCloudResourceIDWrap(info.Id)) + w.Header().Set(net.HeaderOCFileID, storagespace.FormatResourceID(*info.Id)) w.Header().Set(net.HeaderOCETag, info.Etag) if info.Checksum != nil { w.Header().Set(net.HeaderOCChecksum, fmt.Sprintf("%s:%s", strings.ToUpper(string(storageprovider.GRPC2PKGXS(info.Checksum.Type))), info.Checksum.Sum)) diff --git a/internal/http/services/owncloud/ocdav/meta.go b/internal/http/services/owncloud/ocdav/meta.go index 820d808a602..f6bb481b239 100644 --- a/internal/http/services/owncloud/ocdav/meta.go +++ b/internal/http/services/owncloud/ocdav/meta.go @@ -32,8 +32,8 @@ import ( "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/propfind" "github.com/cs3org/reva/v2/pkg/appctx" "github.com/cs3org/reva/v2/pkg/rhttp/router" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" ) // MetaHandler handles meta requests @@ -57,8 +57,8 @@ func (h *MetaHandler) Handler(s *svc) http.Handler { return } - did := resourceid.OwnCloudResourceIDUnwrap(id) - if did == nil { + did, err := storagespace.ParseID(id) + if err != nil { logger := appctx.GetLogger(r.Context()) logger.Debug().Str("prop", net.PropOcMetaPathForUser).Msg("invalid resource id") w.WriteHeader(http.StatusBadRequest) @@ -76,9 +76,9 @@ func (h *MetaHandler) Handler(s *svc) http.Handler { w.WriteHeader(http.StatusBadRequest) return } - h.handlePathForUser(w, r, s, did) + h.handlePathForUser(w, r, s, &did) case "v": - h.VersionsHandler.Handler(s, did).ServeHTTP(w, r) + h.VersionsHandler.Handler(s, &did).ServeHTTP(w, r) default: w.WriteHeader(http.StatusNotFound) } @@ -90,7 +90,7 @@ func (h *MetaHandler) handlePathForUser(w http.ResponseWriter, r *http.Request, ctx, span := rtrace.Provider.Tracer("ocdav").Start(r.Context(), "meta_propfind") defer span.End() - id := resourceid.OwnCloudResourceIDWrap(rid) + id := storagespace.FormatResourceID(*rid) sublog := appctx.GetLogger(ctx).With().Str("path", r.URL.Path).Str("resourceid", id).Logger() client, err := s.getClient() if err != nil { diff --git a/internal/http/services/owncloud/ocdav/move.go b/internal/http/services/owncloud/ocdav/move.go index 0146cd5fa89..84a2cfae322 100644 --- a/internal/http/services/owncloud/ocdav/move.go +++ b/internal/http/services/owncloud/ocdav/move.go @@ -31,9 +31,9 @@ import ( "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/spacelookup" "github.com/cs3org/reva/v2/pkg/appctx" "github.com/cs3org/reva/v2/pkg/rhttp/router" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/rs/zerolog" ) @@ -278,7 +278,7 @@ func (s *svc) handleMove(ctx context.Context, w http.ResponseWriter, r *http.Req info := dstStatRes.Info w.Header().Set(net.HeaderContentType, info.MimeType) w.Header().Set(net.HeaderETag, info.Etag) - w.Header().Set(net.HeaderOCFileID, resourceid.OwnCloudResourceIDWrap(info.Id)) + w.Header().Set(net.HeaderOCFileID, storagespace.FormatResourceID(*info.Id)) w.Header().Set(net.HeaderOCETag, info.Etag) w.WriteHeader(successCode) } diff --git a/internal/http/services/owncloud/ocdav/ocdav_test.go b/internal/http/services/owncloud/ocdav/ocdav_test.go index 13f47f4cc33..e6108d44235 100644 --- a/internal/http/services/owncloud/ocdav/ocdav_test.go +++ b/internal/http/services/owncloud/ocdav/ocdav_test.go @@ -21,12 +21,12 @@ import ( "testing" providerv1beta1 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" + "github.com/cs3org/reva/v2/pkg/storagespace" ) func TestWrapResourceID(t *testing.T) { expected := "storageid" + "!" + "opaqueid" - wrapped := resourceid.OwnCloudResourceIDWrap(&providerv1beta1.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}) + wrapped := storagespace.FormatResourceID(providerv1beta1.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}) if wrapped != expected { t.Errorf("wrapped id doesn't have the expected format: got %s expected %s", wrapped, expected) diff --git a/internal/http/services/owncloud/ocdav/propfind/propfind.go b/internal/http/services/owncloud/ocdav/propfind/propfind.go index b9206bd9a80..4c82a895e56 100644 --- a/internal/http/services/owncloud/ocdav/propfind/propfind.go +++ b/internal/http/services/owncloud/ocdav/propfind/propfind.go @@ -46,9 +46,9 @@ import ( ctxpkg "github.com/cs3org/reva/v2/pkg/ctx" "github.com/cs3org/reva/v2/pkg/publicshare" "github.com/cs3org/reva/v2/pkg/rhttp/router" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/rs/zerolog" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" @@ -736,7 +736,7 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p // return all known properties if md.Id != nil { - id := resourceid.OwnCloudResourceIDWrap(md.Id) + id := storagespace.FormatResourceID(*md.Id) propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:id", id), prop.Escaped("oc:fileid", id), @@ -840,13 +840,13 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p // I tested the desktop client and phoenix to annotate which properties are requestted, see below cases case "fileid": // phoenix only if md.Id != nil { - propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:fileid", resourceid.OwnCloudResourceIDWrap(md.Id))) + propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:fileid", storagespace.FormatResourceID(*md.Id))) } else { propstatNotFound.Prop = append(propstatNotFound.Prop, prop.NotFound("oc:fileid")) } case "id": // desktop client only if md.Id != nil { - propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:id", resourceid.OwnCloudResourceIDWrap(md.Id))) + propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:id", storagespace.FormatResourceID(*md.Id))) } else { propstatNotFound.Prop = append(propstatNotFound.Prop, prop.NotFound("oc:id")) } diff --git a/internal/http/services/owncloud/ocdav/put.go b/internal/http/services/owncloud/ocdav/put.go index 2bd34dbd67d..d62229523dd 100644 --- a/internal/http/services/owncloud/ocdav/put.go +++ b/internal/http/services/owncloud/ocdav/put.go @@ -37,9 +37,9 @@ import ( "github.com/cs3org/reva/v2/pkg/errtypes" "github.com/cs3org/reva/v2/pkg/rhttp" "github.com/cs3org/reva/v2/pkg/storage/utils/chunking" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/rs/zerolog" ) @@ -327,7 +327,7 @@ func (s *svc) handlePut(ctx context.Context, w http.ResponseWriter, r *http.Requ w.Header().Add(net.HeaderContentType, newInfo.MimeType) w.Header().Set(net.HeaderETag, newInfo.Etag) - w.Header().Set(net.HeaderOCFileID, resourceid.OwnCloudResourceIDWrap(newInfo.Id)) + w.Header().Set(net.HeaderOCFileID, storagespace.FormatResourceID(*newInfo.Id)) w.Header().Set(net.HeaderOCETag, newInfo.Etag) t := utils.TSToTime(newInfo.Mtime).UTC() lastModifiedString := t.Format(time.RFC1123Z) diff --git a/internal/http/services/owncloud/ocdav/spaces.go b/internal/http/services/owncloud/ocdav/spaces.go index 384ceba3e14..06694d82c05 100644 --- a/internal/http/services/owncloud/ocdav/spaces.go +++ b/internal/http/services/owncloud/ocdav/spaces.go @@ -29,6 +29,7 @@ import ( "github.com/cs3org/reva/v2/pkg/appctx" "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" "github.com/cs3org/reva/v2/pkg/rhttp/router" + "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/cs3org/reva/v2/pkg/utils" ) @@ -157,7 +158,7 @@ func (h *SpacesHandler) handleSpacesTrashbin(w http.ResponseWriter, r *http.Requ return } - ref, err := utils.ParseStorageSpaceReference(spaceID) + ref, err := storagespace.ParseReference(spaceID) if err != nil { w.WriteHeader(http.StatusBadRequest) return diff --git a/internal/http/services/owncloud/ocdav/trashbin.go b/internal/http/services/owncloud/ocdav/trashbin.go index 158acfe6ecd..6042ebbdb0e 100644 --- a/internal/http/services/owncloud/ocdav/trashbin.go +++ b/internal/http/services/owncloud/ocdav/trashbin.go @@ -34,8 +34,8 @@ import ( "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/prop" "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/propfind" "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/spacelookup" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" @@ -571,7 +571,7 @@ func (h *TrashbinHandler) restore(w http.ResponseWriter, r *http.Request, s *svc info := dstStatRes.Info w.Header().Set(net.HeaderContentType, info.MimeType) w.Header().Set(net.HeaderETag, info.Etag) - w.Header().Set(net.HeaderOCFileID, resourceid.OwnCloudResourceIDWrap(info.Id)) + w.Header().Set(net.HeaderOCFileID, storagespace.FormatResourceID(*info.Id)) w.Header().Set(net.HeaderOCETag, info.Etag) w.WriteHeader(successCode) diff --git a/internal/http/services/owncloud/ocdav/tus.go b/internal/http/services/owncloud/ocdav/tus.go index 1506f82f258..de8affc826b 100644 --- a/internal/http/services/owncloud/ocdav/tus.go +++ b/internal/http/services/owncloud/ocdav/tus.go @@ -37,9 +37,9 @@ import ( "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocs/conversions" "github.com/cs3org/reva/v2/pkg/appctx" "github.com/cs3org/reva/v2/pkg/rhttp" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/rs/zerolog" tusd "github.com/tus/tusd/pkg/handler" ) @@ -326,7 +326,7 @@ func (s *svc) handleTusPost(ctx context.Context, w http.ResponseWriter, r *http. ) w.Header().Set(net.HeaderContentType, info.MimeType) - w.Header().Set(net.HeaderOCFileID, resourceid.OwnCloudResourceIDWrap(info.Id)) + w.Header().Set(net.HeaderOCFileID, storagespace.FormatResourceID(*info.Id)) w.Header().Set(net.HeaderOCETag, info.Etag) w.Header().Set(net.HeaderETag, info.Etag) w.Header().Set(net.HeaderOCPermissions, permissions) diff --git a/internal/http/services/owncloud/ocdav/versions.go b/internal/http/services/owncloud/ocdav/versions.go index 9ebbab4c5a3..90d2a751f98 100644 --- a/internal/http/services/owncloud/ocdav/versions.go +++ b/internal/http/services/owncloud/ocdav/versions.go @@ -26,8 +26,8 @@ import ( "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/errors" "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/net" "github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/propfind" + "github.com/cs3org/reva/v2/pkg/storagespace" rtrace "github.com/cs3org/reva/v2/pkg/trace" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" @@ -57,7 +57,7 @@ func (h *VersionsHandler) Handler(s *svc, rid *provider.ResourceId) http.Handler } // baseURI is encoded as part of the response payload in href field - baseURI := path.Join(ctx.Value(net.CtxKeyBaseURI).(string), resourceid.OwnCloudResourceIDWrap(rid)) + baseURI := path.Join(ctx.Value(net.CtxKeyBaseURI).(string), storagespace.FormatResourceID(*rid)) ctx = context.WithValue(ctx, net.CtxKeyBaseURI, baseURI) r = r.WithContext(ctx) diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go index bbfd7761334..aee01197931 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go @@ -56,8 +56,8 @@ import ( cachereg "github.com/cs3org/reva/v2/pkg/share/cache/registry" warmupreg "github.com/cs3org/reva/v2/pkg/share/cache/warmup/registry" "github.com/cs3org/reva/v2/pkg/storage/utils/templates" + "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/pkg/errors" ) @@ -157,7 +157,7 @@ func (h *Handler) startCacheWarmup(c cache.Warmup) { return } for _, r := range infos { - key := resourceid.OwnCloudResourceIDWrap(r.Id) + key := storagespace.FormatResourceID(*r.Id) _ = h.resourceInfoCache.SetWithExpire(key, r, h.resourceInfoCacheTTL) } } @@ -172,7 +172,7 @@ func (h *Handler) extractReference(r *http.Request) (provider.Reference, error) } } else if spaceRef := r.FormValue("space_ref"); spaceRef != "" { var err error - ref, err = utils.ParseStorageSpaceReference(spaceRef) + ref, err = storagespace.ParseReference(spaceRef) if err != nil { return provider.Reference{}, err } @@ -1030,7 +1030,7 @@ func (h *Handler) addFileInfo(ctx context.Context, s *conversions.ShareData, inf s.MimeType = parsedMt // TODO STime: &types.Timestamp{Seconds: info.Mtime.Seconds, Nanos: info.Mtime.Nanos}, // TODO Storage: int - s.ItemSource = resourceid.OwnCloudResourceIDWrap(info.Id) + s.ItemSource = storagespace.FormatResourceID(*info.Id) s.FileSource = s.ItemSource switch { case h.sharePrefix == "/": @@ -1233,7 +1233,7 @@ func (h *Handler) getResourceInfoByReference(ctx context.Context, client gateway key = ref.Path } else { var err error - key, err = utils.FormatStorageSpaceReference(ref) + key, err = storagespace.FormatReference(ref) if err != nil { return nil, nil, err } @@ -1242,7 +1242,7 @@ func (h *Handler) getResourceInfoByReference(ctx context.Context, client gateway } func (h *Handler) getResourceInfoByID(ctx context.Context, client gateway.GatewayAPIClient, id *provider.ResourceId) (*provider.ResourceInfo, *rpc.Status, error) { - return h.getResourceInfo(ctx, client, resourceid.OwnCloudResourceIDWrap(id), &provider.Reference{ResourceId: id, Path: "."}) + return h.getResourceInfo(ctx, client, storagespace.FormatResourceID(*id), &provider.Reference{ResourceId: id, Path: "."}) } // getResourceInfo retrieves the resource info to a target. diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/spaces.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/spaces.go index d91a9e1b4b3..8d3184f5e37 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/spaces.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/spaces.go @@ -37,7 +37,7 @@ import ( "github.com/cs3org/reva/v2/pkg/rgrpc/status" "github.com/cs3org/reva/v2/pkg/rgrpc/todo/pool" sdk "github.com/cs3org/reva/v2/pkg/sdk/common" - "github.com/cs3org/reva/v2/pkg/utils" + "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/pkg/errors" ) @@ -132,7 +132,7 @@ func (h *Handler) removeSpaceMember(w http.ResponseWriter, r *http.Request, spac return } - ref, err := utils.ParseStorageSpaceReference(spaceID) + ref, err := storagespace.ParseReference(spaceID) if err != nil { response.WriteOCSError(w, r, response.MetaBadRequest.StatusCode, "could not parse space id", err) return diff --git a/pkg/rhttp/datatx/manager/spaces/spaces.go b/pkg/rhttp/datatx/manager/spaces/spaces.go index 1ff0788b021..c2373f9a6ee 100644 --- a/pkg/rhttp/datatx/manager/spaces/spaces.go +++ b/pkg/rhttp/datatx/manager/spaces/spaces.go @@ -31,7 +31,7 @@ import ( "github.com/cs3org/reva/v2/pkg/rhttp/datatx/utils/download" "github.com/cs3org/reva/v2/pkg/rhttp/router" "github.com/cs3org/reva/v2/pkg/storage" - "github.com/cs3org/reva/v2/pkg/utils" + "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/mitchellh/mapstructure" "github.com/pkg/errors" ) @@ -81,7 +81,7 @@ func (m *manager) Handler(fs storage.FS) (http.Handler, error) { fn := path.Clean(strings.TrimLeft(r.URL.Path, "/")) defer r.Body.Close() - storageid, opaqeid, _ := utils.SplitStorageSpaceID(spaceID) + storageid, opaqeid, _ := storagespace.SplitID(spaceID) ref := &provider.Reference{ ResourceId: &provider.ResourceId{StorageId: storageid, OpaqueId: opaqeid}, Path: fn, diff --git a/pkg/rhttp/datatx/utils/download/download.go b/pkg/rhttp/datatx/utils/download/download.go index bb8bffde7a9..356545bab96 100644 --- a/pkg/rhttp/datatx/utils/download/download.go +++ b/pkg/rhttp/datatx/utils/download/download.go @@ -31,6 +31,7 @@ import ( "github.com/cs3org/reva/v2/pkg/appctx" "github.com/cs3org/reva/v2/pkg/errtypes" "github.com/cs3org/reva/v2/pkg/storage" + "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/cs3org/reva/v2/pkg/utils" "github.com/rs/zerolog" ) @@ -54,7 +55,7 @@ func GetOrHeadFile(w http.ResponseWriter, r *http.Request, fs storage.FS, spaceI ref = &provider.Reference{Path: path.Join("/", fn)} } else { // build a storage space reference - storageid, opaqeid, _ := utils.SplitStorageSpaceID(spaceID) + storageid, opaqeid, _ := storagespace.SplitID(spaceID) ref = &provider.Reference{ ResourceId: &provider.ResourceId{StorageId: storageid, OpaqueId: opaqeid}, // ensure the relative path starts with '.' diff --git a/pkg/storage/fs/owncloudsql/spaces.go b/pkg/storage/fs/owncloudsql/spaces.go index 5b264a780c2..c19e779d92b 100644 --- a/pkg/storage/fs/owncloudsql/spaces.go +++ b/pkg/storage/fs/owncloudsql/spaces.go @@ -30,7 +30,7 @@ import ( ctxpkg "github.com/cs3org/reva/v2/pkg/ctx" "github.com/cs3org/reva/v2/pkg/errtypes" "github.com/cs3org/reva/v2/pkg/storage/fs/owncloudsql/filecache" - "github.com/cs3org/reva/v2/pkg/utils" + "github.com/cs3org/reva/v2/pkg/storagespace" ) // ListStorageSpaces lists storage spaces according to the provided filters @@ -47,7 +47,7 @@ func (fs *owncloudsqlfs) ListStorageSpaces(ctx context.Context, filter []*provid t := filter[i].GetSpaceType() filteringUnsupportedSpaceTypes = (t != "personal" && !strings.HasPrefix(t, "+")) case provider.ListStorageSpacesRequest_Filter_TYPE_ID: - spaceID, _, _ = utils.SplitStorageSpaceID(filter[i].GetId().OpaqueId) + spaceID, _, _ = storagespace.SplitID(filter[i].GetId().OpaqueId) } } if filteringUnsupportedSpaceTypes { diff --git a/pkg/storage/utils/decomposedfs/spaces.go b/pkg/storage/utils/decomposedfs/spaces.go index cdfec537834..d50f47cd2f8 100644 --- a/pkg/storage/utils/decomposedfs/spaces.go +++ b/pkg/storage/utils/decomposedfs/spaces.go @@ -43,8 +43,8 @@ import ( "github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node" "github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/xattrs" "github.com/cs3org/reva/v2/pkg/storage/utils/templates" + "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/cs3org/reva/v2/pkg/utils" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/google/uuid" "github.com/pkg/errors" ) @@ -265,7 +265,7 @@ func (fs *Decomposedfs) ListStorageSpaces(ctx context.Context, filter []*provide spaceTypes = append(spaceTypes, filter[i].GetSpaceType()) } case provider.ListStorageSpacesRequest_Filter_TYPE_ID: - spaceID, nodeID, _ = utils.SplitStorageSpaceID(filter[i].GetId().OpaqueId) + spaceID, nodeID, _ = storagespace.SplitID(filter[i].GetId().OpaqueId) if strings.Contains(nodeID, "/") { return []*provider.StorageSpace{}, nil } @@ -402,7 +402,7 @@ func (fs *Decomposedfs) UpdateStorageSpace(ctx context.Context, req *provider.Up } space := req.StorageSpace - spaceID, _, _ := utils.SplitStorageSpaceID(space.Id.OpaqueId) + spaceID, _, _ := storagespace.SplitID(space.Id.OpaqueId) node, err := node.ReadNode(ctx, fs.lu, spaceID, spaceID) if err != nil { @@ -441,8 +441,8 @@ func (fs *Decomposedfs) UpdateStorageSpace(ctx context.Context, req *provider.Up metadata[xattrs.SpaceAliasAttr] = alias } if image := utils.ReadPlainFromOpaque(space.Opaque, "image"); image != "" { - imageID := resourceid.OwnCloudResourceIDUnwrap(image) - if imageID == nil { + imageID, err := storagespace.ParseID(image) + if err != nil { return &provider.UpdateStorageSpaceResponse{ Status: &v1beta11.Status{Code: v1beta11.Code_CODE_NOT_FOUND, Message: "decomposedFS: space image resource not found"}, }, nil @@ -450,8 +450,8 @@ func (fs *Decomposedfs) UpdateStorageSpace(ctx context.Context, req *provider.Up metadata[xattrs.SpaceImageAttr] = imageID.OpaqueId } if readme := utils.ReadPlainFromOpaque(space.Opaque, "readme"); readme != "" { - readmeID := resourceid.OwnCloudResourceIDUnwrap(readme) - if readmeID == nil { + readmeID, err := storagespace.ParseID(readme) + if err != nil { return &provider.UpdateStorageSpaceResponse{ Status: &v1beta11.Status{Code: v1beta11.Code_CODE_NOT_FOUND, Message: "decomposedFS: space readme resource not found"}, }, nil @@ -708,8 +708,8 @@ func (fs *Decomposedfs) storageSpaceFromNode(ctx context.Context, n *node.Node, } spaceImage, ok := spaceAttributes[xattrs.SpaceImageAttr] if ok { - space.Opaque = utils.AppendPlainToOpaque(space.Opaque, "image", resourceid.OwnCloudResourceIDWrap( - &provider.ResourceId{StorageId: space.Root.StorageId, OpaqueId: spaceImage}, + space.Opaque = utils.AppendPlainToOpaque(space.Opaque, "image", storagespace.FormatResourceID( + provider.ResourceId{StorageId: space.Root.StorageId, OpaqueId: spaceImage}, )) } spaceDescription, ok := spaceAttributes[xattrs.SpaceDescriptionAttr] @@ -718,8 +718,8 @@ func (fs *Decomposedfs) storageSpaceFromNode(ctx context.Context, n *node.Node, } spaceReadme, ok := spaceAttributes[xattrs.SpaceReadmeAttr] if ok { - space.Opaque = utils.AppendPlainToOpaque(space.Opaque, "readme", resourceid.OwnCloudResourceIDWrap( - &provider.ResourceId{StorageId: space.Root.StorageId, OpaqueId: spaceReadme}, + space.Opaque = utils.AppendPlainToOpaque(space.Opaque, "readme", storagespace.FormatResourceID( + provider.ResourceId{StorageId: space.Root.StorageId, OpaqueId: spaceReadme}, )) } spaceAlias, ok := spaceAttributes[xattrs.SpaceAliasAttr] diff --git a/pkg/storagespace/storagespace.go b/pkg/storagespace/storagespace.go new file mode 100644 index 00000000000..24454b3bedc --- /dev/null +++ b/pkg/storagespace/storagespace.go @@ -0,0 +1,151 @@ +// Copyright 2018-2021 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package storagespace + +import ( + "path" + "strings" + + provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" + "github.com/cs3org/reva/v2/pkg/utils" + "github.com/pkg/errors" +) + +const ( + _idDelimiter string = "!" + _storageIDDelimiter string = "$" +) + +var ( + // ErrInvalidSpaceReference signals that the space reference is invalid. + ErrInvalidSpaceReference = errors.New("invalid storage space reference") + // ErrInvalidSpaceID signals that the space ID is invalid. + ErrInvalidSpaceID = errors.New("invalid storage space id") +) + +// SplitID splits a storage space ID into a provider ID and a node ID. +// The accepted formats results of the storage space ID and respective results +// are: +// $! -> $, +// $ -> $, +// -> , +func SplitID(ssid string) (storageid, nodeid string, err error) { + if ssid == "" { + return "", "", errors.Wrap(ErrInvalidSpaceID, "can't split empty storage space ID") + } + parts := strings.SplitN(ssid, _idDelimiter, 2) + if len(parts) == 1 || parts[1] == "" { + _, sid := SplitStorageID(parts[0]) + return parts[0], sid, nil + } + return parts[0], parts[1], nil +} + +// SplitStorageID splits a storage ID into the provider ID and the spaceID. +// The accepted formats are: +// $ -> , +// -> "", +func SplitStorageID(sid string) (providerID, spaceID string) { + parts := strings.SplitN(sid, _storageIDDelimiter, 2) + if len(parts) == 2 { + return parts[0], parts[1] + } + return "", parts[0] +} + +// FormatResourceID converts a ResourceId into the string format. +// The result format will look like: +// ! +func FormatResourceID(sid provider.ResourceId) string { + return strings.Join([]string{sid.StorageId, sid.OpaqueId}, _idDelimiter) +} + +// FormatStorageID converts the provider ID and space ID into the string format. +// The result format will look like: +// $ or +// in case the provider ID is empty. +func FormatStorageID(providerID, spaceID string) string { + if providerID == "" { + return spaceID + } + return strings.Join([]string{providerID, spaceID}, _storageIDDelimiter) +} + +// ParseID parses a storage space ID and returns a storageprovider ResourceId. +// The accepted formats are: +// $! -> $, +// $ -> $, +// -> , +func ParseID(ssid string) (provider.ResourceId, error) { + sid, nid, err := SplitID(ssid) + return provider.ResourceId{ + StorageId: sid, + OpaqueId: nid, + }, err +} + +// ParseReference parses a string into a spaces reference. +// The expected format is `$!/`. +func ParseReference(sRef string) (provider.Reference, error) { + parts := strings.SplitN(sRef, "/", 2) + + rid, err := ParseID(parts[0]) + if err != nil { + return provider.Reference{}, err + } + + var path string + if len(parts) == 2 { + path = parts[1] + } + + return provider.Reference{ + ResourceId: &rid, + Path: utils.MakeRelativePath(path), + }, nil +} + +// FormatReference will format a storage space reference into a string representation. +// If ref or ref.ResourceId are nil an error will be returned. +// The function doesn't check if all values are set. +// The resulting format can be: +// +// "storage_id!opaque_id" +// "storage_id!opaque_id/path" +// "storage_id/path" +// "storage_id" +func FormatReference(ref *provider.Reference) (string, error) { + if ref == nil || ref.ResourceId == nil || ref.ResourceId.StorageId == "" { + return "", ErrInvalidSpaceReference + } + var ssid string + if ref.ResourceId.OpaqueId == "" { + + ssid = ref.ResourceId.StorageId + } else { + var sb strings.Builder + // ssid == storage_id!opaque_id + sb.Grow(len(ref.ResourceId.StorageId) + len(ref.ResourceId.OpaqueId) + 1) + sb.WriteString(ref.ResourceId.StorageId) + sb.WriteString(_idDelimiter) + sb.WriteString(ref.ResourceId.OpaqueId) + ssid = sb.String() + } + return path.Join(ssid, ref.Path), nil +} diff --git a/pkg/storagespace/storagespace_test.go b/pkg/storagespace/storagespace_test.go new file mode 100644 index 00000000000..d07d8737be5 --- /dev/null +++ b/pkg/storagespace/storagespace_test.go @@ -0,0 +1,267 @@ +// Copyright 2018-2021 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +package storagespace + +import ( + "errors" + "testing" + + provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" + "github.com/cs3org/reva/v2/pkg/utils" +) + +func TestSplitStorageID(t *testing.T) { + tests := []struct { + input string + expected []string + }{ + { + "providerid" + _storageIDDelimiter + "storageid", + []string{"storageid", "providerid"}, + }, + { + "", + nil, + }, + { + "storageid", + []string{"storageid", ""}, + }, + } + + for _, tt := range tests { + storageID, spaceID := SplitStorageID(tt.input) + switch { + case tt.expected == nil: + if spaceID != "" || storageID != "" { + t.Errorf("Expected unwrap to return nil, got '%s' '%s'", spaceID, storageID) + } + case len(tt.expected) != 2: + t.Error("testcase won't work with len(expected) != 2. Avoiding panic") + case spaceID != tt.expected[0]: + t.Errorf("StorageID doesn't match, expected '%s' got '%s'", tt.expected[0], spaceID) + case storageID != tt.expected[1]: + t.Errorf("ProviderID doesn't match, expected '%s' got '%s'", tt.expected[1], storageID) + } + } + +} + +func TestParseID(t *testing.T) { + tests := []struct { + input string + expected provider.ResourceId + expectedErr error + }{ + { + "spaceid" + _idDelimiter + "opaqueid", + provider.ResourceId{StorageId: "spaceid", OpaqueId: "opaqueid"}, + nil, + }, + { + "providerid" + _storageIDDelimiter + "spaceid" + _idDelimiter + "opaqueid", + provider.ResourceId{StorageId: "providerid$spaceid", OpaqueId: "opaqueid"}, + nil, + }, + { + "", + provider.ResourceId{}, + ErrInvalidSpaceID, + }, + { + "spaceid", + provider.ResourceId{StorageId: "spaceid", OpaqueId: "spaceid"}, + nil, + }, + } + + for _, tt := range tests { + rid, err := ParseID(tt.input) + switch { + case tt.expectedErr != nil: + if !errors.Is(err, tt.expectedErr) { + t.Errorf("Expected ParseID to return error %s, got %s", tt.expectedErr, err) + } + case rid.StorageId != tt.expected.StorageId: + t.Errorf("StorageIDs don't match. Expected %v, got %v", tt.expected, rid) + case rid.OpaqueId != tt.expected.OpaqueId: + t.Errorf("StorageIDs don't match. Expected %v, got %v", tt.expected, rid) + } + } + +} + +func TestFormatResourceID(t *testing.T) { + expected := "storageid" + _idDelimiter + "opaqueid" + wrapped := FormatResourceID(provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}) + + if wrapped != expected { + t.Errorf("wrapped id doesn't have the expected format: got %s expected %s", wrapped, expected) + } +} + +func TestFormatStorageID(t *testing.T) { + expected := "providerid" + _storageIDDelimiter + "spaceid" + wrapped := FormatStorageID("providerid", "spaceid") + + if wrapped != expected { + t.Errorf("wrapped id doesn't have the expected format: got %s expected %s", wrapped, expected) + } +} + +func TestParseStorageSpaceReference(t *testing.T) { + tests := []struct { + sRef string + storageID string + nodeID string + relPath string + }{ + { + "1234!abcd/f1/f2", + "1234", + "abcd", + "./f1/f2", + }, + { + "1234!abcd", + "1234", + "abcd", + ".", + }, + { + "01234$56789!abcd", + "01234$56789", + "abcd", + ".", + }, + } + for _, tt := range tests { + ref, _ := ParseReference(tt.sRef) + + if ref.ResourceId.StorageId != tt.storageID { + t.Errorf("Expected storageId %s got %s", tt.storageID, ref.ResourceId.StorageId) + } + if ref.ResourceId.OpaqueId != tt.nodeID { + t.Errorf("Expected OpaqueId %s got %s", tt.nodeID, ref.ResourceId.OpaqueId) + } + if ref.Path != tt.relPath { + t.Errorf("Expected path %s got %s", tt.relPath, ref.Path) + } + } +} + +func TestFormatStorageSpaceReference(t *testing.T) { + tests := []struct { + ref *provider.Reference + expected string + expectedErr error + }{ + { + ref: &provider.Reference{}, + expected: "", + expectedErr: ErrInvalidSpaceReference, + }, + { + ref: &provider.Reference{ResourceId: &provider.ResourceId{}}, + expected: "!", + expectedErr: ErrInvalidSpaceReference, + }, + { + ref: &provider.Reference{ResourceId: &provider.ResourceId{OpaqueId: "opaqueid"}, Path: "path"}, + expectedErr: ErrInvalidSpaceReference, + }, + { + ref: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}, Path: "path"}, + expected: "storageid/path", + }, + { + ref: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "path"}, + expected: "storageid!opaqueid/path", + }, + { + ref: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "."}, + expected: "storageid!opaqueid", + }, + { + ref: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}, Path: "."}, + expected: "storageid", + }, + { + ref: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}}, + expected: "storageid", + }, + } + + for _, tt := range tests { + result, err := FormatReference(tt.ref) + if err != nil && !errors.Is(err, tt.expectedErr) { + t.Errorf("FormateStorageSpaceRefence returned unexpected error: %v", err) + } + if err == nil && result != tt.expected { + t.Errorf("Reference %v got formatted to %s, expected %s", tt.ref, result, tt.expected) + } + } +} + +func TestFormatAndParseReference(t *testing.T) { + tests := []struct { + orig *provider.Reference + expected *provider.Reference + }{ + { + orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}, Path: "./path"}, + expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "storageid"}, Path: "./path"}, + }, + { + orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid$spaceid"}, Path: "./path"}, + expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid$spaceid", OpaqueId: "spaceid"}, Path: "./path"}, + }, + { + orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "./path"}, + expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "./path"}, + }, + { + orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid$spaceid", OpaqueId: "opaqueid"}, Path: "./path"}, + expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid$spaceid", OpaqueId: "opaqueid"}, Path: "./path"}, + }, + { + orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "."}, + expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "."}, + }, + { + orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}, Path: "."}, + expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "storageid"}, Path: "."}, + }, + { + orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}}, + expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "storageid"}, Path: "."}, + }, + } + + for _, tt := range tests { + formatted, _ := FormatReference(tt.orig) + parsed, err := ParseReference(formatted) + if err != nil { + t.Errorf("failed to parse space reference: %s error: %s", formatted, err) + } + if !(utils.ResourceIDEqual(parsed.ResourceId, tt.expected.ResourceId) && parsed.Path == tt.expected.Path) { + t.Errorf("Formatted then parsed references don't match the original got: %v expected %v", parsed, tt.expected) + } + } +} diff --git a/pkg/utils/resourceid/owncloud.go b/pkg/utils/resourceid/owncloud.go deleted file mode 100644 index d566f1c8b38..00000000000 --- a/pkg/utils/resourceid/owncloud.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2018-2021 CERN -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// In applying this license, CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -package resourceid - -import ( - "errors" - "strings" - "unicode/utf8" - - provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" -) - -const ( - _idDelimiter string = "!" - _providerDelimiter string = "$" -) - -// StorageIDUnwrap unwraps the 'encoded' into the storageID and the storageProviderID -func StorageIDUnwrap(s string) (sid string, spid string) { - spid, sid, err := unwrap(s, _providerDelimiter) - if err != nil { - // assume it's only a storageid - return s, "" - } - return sid, spid -} - -// OwnCloudResourceIDUnwrap returns the wrapped resource id -// by OwnCloudResourceIDWrap and returns nil if not possible -func OwnCloudResourceIDUnwrap(rid string) *provider.ResourceId { - sid, oid, err := unwrap(rid, _idDelimiter) - if err != nil { - return nil - } - return &provider.ResourceId{ - StorageId: sid, - OpaqueId: oid, - } -} - -func unwrap(rid string, delimiter string) (string, string, error) { - parts := strings.SplitN(rid, delimiter, 2) - if len(parts) != 2 { - return "", "", errors.New("could not find two parts with given delimiter") - } - - if !utf8.ValidString(parts[0]) || !utf8.ValidString(parts[1]) { - return "", "", errors.New("invalid utf8 string found") - } - - return parts[0], parts[1], nil -} - -// OwnCloudResourceIDWrap wraps a resource id into a xml safe string -// which can then be passed to the outside world -func OwnCloudResourceIDWrap(r *provider.ResourceId) string { - return wrap(r.StorageId, r.OpaqueId, _idDelimiter) -} - -// StorageIDWrap wraps a storageid and storageproviderid into a xml safe string -// which can then be passed to the outside world -func StorageIDWrap(sid string, spid string) string { - return wrap(spid, sid, _providerDelimiter) -} - -// returns second argument in case the first is empty (without adding the delimiter) -// the delimiter should be Url safe (we use a reserved character) -func wrap(first string, second string, delimiter string) string { - if first == "" { - return second - } - return first + delimiter + second -} diff --git a/pkg/utils/resourceid/owncloud_test.go b/pkg/utils/resourceid/owncloud_test.go deleted file mode 100644 index 775ccd314cd..00000000000 --- a/pkg/utils/resourceid/owncloud_test.go +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2021 CERN -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// In applying this license, CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. -package resourceid - -import ( - "testing" - - providerv1beta1 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" -) - -func BenchmarkWrap(b *testing.B) { - for i := 0; i < b.N; i++ { - _ = wrap("storageid", "opaqueid", "!") - } -} - -func TestWrap(t *testing.T) { - expected := "storageid!opaqueid" - wrapped := wrap("storageid", "opaqueid", "!") - - if wrapped != expected { - t.Errorf("wrapped id doesn't have the expected format: got %s expected %s", wrapped, expected) - } -} - -func TestWrapResourceID(t *testing.T) { - expected := "storageid" + _idDelimiter + "opaqueid" - wrapped := OwnCloudResourceIDWrap(&providerv1beta1.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}) - - if wrapped != expected { - t.Errorf("wrapped id doesn't have the expected format: got %s expected %s", wrapped, expected) - } -} - -func TestWrapStorageID(t *testing.T) { - expected := "providerid" + _providerDelimiter + "storageid" - wrapped := StorageIDWrap("storageid", "providerid") - - if wrapped != expected { - t.Errorf("wrapped id doesn't have the expected format: got %s expected %s", wrapped, expected) - } -} - -func TestUnwrap(t *testing.T) { - expected := []string{"storageid", "opaqueid"} - sid, oid, err := unwrap("storageid!opaqueid", "!") - if err != nil { - t.Errorf("unwrap returned an error: %v", err) - } - - if sid != expected[0] || oid != expected[1] { - t.Errorf("wrapped id doesn't have the expected format: got (%s, %s) expected %s", sid, oid, expected) - } -} - -func BenchmarkUnwrap(b *testing.B) { - delimiter := "!" - for i := 0; i < b.N; i++ { - _, _, _ = unwrap("storageid"+delimiter+"opaqueid", delimiter) - } -} - -func TestUnwrapResourceID(t *testing.T) { - tests := []struct { - input string - expected *providerv1beta1.ResourceId - }{ - { - "storageid" + _idDelimiter + "opaqueid", - &providerv1beta1.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, - }, - { - "providerid" + _providerDelimiter + "storageid" + _idDelimiter + "opaqueid", - &providerv1beta1.ResourceId{StorageId: "providerid$storageid", OpaqueId: "opaqueid"}, - }, - { - "", - nil, - }, - { - "c", - nil, - }, - } - - for _, tt := range tests { - rid := OwnCloudResourceIDUnwrap(tt.input) - switch { - case tt.expected == nil: - if rid != nil { - t.Errorf("Expected unwrap to return nil, got %v", rid) - } - case rid == nil: - t.Errorf("ResourceID should not be nil. Expected %v", tt.expected) - case rid.StorageId != tt.expected.StorageId: - t.Errorf("StorageIDs don't match. Expected %v, got %v", tt.expected, rid) - case rid.OpaqueId != tt.expected.OpaqueId: - t.Errorf("StorageIDs don't match. Expected %v, got %v", tt.expected, rid) - } - } - -} - -func TestUnwrapStorageID(t *testing.T) { - tests := []struct { - input string - expected []string - }{ - { - "providerid" + _providerDelimiter + "storageid", - []string{"storageid", "providerid"}, - }, - { - "", - nil, - }, - { - "storageid", - []string{"storageid", ""}, - }, - } - - for _, tt := range tests { - sid, spid := StorageIDUnwrap(tt.input) - switch { - case tt.expected == nil: - if sid != "" || spid != "" { - t.Errorf("Expected unwrap to return nil, got '%s' '%s'", sid, spid) - } - case len(tt.expected) != 2: - t.Error("testcase won't work with len(expected) != 2. Avoiding panic") - case sid != tt.expected[0]: - t.Errorf("StorageID doesn't match, expected '%s' got '%s'", tt.expected[0], sid) - case spid != tt.expected[1]: - t.Errorf("ProviderID doesn't match, expected '%s' got '%s'", tt.expected[1], spid) - } - } - -} diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 1a8266ed99a..9b3c7ffb295 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -19,7 +19,6 @@ package utils import ( - "errors" "math/rand" "net" "net/http" @@ -38,15 +37,10 @@ import ( types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/cs3org/reva/v2/pkg/registry" "github.com/cs3org/reva/v2/pkg/registry/memory" - "github.com/cs3org/reva/v2/pkg/utils/resourceid" "github.com/golang/protobuf/proto" "google.golang.org/protobuf/encoding/protojson" ) -const ( - spaceIDDelimiter = "!" -) - var ( matchFirstCap = regexp.MustCompile("(.)([A-Z][a-z]+)") matchAllCap = regexp.MustCompile("([a-z0-9])([A-Z])") @@ -63,8 +57,6 @@ var ( // SpaceGrant is used to signal the storageprovider that the grant is on a space SpaceGrant struct{} - - errInvalidSpaceReference = errors.New("invalid storage space reference") ) // Skip evaluates whether a source endpoint contains any of the prefixes. @@ -327,73 +319,6 @@ func UserTypeToString(accountType userpb.UserType) string { return t } -// SplitStorageSpaceID can be used to split `storagespaceid` into `storageid` and `nodeid`. -// If no specific node is appended with a `!` separator the spaceid is used as nodeid, identifying the root of the space. -func SplitStorageSpaceID(ssid string) (storageid, nodeid string, err error) { - if ssid == "" { - return "", "", errors.New("can't split empty StorageSpaceID") - } - parts := strings.SplitN(ssid, spaceIDDelimiter, 2) - if len(parts) == 1 { - p, _ := resourceid.StorageIDUnwrap(parts[0]) - return parts[0], p, nil - } - return parts[0], parts[1], nil -} - -// ParseStorageSpaceReference parses a string into a spaces reference. -// The expected format is `!/`. -func ParseStorageSpaceReference(sRef string) (provider.Reference, error) { - parts := strings.SplitN(sRef, "/", 2) - - storageid, nodeid, err := SplitStorageSpaceID(parts[0]) - if err != nil { - return provider.Reference{}, err - } - - var relPath string - if len(parts) == 2 { - relPath = parts[1] - } - - return provider.Reference{ - ResourceId: &provider.ResourceId{ - StorageId: storageid, - OpaqueId: nodeid, - }, - Path: MakeRelativePath(relPath), - }, nil -} - -// FormatStorageSpaceReference will format a storage space reference into a string representation. -// If ref or ref.ResourceId are nil an error will be returned. -// The function doesn't check if all values are set. -// The resulting format can be: -// -// "storage_id!opaque_id" -// "storage_id!opaque_id/path" -// "storage_id/path" -// "storage_id" -func FormatStorageSpaceReference(ref *provider.Reference) (string, error) { - if ref == nil || ref.ResourceId == nil || ref.ResourceId.StorageId == "" { - return "", errInvalidSpaceReference - } - var ssid string - if ref.ResourceId.OpaqueId == "" { - - ssid = ref.ResourceId.StorageId - } else { - var sb strings.Builder - // ssid == storage_id!opaque_id - sb.Grow(len(ref.ResourceId.StorageId) + len(ref.ResourceId.OpaqueId) + 1) - sb.WriteString(ref.ResourceId.StorageId) - sb.WriteString(spaceIDDelimiter) - sb.WriteString(ref.ResourceId.OpaqueId) - ssid = sb.String() - } - return path.Join(ssid, ref.Path), nil -} - // GetViewMode converts a human-readable string to a view mode for opening a resource in an app. func GetViewMode(viewMode string) gateway.OpenInAppRequest_ViewMode { switch viewMode { diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go index d8caa7dedc8..6d5a7ff335b 100644 --- a/pkg/utils/utils_test.go +++ b/pkg/utils/utils_test.go @@ -19,7 +19,6 @@ package utils import ( - "errors" "testing" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" @@ -173,130 +172,3 @@ func TestMakeRelativePath(t *testing.T) { } } } - -func TestParseStorageSpaceReference(t *testing.T) { - tests := []struct { - sRef string - storageID string - nodeID string - relPath string - }{ - { - "1234!abcd/f1/f2", - "1234", - "abcd", - "./f1/f2", - }, - { - "1234!abcd", - "1234", - "abcd", - ".", - }, - } - for _, tt := range tests { - ref, _ := ParseStorageSpaceReference(tt.sRef) - - if ref.ResourceId.StorageId != tt.storageID { - t.Errorf("Expected storageId %s got %s", tt.storageID, ref.ResourceId.StorageId) - } - if ref.ResourceId.OpaqueId != tt.nodeID { - t.Errorf("Expected OpaqueId %s got %s", tt.nodeID, ref.ResourceId.OpaqueId) - } - if ref.Path != tt.relPath { - t.Errorf("Expected path %s got %s", tt.relPath, ref.Path) - } - } -} - -func TestFormatStorageSpaceReference(t *testing.T) { - tests := []struct { - ref *provider.Reference - expected string - expectedErr error - }{ - { - ref: &provider.Reference{}, - expected: "", - expectedErr: errInvalidSpaceReference, - }, - { - ref: &provider.Reference{ResourceId: &provider.ResourceId{}}, - expected: "!", - expectedErr: errInvalidSpaceReference, - }, - { - ref: &provider.Reference{ResourceId: &provider.ResourceId{OpaqueId: "opaqueid"}, Path: "path"}, - expectedErr: errInvalidSpaceReference, - }, - { - ref: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}, Path: "path"}, - expected: "storageid/path", - }, - { - ref: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "path"}, - expected: "storageid!opaqueid/path", - }, - { - ref: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "."}, - expected: "storageid!opaqueid", - }, - { - ref: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}, Path: "."}, - expected: "storageid", - }, - { - ref: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}}, - expected: "storageid", - }, - } - - for _, tt := range tests { - result, err := FormatStorageSpaceReference(tt.ref) - if err != nil && !errors.Is(err, tt.expectedErr) { - t.Errorf("FormateStorageSpaceRefence returned unexpected error: %v", err) - } - if err == nil && result != tt.expected { - t.Errorf("Reference %v got formatted to %s, expected %s", tt.ref, result, tt.expected) - } - } -} - -func TestFormatAndParseReference(t *testing.T) { - tests := []struct { - orig *provider.Reference - expected *provider.Reference - }{ - { - orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}, Path: "./path"}, - expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "storageid"}, Path: "./path"}, - }, - { - orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "./path"}, - expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "./path"}, - }, - { - orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "."}, - expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "opaqueid"}, Path: "."}, - }, - { - orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}, Path: "."}, - expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "storageid"}, Path: "."}, - }, - { - orig: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid"}}, - expected: &provider.Reference{ResourceId: &provider.ResourceId{StorageId: "storageid", OpaqueId: "storageid"}, Path: "."}, - }, - } - - for _, tt := range tests { - formatted, _ := FormatStorageSpaceReference(tt.orig) - parsed, err := ParseStorageSpaceReference(formatted) - if err != nil { - t.Errorf("failed to parse space reference: %s error: %s", formatted, err) - } - if !(ResourceIDEqual(parsed.ResourceId, tt.expected.ResourceId) && parsed.Path == tt.expected.Path) { - t.Errorf("Formatted then parsed references don't match the original got: %v expected %v", parsed, tt.expected) - } - } -} From 10b760fcb0c06b9d72e92b8131f35d5e37bc414c Mon Sep 17 00:00:00 2001 From: David Christofas Date: Wed, 4 May 2022 16:01:17 +0200 Subject: [PATCH 4/7] fix trash-bin propfind responses (#2821) * fix trash-bin propfind responses * fix root item href in trash-bin propfind responses --- changelog/unreleased/fix-trashbin-propfind.md | 6 ++++++ internal/http/services/owncloud/ocdav/trashbin.go | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/fix-trashbin-propfind.md diff --git a/changelog/unreleased/fix-trashbin-propfind.md b/changelog/unreleased/fix-trashbin-propfind.md new file mode 100644 index 00000000000..783e093df87 --- /dev/null +++ b/changelog/unreleased/fix-trashbin-propfind.md @@ -0,0 +1,6 @@ +Bugfix: Fix trash-bin propfind responses + +Fixed the href of the root element in trash-bin propfind responses. + +https://github.com/owncloud/ocis/issues/1846 +https://github.com/cs3org/reva/pull/2821 diff --git a/internal/http/services/owncloud/ocdav/trashbin.go b/internal/http/services/owncloud/ocdav/trashbin.go index 6042ebbdb0e..cb6ef53008c 100644 --- a/internal/http/services/owncloud/ocdav/trashbin.go +++ b/internal/http/services/owncloud/ocdav/trashbin.go @@ -191,7 +191,8 @@ func (h *TrashbinHandler) listTrashbin(w http.ResponseWriter, r *http.Request, s } if depth == net.DepthZero { - propRes, err := h.formatTrashPropfind(ctx, s, ref.ResourceId.StorageId, refBase, nil, nil) + rootHref := path.Join(refBase, key, itemPath) + propRes, err := h.formatTrashPropfind(ctx, s, ref.ResourceId.StorageId, refBase, rootHref, nil, nil) if err != nil { sublog.Error().Err(err).Msg("error formatting propfind") w.WriteHeader(http.StatusInternalServerError) @@ -275,7 +276,8 @@ func (h *TrashbinHandler) listTrashbin(w http.ResponseWriter, r *http.Request, s } } - propRes, err := h.formatTrashPropfind(ctx, s, ref.ResourceId.StorageId, refBase, &pf, items) + rootHref := path.Join(refBase, key, itemPath) + propRes, err := h.formatTrashPropfind(ctx, s, ref.ResourceId.StorageId, refBase, rootHref, &pf, items) if err != nil { sublog.Error().Err(err).Msg("error formatting propfind") w.WriteHeader(http.StatusInternalServerError) @@ -291,11 +293,11 @@ func (h *TrashbinHandler) listTrashbin(w http.ResponseWriter, r *http.Request, s } } -func (h *TrashbinHandler) formatTrashPropfind(ctx context.Context, s *svc, spaceID, refBase string, pf *propfind.XML, items []*provider.RecycleItem) ([]byte, error) { +func (h *TrashbinHandler) formatTrashPropfind(ctx context.Context, s *svc, spaceID, refBase, rootHref string, pf *propfind.XML, items []*provider.RecycleItem) ([]byte, error) { responses := make([]*propfind.ResponseXML, 0, len(items)+1) // add trashbin dir . entry responses = append(responses, &propfind.ResponseXML{ - Href: net.EncodePath(ctx.Value(net.CtxKeyBaseURI).(string) + "/"), // url encode response.Href TODO + Href: net.EncodePath(path.Join(ctx.Value(net.CtxKeyBaseURI).(string), rootHref) + "/"), // url encode response.Href TODO Propstat: []propfind.PropstatXML{ { Status: "HTTP/1.1 200 OK", From 7e57136be9e7273046c1d44b00100bc7a2d08ca0 Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 2 May 2022 15:38:38 +0200 Subject: [PATCH 5/7] bump version, prepare changelog --- CHANGELOG.md | 426 ++++++++++++++++ RELEASE_DATE | 2 +- VERSION | 2 +- .../app-editnew.md | 0 .../avoid-user-enumeration.md | 0 .../bump-cs3api.md | 0 .../capabilities-public.md | 0 .../centralize-space-id-functions.md | 0 .../cephfs-fix-base.md | 0 .../change-ocis-s3ng-fs-blob-layout.md | 0 .../change-public-link-hash.md | 0 .../chi-method-workaround.md | 0 .../enable-default-traces.md | 0 .../eos-fix-deny-grant.md | 0 .../eos-scope-devs.md | 0 .../eos-sys-acl-files.md | 0 .../events.md | 0 .../events2.md | 0 .../extend-events.md | 0 .../fake-providerids.md | 0 .../federated-accounts.md | 0 .../fix-ocmd-tutorial.md | 0 .../fix-space-shares.md | 0 .../fix-spaces-trashbin.md | 0 .../fix-trashbin-propfind.md | 0 .../honour-tracing-service-name.md | 0 .../http-tpc.md | 0 .../ldap-login-filter.md | 0 .../list-spaces-unrestricted.md | 0 .../mentix-prom-ext.md | 0 .../meta-path-for-user.md | 0 .../mimetypes-config.md | 0 .../nextcloud-ocm-share-manager.md | 0 .../oidc-fix.md | 0 .../preferences-refactor.md | 0 .../public-ids.md | 0 .../pull-transfer.md | 10 +- .../remove-base64-encoding-of-ids.md | 0 .../rename-oc10-share-manager-driver.md | 0 .../rfc3339-fix.md | 0 .../share-jail-cache.md | 0 .../single-file-edit.md | 0 .../siteacc-fix.md | 0 .../siteacc-site-settings.md | 0 .../siteacc-upd-2.md | 0 .../siteacc-upd.md | 0 .../spaces-feature-flags.md | 0 .../uniform-ocs-roles.md | 0 .../unify-oidc.md | 0 .../update-makefile.md | 0 .../user-provider-memory.md | 0 .../user-rest-refactor.md | 0 .../waitForNats.md | 0 changelog/NOTE.md | 466 ++++++++++++++---- .../content/en/docs/changelog/2.3.0/_index.md | 435 ++++++++++++++++ .../grpc/services/storageprovider/_index.md | 14 +- 56 files changed, 1235 insertions(+), 120 deletions(-) rename changelog/{unreleased => 2.3.0_2022-05-02}/app-editnew.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/avoid-user-enumeration.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/bump-cs3api.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/capabilities-public.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/centralize-space-id-functions.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/cephfs-fix-base.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/change-ocis-s3ng-fs-blob-layout.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/change-public-link-hash.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/chi-method-workaround.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/enable-default-traces.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/eos-fix-deny-grant.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/eos-scope-devs.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/eos-sys-acl-files.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/events.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/events2.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/extend-events.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/fake-providerids.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/federated-accounts.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/fix-ocmd-tutorial.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/fix-space-shares.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/fix-spaces-trashbin.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/fix-trashbin-propfind.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/honour-tracing-service-name.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/http-tpc.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/ldap-login-filter.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/list-spaces-unrestricted.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/mentix-prom-ext.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/meta-path-for-user.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/mimetypes-config.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/nextcloud-ocm-share-manager.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/oidc-fix.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/preferences-refactor.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/public-ids.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/pull-transfer.md (97%) rename changelog/{unreleased => 2.3.0_2022-05-02}/remove-base64-encoding-of-ids.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/rename-oc10-share-manager-driver.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/rfc3339-fix.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/share-jail-cache.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/single-file-edit.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/siteacc-fix.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/siteacc-site-settings.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/siteacc-upd-2.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/siteacc-upd.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/spaces-feature-flags.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/uniform-ocs-roles.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/unify-oidc.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/update-makefile.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/user-provider-memory.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/user-rest-refactor.md (100%) rename changelog/{unreleased => 2.3.0_2022-05-02}/waitForNats.md (100%) create mode 100644 docs/content/en/docs/changelog/2.3.0/_index.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b0f76ca617e..b4eeda6afca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,429 @@ +Changelog for reva 2.3.0 (2022-05-02) +======================================= + +The following sections list the changes in reva 2.3.0 relevant to +reva users. The changes are ordered by importance. + +Summary +------- + + * Fix #2693: Support editnew actions from MS Office + * Fix #2588: Dockerfile.revad-ceph to use the right base image + * Fix #2499: Removed check DenyGrant in resource permission + * Fix #2285: Accept new userid idp format + * Fix #2802: Fix the resource id handling for space shares + * Fix #2800: Fix spaceid parsing in spaces trashbin API + * Fix #2608: Respect the tracing_service_name config variable + * Fix #2742: Use exact match in login filter + * Fix #2759: Made uid, gid claims parsing more robust in OIDC auth provider + * Fix #2788: Return the correct file IDs on public link resources + * Fix #2322: Use RFC3339 for parsing dates + * Fix #2784: Disable storageprovider cache for the share jail + * Fix #2555: Fix site accounts endpoints + * Fix #2675: Updates Makefile according to latest go standards + * Fix #2572: Wait for nats server on middleware start + * Chg #2735: Avoid user enumeration + * Chg #2737: Bump go-cs3api + * Chg #2763: Change the oCIS and S3NG storage driver blob store layout + * Chg #2596: Remove hash from public link urls + * Chg #2785: Implement workaround for chi.RegisterMethod + * Chg #2559: Do not encode webDAV ids to base64 + * Chg #2740: Rename oc10 share manager driver + * Chg #2561: Merge oidcmapping auth manager into oidc + * Enh #2698: Make capabilities endpoint public, authenticate users is present + * Enh #2515: Enabling tracing by default if not explicitly disabled + * Enh #2686: Features for favorites xattrs in EOS, cache for scope expansion + * Enh #2494: Use sys ACLs for file permissions + * Enh #2522: Introduce events + * Enh #2811: Add event for created directories + * Enh #2798: Add additional fields to events to enable search + * Enh #2790: Fake providerids so API stays stable after beta + * Enh #2685: Enable federated account access + * Enh #1787: Add support for HTTP TPC + * Enh #2799: Add flag to enable unrestriced listing of spaces + * Enh #2560: Mentix PromSD extensions + * Enh #2741: Meta path for user + * Enh #2613: Externalize custom mime types configuration for storage providers + * Enh #2163: Nextcloud-based share manager for pkg/ocm/share + * Enh #2696: Preferences driver refactor and cbox sql implementation + * Enh #2052: New CS3API datatx methods + * Enh #2743: Add capability for public link single file edit + * Enh #2738: Site accounts site-global settings + * Enh #2672: Further Site Accounts improvements + * Enh #2549: Site accounts improvements + * Enh #2795: Add feature flags "projects" and "share_jail" to spaces capability + * Enh #2514: Reuse ocs role objects in other drivers + * Enh #2781: In memory user provider + * Enh #2752: Refactor the rest user and group provider drivers + +Details +------- + + * Bugfix #2693: Support editnew actions from MS Office + + This fixes the incorrect behavior when creating new xlsx and pptx files, as MS Office supports + the editnew action and it must be used for newly created files instead of the normal edit action. + + https://github.com/cs3org/reva/pull/2693 + + * Bugfix #2588: Dockerfile.revad-ceph to use the right base image + + In Aug2021 https://hub.docker.com/r/ceph/daemon-base was moved to quay.ceph.io and the + builds for this image were failing for some weeks after January. + + https://github.com/cs3org/reva/pull/2588 + + * Bugfix #2499: Removed check DenyGrant in resource permission + + When adding a denial permission + + https://github.com/cs3org/reva/pull/2499 + + * Bugfix #2285: Accept new userid idp format + + The format for userid idp [changed](https://github.com/cs3org/cs3apis/pull/159) and + this broke [the ocmd + tutorial](https://reva.link/docs/tutorials/share-tutorial/#5-1-4-create-the-share) + This PR makes the provider authorizer interceptor accept both the old and the new string + format. + + https://github.com/cs3org/reva/issues/2285 + https://github.com/cs3org/reva/issues/2285 + See + and + + * Bugfix #2802: Fix the resource id handling for space shares + + Adapt the space shares to the new id format. + + https://github.com/cs3org/reva/pull/2802 + + * Bugfix #2800: Fix spaceid parsing in spaces trashbin API + + Added proper space id parsing to the spaces trashbin API endpoint. + + https://github.com/cs3org/reva/pull/2800 + + * Bugfix #2608: Respect the tracing_service_name config variable + + https://github.com/cs3org/reva/pull/2608 + + * Bugfix #2742: Use exact match in login filter + + After the recent config changes the auth-provider was accidently using a substring match for + the login filter. It's no fixed to use an exact match. + + https://github.com/cs3org/reva/pull/2742 + + * Bugfix #2759: Made uid, gid claims parsing more robust in OIDC auth provider + + This fix makes sure the uid and gid claims are defined at init time, and that the necessary + typecasts are performed correctly when authenticating users. A comment was added that in case + the uid/gid claims are missing AND that no mapping takes place, a user entity is returned with + uid = gid = 0. + + https://github.com/cs3org/reva/pull/2759 + + * Bugfix #2788: Return the correct file IDs on public link resources + + Resources in public shares should return the real resourceids from the storage of the owner. + + https://github.com/cs3org/reva/pull/2788 + + * Bugfix #2322: Use RFC3339 for parsing dates + + We have used the RFC3339 format for parsing dates to be consistent with oC Web. + + https://github.com/cs3org/reva/issues/2322 + https://github.com/cs3org/reva/pull/2744 + + * Bugfix #2784: Disable storageprovider cache for the share jail + + The share jail should not be cached in the provider cache because it is a virtual collection of + resources from different storage providers. + + https://github.com/cs3org/reva/pull/2784 + + * Bugfix #2555: Fix site accounts endpoints + + This PR fixes small bugs in the site accounts endpoints. + + https://github.com/cs3org/reva/pull/2555 + + * Bugfix #2675: Updates Makefile according to latest go standards + + Earlier, we were using go get to install packages. Now, we are using go install to install + packages + + https://github.com/cs3org/reva/issues/2675 + https://github.com/cs3org/reva/pull/2747 + + * Bugfix #2572: Wait for nats server on middleware start + + Use a retry mechanism to connect to the nats server when it is not ready yet + + https://github.com/cs3org/reva/pull/2572 + + * Change #2735: Avoid user enumeration + + Sending PROPFIND requests to `../files/admin` did return a different response than sending + the same request to `../files/notexists`. This allowed enumerating users. This response was + changed to be the same always + + https://github.com/cs3org/reva/pull/2735 + + * Change #2737: Bump go-cs3api + + Bumped version of the go-cs3api + + https://github.com/cs3org/reva/pull/2737 + + * Change #2763: Change the oCIS and S3NG storage driver blob store layout + + We've optimized the oCIS and S3NG storage driver blob store layout. + + For the oCIS storage driver, blobs will now be stored inside the folder of a space, next to the + nodes. This allows admins to easily archive, backup and restore spaces as a whole with UNIX + tooling. We also moved from a single folder for blobs to multiple folders for blobs, to make the + filesystem interactions more performant for large numbers of files. + + The previous layout on disk looked like this: + + ```markdown |-- spaces | |-- .. | | |-- .. | |-- xx | |-- xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- + partitioned space id | |-- nodes | |-- .. | |-- xx | |-- xx | |-- xx | |-- xx | |-- + -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned node id |-- blobs |-- .. |-- + xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- blob id ``` + + Now it looks like this: + + ```markdown |-- spaces | |-- .. | | |-- .. |-- xx |-- xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- + partitioned space id |-- nodes | |-- .. | |-- xx | |-- xx | |-- xx | |-- xx | |-- + -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned node id |-- blobs |-- .. |-- xx |-- xx |-- xx |-- xx + |-- -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned blob id ``` + + For the S3NG storage driver, blobs will now be prefixed with the space id and also a part of the + blob id will be used as prefix. This creates a better prefix partitioning and mitigates S3 api + performance drops for large buckets + (https://aws.amazon.com/de/premiumsupport/knowledge-center/s3-prefix-nested-folders-difference/). + + The previous S3 bucket (blobs only looked like this): + + ```markdown |-- .. |-- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- blob id ``` + + Now it looks like this: + + ```markdown |-- .. |-- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- space id |-- .. |-- xx |-- xx + |-- xx |-- xx |-- -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned blob id ``` + + https://github.com/owncloud/ocis/issues/3557 + https://github.com/cs3org/reva/pull/2763 + + * Change #2596: Remove hash from public link urls + + Public link urls do not contain the hash anymore, this is needed to support the ocis and web + history mode. + + https://github.com/cs3org/reva/pull/2596 + https://github.com/owncloud/ocis/pull/3109 + https://github.com/owncloud/web/pull/6363 + + * Change #2785: Implement workaround for chi.RegisterMethod + + Implemented a workaround for `chi.RegisterMethod` because of a concurrent map read write + issue. This needs to be fixed upstream in go-chi. + + https://github.com/cs3org/reva/pull/2785 + + * Change #2559: Do not encode webDAV ids to base64 + + We removed the base64 encoding of the IDs and use the format ! with a `!` + delimiter. As a reserved delimiter it is URL safe. The IDs will be XML and JSON encoded as + necessary. + + https://github.com/cs3org/reva/pull/2559 + + * Change #2740: Rename oc10 share manager driver + + We aligned the oc10 SQL share manager driver name with all other owncloud spacific SQL drivers + by renaming the package `pkg/share/manager/sql` to `pkg/share/manager/owncloudsql` and + changing the name from `oc10-sql` to `owncloudsql`. + + https://github.com/cs3org/reva/pull/2740 + + * Change #2561: Merge oidcmapping auth manager into oidc + + The oidcmapping auth manager was created as a separate package to ease testing. As it has now + been tested also as a pure OIDC auth provider without mapping, and as the code is largely + refactored, it makes sense to merge it back so to maintain a single OIDC manager. + + https://github.com/cs3org/reva/pull/2561 + + * Enhancement #2698: Make capabilities endpoint public, authenticate users is present + + https://github.com/cs3org/reva/pull/2698 + + * Enhancement #2515: Enabling tracing by default if not explicitly disabled + + https://github.com/cs3org/reva/pull/2515 + + * Enhancement #2686: Features for favorites xattrs in EOS, cache for scope expansion + + https://github.com/cs3org/reva/pull/2686 + + * Enhancement #2494: Use sys ACLs for file permissions + + https://github.com/cs3org/reva/pull/2494 + + * Enhancement #2522: Introduce events + + This will introduce events into the system. Events are a simple way to bring information from + one service to another. Read `pkg/events/example` and subfolders for more information + + https://github.com/cs3org/reva/pull/2522 + + * Enhancement #2811: Add event for created directories + + We added another event for created directories. + + https://github.com/cs3org/reva/pull/2811 + + * Enhancement #2798: Add additional fields to events to enable search + + https://github.com/cs3org/reva/pull/2798 + + * Enhancement #2790: Fake providerids so API stays stable after beta + + To support the stativ registry, we need to accept providerids This fakes the ids so the API can + stay stable + + https://github.com/cs3org/reva/pull/2790 + + * Enhancement #2685: Enable federated account access + + https://github.com/cs3org/reva/pull/2685 + + * Enhancement #1787: Add support for HTTP TPC + + We have added support for HTTP Third Party Copy. This allows remote data transfers between + storages managed by either two different reva servers, or a reva server and a Grid + (WLCG/ESCAPE) site server. + + Such remote transfers are expected to be driven by + [GFAL](https://cern.ch/dmc-docs/gfal2/gfal2.html), the underlying library used by + [FTS](https://cern.ch/fts), and [Rucio](https://rucio.cern.ch). + + In addition, the oidcmapping package has been refactored to support the standard OIDC use + cases as well when no mapping is defined. + + https://github.com/cs3org/reva/issues/1787 + https://github.com/cs3org/reva/pull/2007 + + * Enhancement #2799: Add flag to enable unrestriced listing of spaces + + Listing spaces now only returns all spaces when the user has the permissions and it was + explicitly requested. The default will only return the spaces the current user has access to. + + https://github.com/cs3org/reva/pull/2799 + + * Enhancement #2560: Mentix PromSD extensions + + The Mentix Prometheus SD scrape targets are now split into one file per service type, making + health checks configuration easier. Furthermore, the local file connector for mesh data and + the site registration endpoint have been dropped, as they aren't needed anymore. + + https://github.com/cs3org/reva/pull/2560 + + * Enhancement #2741: Meta path for user + + We've added support for requesting the `meta-path-for-user` via a propfind to the + `dav/meta/` endpoint. + + https://github.com/cs3org/reva/pull/2741 + https://github.com/cs3org/reva/pull/2793 + https://doc.owncloud.com/server/next/developer_manual/webdav_api/meta.html + + * Enhancement #2613: Externalize custom mime types configuration for storage providers + + Added ability to configure custom mime types in an external JSON file, such that it can be reused + when many storage providers are deployed at the same time. + + https://github.com/cs3org/reva/pull/2613 + + * Enhancement #2163: Nextcloud-based share manager for pkg/ocm/share + + Note that pkg/ocm/share is very similar to pkg/share, but it deals with cs3/sharing/ocm + whereas pkg/share deals with cs3/sharing/collaboration + + https://github.com/cs3org/reva/pull/2163 + + * Enhancement #2696: Preferences driver refactor and cbox sql implementation + + This PR uses the updated CS3APIs which accepts a namespace in addition to a single string key to + recognize a user preference. It also refactors the GRPC service to support multiple drivers + and adds the cbox SQL implementation. + + https://github.com/cs3org/reva/pull/2696 + + * Enhancement #2052: New CS3API datatx methods + + CS3 datatx pull model methods: PullTransfer, RetryTransfer, ListTransfers Method + CreateTransfer removed. + + https://github.com/cs3org/reva/pull/2052 + + * Enhancement #2743: Add capability for public link single file edit + + It is now possible to share a single file by link with edit permissions. Therefore we need a + public share capability to enable that feature in the clients. At the same time we improved the + WebDAV permissions for public links. + + https://github.com/cs3org/reva/pull/2743 + + * Enhancement #2738: Site accounts site-global settings + + This PR extends the site accounts service by adding site-global settings. These are used to + store test user credentials that are in return used by our BBE port to perform CS3API-specific + health checks. + + https://github.com/cs3org/reva/pull/2738 + + * Enhancement #2672: Further Site Accounts improvements + + Yet another PR to update the site accounts (and Mentix): New default site ID; Include service + type in alerts; Naming unified; Remove obsolete stuff. + + https://github.com/cs3org/reva/pull/2672 + + * Enhancement #2549: Site accounts improvements + + This PR improves the site accounts: - Removed/hid API key stuff - Added quick links to the main + panel - Made alert notifications mandatory + + https://github.com/cs3org/reva/pull/2549 + + * Enhancement #2795: Add feature flags "projects" and "share_jail" to spaces capability + + https://github.com/cs3org/reva/pull/2795 + + * Enhancement #2514: Reuse ocs role objects in other drivers + + https://github.com/cs3org/reva/pull/2514 + + * Enhancement #2781: In memory user provider + + We added an in memory implementation for the user provider that reads the users from the + mapstructure passed in. + + https://github.com/cs3org/reva/pull/2781 + + * Enhancement #2752: Refactor the rest user and group provider drivers + + We now maintain our own cache for all user and group data, and periodically refresh it. A redis + server now becomes a necessary dependency, whereas it was optional previously. + + https://github.com/cs3org/reva/pull/2752 + + Changelog for reva 2.2.0 (2022-04-12) ======================================= diff --git a/RELEASE_DATE b/RELEASE_DATE index 51a3e801385..e89ecd7ef93 100644 --- a/RELEASE_DATE +++ b/RELEASE_DATE @@ -1 +1 @@ -2022-04-12 +2022-05-04 \ No newline at end of file diff --git a/VERSION b/VERSION index ccbccc3dc62..cc6612c36e0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.0 +2.3.0 \ No newline at end of file diff --git a/changelog/unreleased/app-editnew.md b/changelog/2.3.0_2022-05-02/app-editnew.md similarity index 100% rename from changelog/unreleased/app-editnew.md rename to changelog/2.3.0_2022-05-02/app-editnew.md diff --git a/changelog/unreleased/avoid-user-enumeration.md b/changelog/2.3.0_2022-05-02/avoid-user-enumeration.md similarity index 100% rename from changelog/unreleased/avoid-user-enumeration.md rename to changelog/2.3.0_2022-05-02/avoid-user-enumeration.md diff --git a/changelog/unreleased/bump-cs3api.md b/changelog/2.3.0_2022-05-02/bump-cs3api.md similarity index 100% rename from changelog/unreleased/bump-cs3api.md rename to changelog/2.3.0_2022-05-02/bump-cs3api.md diff --git a/changelog/unreleased/capabilities-public.md b/changelog/2.3.0_2022-05-02/capabilities-public.md similarity index 100% rename from changelog/unreleased/capabilities-public.md rename to changelog/2.3.0_2022-05-02/capabilities-public.md diff --git a/changelog/unreleased/centralize-space-id-functions.md b/changelog/2.3.0_2022-05-02/centralize-space-id-functions.md similarity index 100% rename from changelog/unreleased/centralize-space-id-functions.md rename to changelog/2.3.0_2022-05-02/centralize-space-id-functions.md diff --git a/changelog/unreleased/cephfs-fix-base.md b/changelog/2.3.0_2022-05-02/cephfs-fix-base.md similarity index 100% rename from changelog/unreleased/cephfs-fix-base.md rename to changelog/2.3.0_2022-05-02/cephfs-fix-base.md diff --git a/changelog/unreleased/change-ocis-s3ng-fs-blob-layout.md b/changelog/2.3.0_2022-05-02/change-ocis-s3ng-fs-blob-layout.md similarity index 100% rename from changelog/unreleased/change-ocis-s3ng-fs-blob-layout.md rename to changelog/2.3.0_2022-05-02/change-ocis-s3ng-fs-blob-layout.md diff --git a/changelog/unreleased/change-public-link-hash.md b/changelog/2.3.0_2022-05-02/change-public-link-hash.md similarity index 100% rename from changelog/unreleased/change-public-link-hash.md rename to changelog/2.3.0_2022-05-02/change-public-link-hash.md diff --git a/changelog/unreleased/chi-method-workaround.md b/changelog/2.3.0_2022-05-02/chi-method-workaround.md similarity index 100% rename from changelog/unreleased/chi-method-workaround.md rename to changelog/2.3.0_2022-05-02/chi-method-workaround.md diff --git a/changelog/unreleased/enable-default-traces.md b/changelog/2.3.0_2022-05-02/enable-default-traces.md similarity index 100% rename from changelog/unreleased/enable-default-traces.md rename to changelog/2.3.0_2022-05-02/enable-default-traces.md diff --git a/changelog/unreleased/eos-fix-deny-grant.md b/changelog/2.3.0_2022-05-02/eos-fix-deny-grant.md similarity index 100% rename from changelog/unreleased/eos-fix-deny-grant.md rename to changelog/2.3.0_2022-05-02/eos-fix-deny-grant.md diff --git a/changelog/unreleased/eos-scope-devs.md b/changelog/2.3.0_2022-05-02/eos-scope-devs.md similarity index 100% rename from changelog/unreleased/eos-scope-devs.md rename to changelog/2.3.0_2022-05-02/eos-scope-devs.md diff --git a/changelog/unreleased/eos-sys-acl-files.md b/changelog/2.3.0_2022-05-02/eos-sys-acl-files.md similarity index 100% rename from changelog/unreleased/eos-sys-acl-files.md rename to changelog/2.3.0_2022-05-02/eos-sys-acl-files.md diff --git a/changelog/unreleased/events.md b/changelog/2.3.0_2022-05-02/events.md similarity index 100% rename from changelog/unreleased/events.md rename to changelog/2.3.0_2022-05-02/events.md diff --git a/changelog/unreleased/events2.md b/changelog/2.3.0_2022-05-02/events2.md similarity index 100% rename from changelog/unreleased/events2.md rename to changelog/2.3.0_2022-05-02/events2.md diff --git a/changelog/unreleased/extend-events.md b/changelog/2.3.0_2022-05-02/extend-events.md similarity index 100% rename from changelog/unreleased/extend-events.md rename to changelog/2.3.0_2022-05-02/extend-events.md diff --git a/changelog/unreleased/fake-providerids.md b/changelog/2.3.0_2022-05-02/fake-providerids.md similarity index 100% rename from changelog/unreleased/fake-providerids.md rename to changelog/2.3.0_2022-05-02/fake-providerids.md diff --git a/changelog/unreleased/federated-accounts.md b/changelog/2.3.0_2022-05-02/federated-accounts.md similarity index 100% rename from changelog/unreleased/federated-accounts.md rename to changelog/2.3.0_2022-05-02/federated-accounts.md diff --git a/changelog/unreleased/fix-ocmd-tutorial.md b/changelog/2.3.0_2022-05-02/fix-ocmd-tutorial.md similarity index 100% rename from changelog/unreleased/fix-ocmd-tutorial.md rename to changelog/2.3.0_2022-05-02/fix-ocmd-tutorial.md diff --git a/changelog/unreleased/fix-space-shares.md b/changelog/2.3.0_2022-05-02/fix-space-shares.md similarity index 100% rename from changelog/unreleased/fix-space-shares.md rename to changelog/2.3.0_2022-05-02/fix-space-shares.md diff --git a/changelog/unreleased/fix-spaces-trashbin.md b/changelog/2.3.0_2022-05-02/fix-spaces-trashbin.md similarity index 100% rename from changelog/unreleased/fix-spaces-trashbin.md rename to changelog/2.3.0_2022-05-02/fix-spaces-trashbin.md diff --git a/changelog/unreleased/fix-trashbin-propfind.md b/changelog/2.3.0_2022-05-02/fix-trashbin-propfind.md similarity index 100% rename from changelog/unreleased/fix-trashbin-propfind.md rename to changelog/2.3.0_2022-05-02/fix-trashbin-propfind.md diff --git a/changelog/unreleased/honour-tracing-service-name.md b/changelog/2.3.0_2022-05-02/honour-tracing-service-name.md similarity index 100% rename from changelog/unreleased/honour-tracing-service-name.md rename to changelog/2.3.0_2022-05-02/honour-tracing-service-name.md diff --git a/changelog/unreleased/http-tpc.md b/changelog/2.3.0_2022-05-02/http-tpc.md similarity index 100% rename from changelog/unreleased/http-tpc.md rename to changelog/2.3.0_2022-05-02/http-tpc.md diff --git a/changelog/unreleased/ldap-login-filter.md b/changelog/2.3.0_2022-05-02/ldap-login-filter.md similarity index 100% rename from changelog/unreleased/ldap-login-filter.md rename to changelog/2.3.0_2022-05-02/ldap-login-filter.md diff --git a/changelog/unreleased/list-spaces-unrestricted.md b/changelog/2.3.0_2022-05-02/list-spaces-unrestricted.md similarity index 100% rename from changelog/unreleased/list-spaces-unrestricted.md rename to changelog/2.3.0_2022-05-02/list-spaces-unrestricted.md diff --git a/changelog/unreleased/mentix-prom-ext.md b/changelog/2.3.0_2022-05-02/mentix-prom-ext.md similarity index 100% rename from changelog/unreleased/mentix-prom-ext.md rename to changelog/2.3.0_2022-05-02/mentix-prom-ext.md diff --git a/changelog/unreleased/meta-path-for-user.md b/changelog/2.3.0_2022-05-02/meta-path-for-user.md similarity index 100% rename from changelog/unreleased/meta-path-for-user.md rename to changelog/2.3.0_2022-05-02/meta-path-for-user.md diff --git a/changelog/unreleased/mimetypes-config.md b/changelog/2.3.0_2022-05-02/mimetypes-config.md similarity index 100% rename from changelog/unreleased/mimetypes-config.md rename to changelog/2.3.0_2022-05-02/mimetypes-config.md diff --git a/changelog/unreleased/nextcloud-ocm-share-manager.md b/changelog/2.3.0_2022-05-02/nextcloud-ocm-share-manager.md similarity index 100% rename from changelog/unreleased/nextcloud-ocm-share-manager.md rename to changelog/2.3.0_2022-05-02/nextcloud-ocm-share-manager.md diff --git a/changelog/unreleased/oidc-fix.md b/changelog/2.3.0_2022-05-02/oidc-fix.md similarity index 100% rename from changelog/unreleased/oidc-fix.md rename to changelog/2.3.0_2022-05-02/oidc-fix.md diff --git a/changelog/unreleased/preferences-refactor.md b/changelog/2.3.0_2022-05-02/preferences-refactor.md similarity index 100% rename from changelog/unreleased/preferences-refactor.md rename to changelog/2.3.0_2022-05-02/preferences-refactor.md diff --git a/changelog/unreleased/public-ids.md b/changelog/2.3.0_2022-05-02/public-ids.md similarity index 100% rename from changelog/unreleased/public-ids.md rename to changelog/2.3.0_2022-05-02/public-ids.md diff --git a/changelog/unreleased/pull-transfer.md b/changelog/2.3.0_2022-05-02/pull-transfer.md similarity index 97% rename from changelog/unreleased/pull-transfer.md rename to changelog/2.3.0_2022-05-02/pull-transfer.md index 276609dd631..3a1ae9a6fad 100644 --- a/changelog/unreleased/pull-transfer.md +++ b/changelog/2.3.0_2022-05-02/pull-transfer.md @@ -1,6 +1,6 @@ -Enhancement: New CS3API datatx methods - -CS3 datatx pull model methods: PullTransfer, RetryTransfer, ListTransfers -Method CreateTransfer removed. - +Enhancement: New CS3API datatx methods + +CS3 datatx pull model methods: PullTransfer, RetryTransfer, ListTransfers +Method CreateTransfer removed. + https://github.com/cs3org/reva/pull/2052 \ No newline at end of file diff --git a/changelog/unreleased/remove-base64-encoding-of-ids.md b/changelog/2.3.0_2022-05-02/remove-base64-encoding-of-ids.md similarity index 100% rename from changelog/unreleased/remove-base64-encoding-of-ids.md rename to changelog/2.3.0_2022-05-02/remove-base64-encoding-of-ids.md diff --git a/changelog/unreleased/rename-oc10-share-manager-driver.md b/changelog/2.3.0_2022-05-02/rename-oc10-share-manager-driver.md similarity index 100% rename from changelog/unreleased/rename-oc10-share-manager-driver.md rename to changelog/2.3.0_2022-05-02/rename-oc10-share-manager-driver.md diff --git a/changelog/unreleased/rfc3339-fix.md b/changelog/2.3.0_2022-05-02/rfc3339-fix.md similarity index 100% rename from changelog/unreleased/rfc3339-fix.md rename to changelog/2.3.0_2022-05-02/rfc3339-fix.md diff --git a/changelog/unreleased/share-jail-cache.md b/changelog/2.3.0_2022-05-02/share-jail-cache.md similarity index 100% rename from changelog/unreleased/share-jail-cache.md rename to changelog/2.3.0_2022-05-02/share-jail-cache.md diff --git a/changelog/unreleased/single-file-edit.md b/changelog/2.3.0_2022-05-02/single-file-edit.md similarity index 100% rename from changelog/unreleased/single-file-edit.md rename to changelog/2.3.0_2022-05-02/single-file-edit.md diff --git a/changelog/unreleased/siteacc-fix.md b/changelog/2.3.0_2022-05-02/siteacc-fix.md similarity index 100% rename from changelog/unreleased/siteacc-fix.md rename to changelog/2.3.0_2022-05-02/siteacc-fix.md diff --git a/changelog/unreleased/siteacc-site-settings.md b/changelog/2.3.0_2022-05-02/siteacc-site-settings.md similarity index 100% rename from changelog/unreleased/siteacc-site-settings.md rename to changelog/2.3.0_2022-05-02/siteacc-site-settings.md diff --git a/changelog/unreleased/siteacc-upd-2.md b/changelog/2.3.0_2022-05-02/siteacc-upd-2.md similarity index 100% rename from changelog/unreleased/siteacc-upd-2.md rename to changelog/2.3.0_2022-05-02/siteacc-upd-2.md diff --git a/changelog/unreleased/siteacc-upd.md b/changelog/2.3.0_2022-05-02/siteacc-upd.md similarity index 100% rename from changelog/unreleased/siteacc-upd.md rename to changelog/2.3.0_2022-05-02/siteacc-upd.md diff --git a/changelog/unreleased/spaces-feature-flags.md b/changelog/2.3.0_2022-05-02/spaces-feature-flags.md similarity index 100% rename from changelog/unreleased/spaces-feature-flags.md rename to changelog/2.3.0_2022-05-02/spaces-feature-flags.md diff --git a/changelog/unreleased/uniform-ocs-roles.md b/changelog/2.3.0_2022-05-02/uniform-ocs-roles.md similarity index 100% rename from changelog/unreleased/uniform-ocs-roles.md rename to changelog/2.3.0_2022-05-02/uniform-ocs-roles.md diff --git a/changelog/unreleased/unify-oidc.md b/changelog/2.3.0_2022-05-02/unify-oidc.md similarity index 100% rename from changelog/unreleased/unify-oidc.md rename to changelog/2.3.0_2022-05-02/unify-oidc.md diff --git a/changelog/unreleased/update-makefile.md b/changelog/2.3.0_2022-05-02/update-makefile.md similarity index 100% rename from changelog/unreleased/update-makefile.md rename to changelog/2.3.0_2022-05-02/update-makefile.md diff --git a/changelog/unreleased/user-provider-memory.md b/changelog/2.3.0_2022-05-02/user-provider-memory.md similarity index 100% rename from changelog/unreleased/user-provider-memory.md rename to changelog/2.3.0_2022-05-02/user-provider-memory.md diff --git a/changelog/unreleased/user-rest-refactor.md b/changelog/2.3.0_2022-05-02/user-rest-refactor.md similarity index 100% rename from changelog/unreleased/user-rest-refactor.md rename to changelog/2.3.0_2022-05-02/user-rest-refactor.md diff --git a/changelog/unreleased/waitForNats.md b/changelog/2.3.0_2022-05-02/waitForNats.md similarity index 100% rename from changelog/unreleased/waitForNats.md rename to changelog/2.3.0_2022-05-02/waitForNats.md diff --git a/changelog/NOTE.md b/changelog/NOTE.md index 5c275010ff1..ab8fea127fe 100644 --- a/changelog/NOTE.md +++ b/changelog/NOTE.md @@ -1,172 +1,426 @@ -Changelog for reva 2.2.0 (2022-04-12) +Changelog for reva 2.3.0 (2022-05-02) ======================================= -The following sections list the changes in reva 2.2.0 relevant to +The following sections list the changes in reva 2.3.0 relevant to reva users. The changes are ordered by importance. Summary ------- - * Fix #3373: Fix the permissions attribute in propfind responses - * Fix #2721: Fix locking and public link scope checker to make the WOPI server work - * Fix #2668: Minor cleanup - * Fix #2692: Ensure that the host in the ocs config endpoint has no protocol - * Fix #2709: Decomposed FS: return precondition failed if already locked - * Chg #2687: Allow link with no or edit permission - * Chg #2658: Small clean up of the ocdav code - * Enh #2691: Decomposed FS: return a reference to the parent - * Enh #2708: Rework LDAP configuration of user and group providers - * Enh #2665: Add embeddable ocdav go micro service - * Enh #2715: Introduced quicklinks - * Enh #3370: Enable all spaces members to list public shares - * Enh #3370: Enable space members to list shares inside the space - * Enh #2717: Add definitions for user and group events + * Fix #2693: Support editnew actions from MS Office + * Fix #2588: Dockerfile.revad-ceph to use the right base image + * Fix #2499: Removed check DenyGrant in resource permission + * Fix #2285: Accept new userid idp format + * Fix #2802: Fix the resource id handling for space shares + * Fix #2800: Fix spaceid parsing in spaces trashbin API + * Fix #2608: Respect the tracing_service_name config variable + * Fix #2742: Use exact match in login filter + * Fix #2759: Made uid, gid claims parsing more robust in OIDC auth provider + * Fix #2788: Return the correct file IDs on public link resources + * Fix #2322: Use RFC3339 for parsing dates + * Fix #2784: Disable storageprovider cache for the share jail + * Fix #2555: Fix site accounts endpoints + * Fix #2675: Updates Makefile according to latest go standards + * Fix #2572: Wait for nats server on middleware start + * Chg #2735: Avoid user enumeration + * Chg #2737: Bump go-cs3api + * Chg #2763: Change the oCIS and S3NG storage driver blob store layout + * Chg #2596: Remove hash from public link urls + * Chg #2785: Implement workaround for chi.RegisterMethod + * Chg #2559: Do not encode webDAV ids to base64 + * Chg #2740: Rename oc10 share manager driver + * Chg #2561: Merge oidcmapping auth manager into oidc + * Enh #2698: Make capabilities endpoint public, authenticate users is present + * Enh #2515: Enabling tracing by default if not explicitly disabled + * Enh #2686: Features for favorites xattrs in EOS, cache for scope expansion + * Enh #2494: Use sys ACLs for file permissions + * Enh #2522: Introduce events + * Enh #2811: Add event for created directories + * Enh #2798: Add additional fields to events to enable search + * Enh #2790: Fake providerids so API stays stable after beta + * Enh #2685: Enable federated account access + * Enh #1787: Add support for HTTP TPC + * Enh #2799: Add flag to enable unrestriced listing of spaces + * Enh #2560: Mentix PromSD extensions + * Enh #2741: Meta path for user + * Enh #2613: Externalize custom mime types configuration for storage providers + * Enh #2163: Nextcloud-based share manager for pkg/ocm/share + * Enh #2696: Preferences driver refactor and cbox sql implementation + * Enh #2052: New CS3API datatx methods + * Enh #2743: Add capability for public link single file edit + * Enh #2738: Site accounts site-global settings + * Enh #2672: Further Site Accounts improvements + * Enh #2549: Site accounts improvements + * Enh #2795: Add feature flags "projects" and "share_jail" to spaces capability + * Enh #2514: Reuse ocs role objects in other drivers + * Enh #2781: In memory user provider + * Enh #2752: Refactor the rest user and group provider drivers Details ------- - * Bugfix #3373: Fix the permissions attribute in propfind responses + * Bugfix #2693: Support editnew actions from MS Office - Fixed the permissions that are returned when doing a propfind on a project space. + This fixes the incorrect behavior when creating new xlsx and pptx files, as MS Office supports + the editnew action and it must be used for newly created files instead of the normal edit action. - https://github.com/owncloud/ocis/issues/3373 - https://github.com/cs3org/reva/pull/2713 + https://github.com/cs3org/reva/pull/2693 - * Bugfix #2721: Fix locking and public link scope checker to make the WOPI server work + * Bugfix #2588: Dockerfile.revad-ceph to use the right base image - We've fixed the locking implementation to use the CS3api instead of the temporary opaque - values. We've fixed the scope checker on public links to allow the OpenInApp actions. + In Aug2021 https://hub.docker.com/r/ceph/daemon-base was moved to quay.ceph.io and the + builds for this image were failing for some weeks after January. - These fixes have been done to use the cs3org/wopiserver with REVA edge. + https://github.com/cs3org/reva/pull/2588 - https://github.com/cs3org/reva/pull/2721 + * Bugfix #2499: Removed check DenyGrant in resource permission - * Bugfix #2668: Minor cleanup + When adding a denial permission - - The `chunk_folder` config option is unused - Prevent a panic when looking up spaces + https://github.com/cs3org/reva/pull/2499 - https://github.com/cs3org/reva/pull/2668 + * Bugfix #2285: Accept new userid idp format - * Bugfix #2692: Ensure that the host in the ocs config endpoint has no protocol + The format for userid idp [changed](https://github.com/cs3org/cs3apis/pull/159) and + this broke [the ocmd + tutorial](https://reva.link/docs/tutorials/share-tutorial/#5-1-4-create-the-share) + This PR makes the provider authorizer interceptor accept both the old and the new string + format. - We've fixed the host info in the ocs config endpoint so that it has no protocol, as ownCloud 10 - doesn't have it. + https://github.com/cs3org/reva/issues/2285 + https://github.com/cs3org/reva/issues/2285 + See + and - https://github.com/cs3org/reva/pull/2692 - https://github.com/owncloud/ocis/pull/3113 + * Bugfix #2802: Fix the resource id handling for space shares - * Bugfix #2709: Decomposed FS: return precondition failed if already locked + Adapt the space shares to the new id format. - We've fixed the return code from permission denied to precondition failed if a user tries to - lock an already locked file. + https://github.com/cs3org/reva/pull/2802 - https://github.com/cs3org/reva/pull/2709 + * Bugfix #2800: Fix spaceid parsing in spaces trashbin API - * Change #2687: Allow link with no or edit permission + Added proper space id parsing to the spaces trashbin API endpoint. - Allow the creation of links with no permissions. These can be used to navigate to a file that a - user has access to. Allow setting edit permission on single file links (create and delete are - still blocked) Introduce endpoint to get information about a given token + https://github.com/cs3org/reva/pull/2800 - https://github.com/cs3org/reva/pull/2687 + * Bugfix #2608: Respect the tracing_service_name config variable - * Change #2658: Small clean up of the ocdav code + https://github.com/cs3org/reva/pull/2608 - Cleaned up the ocdav code to make it more readable and in one case a bit faster. + * Bugfix #2742: Use exact match in login filter - https://github.com/cs3org/reva/pull/2658 + After the recent config changes the auth-provider was accidently using a substring match for + the login filter. It's no fixed to use an exact match. - * Enhancement #2691: Decomposed FS: return a reference to the parent + https://github.com/cs3org/reva/pull/2742 - We've implemented the changes from cs3org/cs3apis#167 in the DecomposedFS, so that a stat on a - resource always includes a reference to the parent of the resource. + * Bugfix #2759: Made uid, gid claims parsing more robust in OIDC auth provider - https://github.com/cs3org/reva/pull/2691 + This fix makes sure the uid and gid claims are defined at init time, and that the necessary + typecasts are performed correctly when authenticating users. A comment was added that in case + the uid/gid claims are missing AND that no mapping takes place, a user entity is returned with + uid = gid = 0. - * Enhancement #2708: Rework LDAP configuration of user and group providers + https://github.com/cs3org/reva/pull/2759 - We reworked to LDAP configuration of the LDAP user and group provider to share a common - configuration scheme. Additionally the LDAP configuration no longer relies on templating - LDAP filters in the configuration which is error prone and can be confusing. Additionally the - providers are now somewhat more flexible about the group membership schema. Instead of only - supporting RFC2307 (posixGroup) style groups. It's now possible to also use standard LDAP - groups (groupOfName/groupOfUniqueNames) which track group membership by DN instead of - username (the behaviour is switched automatically depending on the group_objectclass - setting). + * Bugfix #2788: Return the correct file IDs on public link resources - The new LDAP configuration basically looks this: + Resources in public shares should return the real resourceids from the storage of the owner. - ```ini [grpc.services.userprovider.drivers.ldap] uri="ldaps://localhost:636" - insecure=true user_base_dn="ou=testusers,dc=owncloud,dc=com" - group_base_dn="ou=testgroups,dc=owncloud,dc=com" user_filter="" - user_objectclass="posixAccount" group_filter="" group_objectclass="posixGroup" - bind_username="cn=admin,dc=owncloud,dc=com" bind_password="admin" - idp="http://localhost:20080" + https://github.com/cs3org/reva/pull/2788 - [grpc.services.userprovider.drivers.ldap.user_schema] id="entryuuid" - displayName="displayName" userName="cn" + * Bugfix #2322: Use RFC3339 for parsing dates - [grpc.services.userprovider.drivers.ldap.group_schema] id="entryuuid" - displayName="cn" groupName="cn" member="memberUID" ``` + We have used the RFC3339 format for parsing dates to be consistent with oC Web. - `uri` defines the LDAP URI of the destination Server + https://github.com/cs3org/reva/issues/2322 + https://github.com/cs3org/reva/pull/2744 - `insecure` allows to disable TLS Certifictate Validation (for development setups) + * Bugfix #2784: Disable storageprovider cache for the share jail - `user_base_dn`/`group_base_dn` define the search bases for users and groups + The share jail should not be cached in the provider cache because it is a virtual collection of + resources from different storage providers. - `user_filter`/`group_filter` allow to define additional LDAP filter of users and groups. - This could be e.g. `(objectclass=owncloud)` to match for an additional objectclass. + https://github.com/cs3org/reva/pull/2784 - `user_objectclass`/`group_objectclass` define the main objectclass of Users and Groups. - These are used to construct the LDAP filters + * Bugfix #2555: Fix site accounts endpoints - `bind_username`/`bind_password` contain the authentication information for the LDAP - connections + This PR fixes small bugs in the site accounts endpoints. - The `user_schema` and `group_schema` sections define the mapping from CS3 user/group - attributes to LDAP Attributes + https://github.com/cs3org/reva/pull/2555 - https://github.com/cs3org/reva/issues/2122 - https://github.com/cs3org/reva/issues/2124 - https://github.com/cs3org/reva/pull/2708 + * Bugfix #2675: Updates Makefile according to latest go standards - * Enhancement #2665: Add embeddable ocdav go micro service + Earlier, we were using go get to install packages. Now, we are using go install to install + packages - The new `pkg/micro/ocdav` package implements a go micro compatible version of the ocdav - service. + https://github.com/cs3org/reva/issues/2675 + https://github.com/cs3org/reva/pull/2747 - https://github.com/cs3org/reva/pull/2665 + * Bugfix #2572: Wait for nats server on middleware start - * Enhancement #2715: Introduced quicklinks + Use a retry mechanism to connect to the nats server when it is not ready yet - We now support Quicklinks. When creating a link with flag "quicklink=true", no new link will be - created when a link already exists. + https://github.com/cs3org/reva/pull/2572 - https://github.com/cs3org/reva/pull/2715 + * Change #2735: Avoid user enumeration - * Enhancement #3370: Enable all spaces members to list public shares + Sending PROPFIND requests to `../files/admin` did return a different response than sending + the same request to `../files/notexists`. This allowed enumerating users. This response was + changed to be the same always - Enhanced the json and cs3 public share manager so that it lists shares in spaces for all members. + https://github.com/cs3org/reva/pull/2735 - https://github.com/owncloud/ocis/issues/3370 - https://github.com/cs3org/reva/pull/2697 + * Change #2737: Bump go-cs3api - * Enhancement #3370: Enable space members to list shares inside the space + Bumped version of the go-cs3api - If there are shared resources in a space then all members are allowed to see those shares. The - json share manager was enhanced to check if the user is allowed to see a share by checking the - grants on a resource. + https://github.com/cs3org/reva/pull/2737 - https://github.com/owncloud/ocis/issues/3370 - https://github.com/cs3org/reva/pull/2674 - https://github.com/cs3org/reva/pull/2710 + * Change #2763: Change the oCIS and S3NG storage driver blob store layout - * Enhancement #2717: Add definitions for user and group events + We've optimized the oCIS and S3NG storage driver blob store layout. - Enhance the events package with definitions for user and group events. + For the oCIS storage driver, blobs will now be stored inside the folder of a space, next to the + nodes. This allows admins to easily archive, backup and restore spaces as a whole with UNIX + tooling. We also moved from a single folder for blobs to multiple folders for blobs, to make the + filesystem interactions more performant for large numbers of files. - https://github.com/cs3org/reva/pull/2717 - https://github.com/cs3org/reva/pull/2724 + The previous layout on disk looked like this: + + ```markdown |-- spaces | |-- .. | | |-- .. | |-- xx | |-- xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- + partitioned space id | |-- nodes | |-- .. | |-- xx | |-- xx | |-- xx | |-- xx | |-- + -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned node id |-- blobs |-- .. |-- + xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- blob id ``` + + Now it looks like this: + + ```markdown |-- spaces | |-- .. | | |-- .. |-- xx |-- xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- + partitioned space id |-- nodes | |-- .. | |-- xx | |-- xx | |-- xx | |-- xx | |-- + -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned node id |-- blobs |-- .. |-- xx |-- xx |-- xx |-- xx + |-- -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned blob id ``` + + For the S3NG storage driver, blobs will now be prefixed with the space id and also a part of the + blob id will be used as prefix. This creates a better prefix partitioning and mitigates S3 api + performance drops for large buckets + (https://aws.amazon.com/de/premiumsupport/knowledge-center/s3-prefix-nested-folders-difference/). + + The previous S3 bucket (blobs only looked like this): + + ```markdown |-- .. |-- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- blob id ``` + + Now it looks like this: + + ```markdown |-- .. |-- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- space id |-- .. |-- xx |-- xx + |-- xx |-- xx |-- -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned blob id ``` + + https://github.com/owncloud/ocis/issues/3557 + https://github.com/cs3org/reva/pull/2763 + + * Change #2596: Remove hash from public link urls + + Public link urls do not contain the hash anymore, this is needed to support the ocis and web + history mode. + + https://github.com/cs3org/reva/pull/2596 + https://github.com/owncloud/ocis/pull/3109 + https://github.com/owncloud/web/pull/6363 + + * Change #2785: Implement workaround for chi.RegisterMethod + + Implemented a workaround for `chi.RegisterMethod` because of a concurrent map read write + issue. This needs to be fixed upstream in go-chi. + + https://github.com/cs3org/reva/pull/2785 + + * Change #2559: Do not encode webDAV ids to base64 + + We removed the base64 encoding of the IDs and use the format ! with a `!` + delimiter. As a reserved delimiter it is URL safe. The IDs will be XML and JSON encoded as + necessary. + + https://github.com/cs3org/reva/pull/2559 + + * Change #2740: Rename oc10 share manager driver + + We aligned the oc10 SQL share manager driver name with all other owncloud spacific SQL drivers + by renaming the package `pkg/share/manager/sql` to `pkg/share/manager/owncloudsql` and + changing the name from `oc10-sql` to `owncloudsql`. + + https://github.com/cs3org/reva/pull/2740 + + * Change #2561: Merge oidcmapping auth manager into oidc + + The oidcmapping auth manager was created as a separate package to ease testing. As it has now + been tested also as a pure OIDC auth provider without mapping, and as the code is largely + refactored, it makes sense to merge it back so to maintain a single OIDC manager. + + https://github.com/cs3org/reva/pull/2561 + + * Enhancement #2698: Make capabilities endpoint public, authenticate users is present + + https://github.com/cs3org/reva/pull/2698 + + * Enhancement #2515: Enabling tracing by default if not explicitly disabled + + https://github.com/cs3org/reva/pull/2515 + + * Enhancement #2686: Features for favorites xattrs in EOS, cache for scope expansion + + https://github.com/cs3org/reva/pull/2686 + + * Enhancement #2494: Use sys ACLs for file permissions + + https://github.com/cs3org/reva/pull/2494 + + * Enhancement #2522: Introduce events + + This will introduce events into the system. Events are a simple way to bring information from + one service to another. Read `pkg/events/example` and subfolders for more information + + https://github.com/cs3org/reva/pull/2522 + + * Enhancement #2811: Add event for created directories + + We added another event for created directories. + + https://github.com/cs3org/reva/pull/2811 + + * Enhancement #2798: Add additional fields to events to enable search + + https://github.com/cs3org/reva/pull/2798 + + * Enhancement #2790: Fake providerids so API stays stable after beta + + To support the stativ registry, we need to accept providerids This fakes the ids so the API can + stay stable + + https://github.com/cs3org/reva/pull/2790 + + * Enhancement #2685: Enable federated account access + + https://github.com/cs3org/reva/pull/2685 + + * Enhancement #1787: Add support for HTTP TPC + + We have added support for HTTP Third Party Copy. This allows remote data transfers between + storages managed by either two different reva servers, or a reva server and a Grid + (WLCG/ESCAPE) site server. + + Such remote transfers are expected to be driven by + [GFAL](https://cern.ch/dmc-docs/gfal2/gfal2.html), the underlying library used by + [FTS](https://cern.ch/fts), and [Rucio](https://rucio.cern.ch). + + In addition, the oidcmapping package has been refactored to support the standard OIDC use + cases as well when no mapping is defined. + + https://github.com/cs3org/reva/issues/1787 + https://github.com/cs3org/reva/pull/2007 + + * Enhancement #2799: Add flag to enable unrestriced listing of spaces + + Listing spaces now only returns all spaces when the user has the permissions and it was + explicitly requested. The default will only return the spaces the current user has access to. + + https://github.com/cs3org/reva/pull/2799 + + * Enhancement #2560: Mentix PromSD extensions + + The Mentix Prometheus SD scrape targets are now split into one file per service type, making + health checks configuration easier. Furthermore, the local file connector for mesh data and + the site registration endpoint have been dropped, as they aren't needed anymore. + + https://github.com/cs3org/reva/pull/2560 + + * Enhancement #2741: Meta path for user + + We've added support for requesting the `meta-path-for-user` via a propfind to the + `dav/meta/` endpoint. + + https://github.com/cs3org/reva/pull/2741 + https://github.com/cs3org/reva/pull/2793 + https://doc.owncloud.com/server/next/developer_manual/webdav_api/meta.html + + * Enhancement #2613: Externalize custom mime types configuration for storage providers + + Added ability to configure custom mime types in an external JSON file, such that it can be reused + when many storage providers are deployed at the same time. + + https://github.com/cs3org/reva/pull/2613 + + * Enhancement #2163: Nextcloud-based share manager for pkg/ocm/share + + Note that pkg/ocm/share is very similar to pkg/share, but it deals with cs3/sharing/ocm + whereas pkg/share deals with cs3/sharing/collaboration + + https://github.com/cs3org/reva/pull/2163 + + * Enhancement #2696: Preferences driver refactor and cbox sql implementation + + This PR uses the updated CS3APIs which accepts a namespace in addition to a single string key to + recognize a user preference. It also refactors the GRPC service to support multiple drivers + and adds the cbox SQL implementation. + + https://github.com/cs3org/reva/pull/2696 + + * Enhancement #2052: New CS3API datatx methods + + CS3 datatx pull model methods: PullTransfer, RetryTransfer, ListTransfers Method + CreateTransfer removed. + + https://github.com/cs3org/reva/pull/2052 + + * Enhancement #2743: Add capability for public link single file edit + + It is now possible to share a single file by link with edit permissions. Therefore we need a + public share capability to enable that feature in the clients. At the same time we improved the + WebDAV permissions for public links. + + https://github.com/cs3org/reva/pull/2743 + + * Enhancement #2738: Site accounts site-global settings + + This PR extends the site accounts service by adding site-global settings. These are used to + store test user credentials that are in return used by our BBE port to perform CS3API-specific + health checks. + + https://github.com/cs3org/reva/pull/2738 + + * Enhancement #2672: Further Site Accounts improvements + + Yet another PR to update the site accounts (and Mentix): New default site ID; Include service + type in alerts; Naming unified; Remove obsolete stuff. + + https://github.com/cs3org/reva/pull/2672 + + * Enhancement #2549: Site accounts improvements + + This PR improves the site accounts: - Removed/hid API key stuff - Added quick links to the main + panel - Made alert notifications mandatory + + https://github.com/cs3org/reva/pull/2549 + + * Enhancement #2795: Add feature flags "projects" and "share_jail" to spaces capability + + https://github.com/cs3org/reva/pull/2795 + + * Enhancement #2514: Reuse ocs role objects in other drivers + + https://github.com/cs3org/reva/pull/2514 + + * Enhancement #2781: In memory user provider + + We added an in memory implementation for the user provider that reads the users from the + mapstructure passed in. + + https://github.com/cs3org/reva/pull/2781 + + * Enhancement #2752: Refactor the rest user and group provider drivers + + We now maintain our own cache for all user and group data, and periodically refresh it. A redis + server now becomes a necessary dependency, whereas it was optional previously. + + https://github.com/cs3org/reva/pull/2752 diff --git a/docs/content/en/docs/changelog/2.3.0/_index.md b/docs/content/en/docs/changelog/2.3.0/_index.md new file mode 100644 index 00000000000..32d9fea01f1 --- /dev/null +++ b/docs/content/en/docs/changelog/2.3.0/_index.md @@ -0,0 +1,435 @@ + +--- +title: "v2.3.0" +linkTitle: "v2.3.0" +weight: 40 +description: > + Changelog for Reva v2.3.0 (2022-05-02) +--- + +Changelog for reva 2.3.0 (2022-05-02) +======================================= + +The following sections list the changes in reva 2.3.0 relevant to +reva users. The changes are ordered by importance. + +Summary +------- + + * Fix #2693: Support editnew actions from MS Office + * Fix #2588: Dockerfile.revad-ceph to use the right base image + * Fix #2499: Removed check DenyGrant in resource permission + * Fix #2285: Accept new userid idp format + * Fix #2802: Fix the resource id handling for space shares + * Fix #2800: Fix spaceid parsing in spaces trashbin API + * Fix #2608: Respect the tracing_service_name config variable + * Fix #2742: Use exact match in login filter + * Fix #2759: Made uid, gid claims parsing more robust in OIDC auth provider + * Fix #2788: Return the correct file IDs on public link resources + * Fix #2322: Use RFC3339 for parsing dates + * Fix #2784: Disable storageprovider cache for the share jail + * Fix #2555: Fix site accounts endpoints + * Fix #2675: Updates Makefile according to latest go standards + * Fix #2572: Wait for nats server on middleware start + * Chg #2735: Avoid user enumeration + * Chg #2737: Bump go-cs3api + * Chg #2763: Change the oCIS and S3NG storage driver blob store layout + * Chg #2596: Remove hash from public link urls + * Chg #2785: Implement workaround for chi.RegisterMethod + * Chg #2559: Do not encode webDAV ids to base64 + * Chg #2740: Rename oc10 share manager driver + * Chg #2561: Merge oidcmapping auth manager into oidc + * Enh #2698: Make capabilities endpoint public, authenticate users is present + * Enh #2515: Enabling tracing by default if not explicitly disabled + * Enh #2686: Features for favorites xattrs in EOS, cache for scope expansion + * Enh #2494: Use sys ACLs for file permissions + * Enh #2522: Introduce events + * Enh #2811: Add event for created directories + * Enh #2798: Add additional fields to events to enable search + * Enh #2790: Fake providerids so API stays stable after beta + * Enh #2685: Enable federated account access + * Enh #1787: Add support for HTTP TPC + * Enh #2799: Add flag to enable unrestriced listing of spaces + * Enh #2560: Mentix PromSD extensions + * Enh #2741: Meta path for user + * Enh #2613: Externalize custom mime types configuration for storage providers + * Enh #2163: Nextcloud-based share manager for pkg/ocm/share + * Enh #2696: Preferences driver refactor and cbox sql implementation + * Enh #2052: New CS3API datatx methods + * Enh #2743: Add capability for public link single file edit + * Enh #2738: Site accounts site-global settings + * Enh #2672: Further Site Accounts improvements + * Enh #2549: Site accounts improvements + * Enh #2795: Add feature flags "projects" and "share_jail" to spaces capability + * Enh #2514: Reuse ocs role objects in other drivers + * Enh #2781: In memory user provider + * Enh #2752: Refactor the rest user and group provider drivers + +Details +------- + + * Bugfix #2693: Support editnew actions from MS Office + + This fixes the incorrect behavior when creating new xlsx and pptx files, as MS Office supports + the editnew action and it must be used for newly created files instead of the normal edit action. + + https://github.com/cs3org/reva/pull/2693 + + * Bugfix #2588: Dockerfile.revad-ceph to use the right base image + + In Aug2021 https://hub.docker.com/r/ceph/daemon-base was moved to quay.ceph.io and the + builds for this image were failing for some weeks after January. + + https://github.com/cs3org/reva/pull/2588 + + * Bugfix #2499: Removed check DenyGrant in resource permission + + When adding a denial permission + + https://github.com/cs3org/reva/pull/2499 + + * Bugfix #2285: Accept new userid idp format + + The format for userid idp [changed](https://github.com/cs3org/cs3apis/pull/159) and + this broke [the ocmd + tutorial](https://reva.link/docs/tutorials/share-tutorial/#5-1-4-create-the-share) + This PR makes the provider authorizer interceptor accept both the old and the new string + format. + + https://github.com/cs3org/reva/issues/2285 + https://github.com/cs3org/reva/issues/2285 + See + and + + * Bugfix #2802: Fix the resource id handling for space shares + + Adapt the space shares to the new id format. + + https://github.com/cs3org/reva/pull/2802 + + * Bugfix #2800: Fix spaceid parsing in spaces trashbin API + + Added proper space id parsing to the spaces trashbin API endpoint. + + https://github.com/cs3org/reva/pull/2800 + + * Bugfix #2608: Respect the tracing_service_name config variable + + https://github.com/cs3org/reva/pull/2608 + + * Bugfix #2742: Use exact match in login filter + + After the recent config changes the auth-provider was accidently using a substring match for + the login filter. It's no fixed to use an exact match. + + https://github.com/cs3org/reva/pull/2742 + + * Bugfix #2759: Made uid, gid claims parsing more robust in OIDC auth provider + + This fix makes sure the uid and gid claims are defined at init time, and that the necessary + typecasts are performed correctly when authenticating users. A comment was added that in case + the uid/gid claims are missing AND that no mapping takes place, a user entity is returned with + uid = gid = 0. + + https://github.com/cs3org/reva/pull/2759 + + * Bugfix #2788: Return the correct file IDs on public link resources + + Resources in public shares should return the real resourceids from the storage of the owner. + + https://github.com/cs3org/reva/pull/2788 + + * Bugfix #2322: Use RFC3339 for parsing dates + + We have used the RFC3339 format for parsing dates to be consistent with oC Web. + + https://github.com/cs3org/reva/issues/2322 + https://github.com/cs3org/reva/pull/2744 + + * Bugfix #2784: Disable storageprovider cache for the share jail + + The share jail should not be cached in the provider cache because it is a virtual collection of + resources from different storage providers. + + https://github.com/cs3org/reva/pull/2784 + + * Bugfix #2555: Fix site accounts endpoints + + This PR fixes small bugs in the site accounts endpoints. + + https://github.com/cs3org/reva/pull/2555 + + * Bugfix #2675: Updates Makefile according to latest go standards + + Earlier, we were using go get to install packages. Now, we are using go install to install + packages + + https://github.com/cs3org/reva/issues/2675 + https://github.com/cs3org/reva/pull/2747 + + * Bugfix #2572: Wait for nats server on middleware start + + Use a retry mechanism to connect to the nats server when it is not ready yet + + https://github.com/cs3org/reva/pull/2572 + + * Change #2735: Avoid user enumeration + + Sending PROPFIND requests to `../files/admin` did return a different response than sending + the same request to `../files/notexists`. This allowed enumerating users. This response was + changed to be the same always + + https://github.com/cs3org/reva/pull/2735 + + * Change #2737: Bump go-cs3api + + Bumped version of the go-cs3api + + https://github.com/cs3org/reva/pull/2737 + + * Change #2763: Change the oCIS and S3NG storage driver blob store layout + + We've optimized the oCIS and S3NG storage driver blob store layout. + + For the oCIS storage driver, blobs will now be stored inside the folder of a space, next to the + nodes. This allows admins to easily archive, backup and restore spaces as a whole with UNIX + tooling. We also moved from a single folder for blobs to multiple folders for blobs, to make the + filesystem interactions more performant for large numbers of files. + + The previous layout on disk looked like this: + + ```markdown |-- spaces | |-- .. | | |-- .. | |-- xx | |-- xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- + partitioned space id | |-- nodes | |-- .. | |-- xx | |-- xx | |-- xx | |-- xx | |-- + -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned node id |-- blobs |-- .. |-- + xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- blob id ``` + + Now it looks like this: + + ```markdown |-- spaces | |-- .. | | |-- .. |-- xx |-- xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- + partitioned space id |-- nodes | |-- .. | |-- xx | |-- xx | |-- xx | |-- xx | |-- + -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned node id |-- blobs |-- .. |-- xx |-- xx |-- xx |-- xx + |-- -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned blob id ``` + + For the S3NG storage driver, blobs will now be prefixed with the space id and also a part of the + blob id will be used as prefix. This creates a better prefix partitioning and mitigates S3 api + performance drops for large buckets + (https://aws.amazon.com/de/premiumsupport/knowledge-center/s3-prefix-nested-folders-difference/). + + The previous S3 bucket (blobs only looked like this): + + ```markdown |-- .. |-- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- blob id ``` + + Now it looks like this: + + ```markdown |-- .. |-- xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx <- space id |-- .. |-- xx |-- xx + |-- xx |-- xx |-- -xxxx-xxxx-xxxx-xxxxxxxxxxxx <- partitioned blob id ``` + + https://github.com/owncloud/ocis/issues/3557 + https://github.com/cs3org/reva/pull/2763 + + * Change #2596: Remove hash from public link urls + + Public link urls do not contain the hash anymore, this is needed to support the ocis and web + history mode. + + https://github.com/cs3org/reva/pull/2596 + https://github.com/owncloud/ocis/pull/3109 + https://github.com/owncloud/web/pull/6363 + + * Change #2785: Implement workaround for chi.RegisterMethod + + Implemented a workaround for `chi.RegisterMethod` because of a concurrent map read write + issue. This needs to be fixed upstream in go-chi. + + https://github.com/cs3org/reva/pull/2785 + + * Change #2559: Do not encode webDAV ids to base64 + + We removed the base64 encoding of the IDs and use the format ! with a `!` + delimiter. As a reserved delimiter it is URL safe. The IDs will be XML and JSON encoded as + necessary. + + https://github.com/cs3org/reva/pull/2559 + + * Change #2740: Rename oc10 share manager driver + + We aligned the oc10 SQL share manager driver name with all other owncloud spacific SQL drivers + by renaming the package `pkg/share/manager/sql` to `pkg/share/manager/owncloudsql` and + changing the name from `oc10-sql` to `owncloudsql`. + + https://github.com/cs3org/reva/pull/2740 + + * Change #2561: Merge oidcmapping auth manager into oidc + + The oidcmapping auth manager was created as a separate package to ease testing. As it has now + been tested also as a pure OIDC auth provider without mapping, and as the code is largely + refactored, it makes sense to merge it back so to maintain a single OIDC manager. + + https://github.com/cs3org/reva/pull/2561 + + * Enhancement #2698: Make capabilities endpoint public, authenticate users is present + + https://github.com/cs3org/reva/pull/2698 + + * Enhancement #2515: Enabling tracing by default if not explicitly disabled + + https://github.com/cs3org/reva/pull/2515 + + * Enhancement #2686: Features for favorites xattrs in EOS, cache for scope expansion + + https://github.com/cs3org/reva/pull/2686 + + * Enhancement #2494: Use sys ACLs for file permissions + + https://github.com/cs3org/reva/pull/2494 + + * Enhancement #2522: Introduce events + + This will introduce events into the system. Events are a simple way to bring information from + one service to another. Read `pkg/events/example` and subfolders for more information + + https://github.com/cs3org/reva/pull/2522 + + * Enhancement #2811: Add event for created directories + + We added another event for created directories. + + https://github.com/cs3org/reva/pull/2811 + + * Enhancement #2798: Add additional fields to events to enable search + + https://github.com/cs3org/reva/pull/2798 + + * Enhancement #2790: Fake providerids so API stays stable after beta + + To support the stativ registry, we need to accept providerids This fakes the ids so the API can + stay stable + + https://github.com/cs3org/reva/pull/2790 + + * Enhancement #2685: Enable federated account access + + https://github.com/cs3org/reva/pull/2685 + + * Enhancement #1787: Add support for HTTP TPC + + We have added support for HTTP Third Party Copy. This allows remote data transfers between + storages managed by either two different reva servers, or a reva server and a Grid + (WLCG/ESCAPE) site server. + + Such remote transfers are expected to be driven by + [GFAL](https://cern.ch/dmc-docs/gfal2/gfal2.html), the underlying library used by + [FTS](https://cern.ch/fts), and [Rucio](https://rucio.cern.ch). + + In addition, the oidcmapping package has been refactored to support the standard OIDC use + cases as well when no mapping is defined. + + https://github.com/cs3org/reva/issues/1787 + https://github.com/cs3org/reva/pull/2007 + + * Enhancement #2799: Add flag to enable unrestriced listing of spaces + + Listing spaces now only returns all spaces when the user has the permissions and it was + explicitly requested. The default will only return the spaces the current user has access to. + + https://github.com/cs3org/reva/pull/2799 + + * Enhancement #2560: Mentix PromSD extensions + + The Mentix Prometheus SD scrape targets are now split into one file per service type, making + health checks configuration easier. Furthermore, the local file connector for mesh data and + the site registration endpoint have been dropped, as they aren't needed anymore. + + https://github.com/cs3org/reva/pull/2560 + + * Enhancement #2741: Meta path for user + + We've added support for requesting the `meta-path-for-user` via a propfind to the + `dav/meta/` endpoint. + + https://github.com/cs3org/reva/pull/2741 + https://github.com/cs3org/reva/pull/2793 + https://doc.owncloud.com/server/next/developer_manual/webdav_api/meta.html + + * Enhancement #2613: Externalize custom mime types configuration for storage providers + + Added ability to configure custom mime types in an external JSON file, such that it can be reused + when many storage providers are deployed at the same time. + + https://github.com/cs3org/reva/pull/2613 + + * Enhancement #2163: Nextcloud-based share manager for pkg/ocm/share + + Note that pkg/ocm/share is very similar to pkg/share, but it deals with cs3/sharing/ocm + whereas pkg/share deals with cs3/sharing/collaboration + + https://github.com/cs3org/reva/pull/2163 + + * Enhancement #2696: Preferences driver refactor and cbox sql implementation + + This PR uses the updated CS3APIs which accepts a namespace in addition to a single string key to + recognize a user preference. It also refactors the GRPC service to support multiple drivers + and adds the cbox SQL implementation. + + https://github.com/cs3org/reva/pull/2696 + + * Enhancement #2052: New CS3API datatx methods + + CS3 datatx pull model methods: PullTransfer, RetryTransfer, ListTransfers Method + CreateTransfer removed. + + https://github.com/cs3org/reva/pull/2052 + + * Enhancement #2743: Add capability for public link single file edit + + It is now possible to share a single file by link with edit permissions. Therefore we need a + public share capability to enable that feature in the clients. At the same time we improved the + WebDAV permissions for public links. + + https://github.com/cs3org/reva/pull/2743 + + * Enhancement #2738: Site accounts site-global settings + + This PR extends the site accounts service by adding site-global settings. These are used to + store test user credentials that are in return used by our BBE port to perform CS3API-specific + health checks. + + https://github.com/cs3org/reva/pull/2738 + + * Enhancement #2672: Further Site Accounts improvements + + Yet another PR to update the site accounts (and Mentix): New default site ID; Include service + type in alerts; Naming unified; Remove obsolete stuff. + + https://github.com/cs3org/reva/pull/2672 + + * Enhancement #2549: Site accounts improvements + + This PR improves the site accounts: - Removed/hid API key stuff - Added quick links to the main + panel - Made alert notifications mandatory + + https://github.com/cs3org/reva/pull/2549 + + * Enhancement #2795: Add feature flags "projects" and "share_jail" to spaces capability + + https://github.com/cs3org/reva/pull/2795 + + * Enhancement #2514: Reuse ocs role objects in other drivers + + https://github.com/cs3org/reva/pull/2514 + + * Enhancement #2781: In memory user provider + + We added an in memory implementation for the user provider that reads the users from the + mapstructure passed in. + + https://github.com/cs3org/reva/pull/2781 + + * Enhancement #2752: Refactor the rest user and group provider drivers + + We now maintain our own cache for all user and group data, and periodically refresh it. A redis + server now becomes a necessary dependency, whereas it was optional previously. + + https://github.com/cs3org/reva/pull/2752 + + diff --git a/docs/content/en/docs/config/grpc/services/storageprovider/_index.md b/docs/content/en/docs/config/grpc/services/storageprovider/_index.md index d69a871ea50..0873933451b 100644 --- a/docs/content/en/docs/config/grpc/services/storageprovider/_index.md +++ b/docs/content/en/docs/config/grpc/services/storageprovider/_index.md @@ -9,7 +9,7 @@ description: > # _struct: config_ {{% dir name="driver" type="string" default="localhome" %}} -The storage driver to be used. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L57) +The storage driver to be used. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L58) {{< highlight toml >}} [grpc.services.storageprovider] driver = "localhome" @@ -17,7 +17,7 @@ driver = "localhome" {{% /dir %}} {{% dir name="drivers" type="map[string]map[string]interface{}" default="localhome" %}} - [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L58) + [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L59) {{< highlight toml >}} [grpc.services.storageprovider.drivers.localhome] root = "/var/tmp/reva/" @@ -28,7 +28,7 @@ user_layout = "{{.Username}}" {{% /dir %}} {{% dir name="tmp_folder" type="string" default="/var/tmp" %}} -Path to temporary folder. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L59) +Path to temporary folder. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L60) {{< highlight toml >}} [grpc.services.storageprovider] tmp_folder = "/var/tmp" @@ -36,7 +36,7 @@ tmp_folder = "/var/tmp" {{% /dir %}} {{% dir name="data_server_url" type="string" default="http://localhost/data" %}} -The URL for the data server. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L60) +The URL for the data server. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L61) {{< highlight toml >}} [grpc.services.storageprovider] data_server_url = "http://localhost/data" @@ -44,7 +44,7 @@ data_server_url = "http://localhost/data" {{% /dir %}} {{% dir name="expose_data_server" type="bool" default=false %}} -Whether to expose data server. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L61) +Whether to expose data server. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L62) {{< highlight toml >}} [grpc.services.storageprovider] expose_data_server = false @@ -52,7 +52,7 @@ expose_data_server = false {{% /dir %}} {{% dir name="available_checksums" type="map[string]uint32" default=nil %}} -List of available checksums. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L62) +List of available checksums. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L63) {{< highlight toml >}} [grpc.services.storageprovider] available_checksums = nil @@ -60,7 +60,7 @@ available_checksums = nil {{% /dir %}} {{% dir name="custom_mimetypes_json" type="string" default="nil" %}} -An optional mapping file with the list of supported custom file extensions and corresponding mime types. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L63) +An optional mapping file with the list of supported custom file extensions and corresponding mime types. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/grpc/services/storageprovider/storageprovider.go#L64) {{< highlight toml >}} [grpc.services.storageprovider] custom_mimetypes_json = "nil" From f626889a6f8d3ad5cde6b603ea8092467074e37e Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 5 May 2022 09:32:13 +0545 Subject: [PATCH 6/7] Bump CORE_COMMITID for tests (#2825) --- .drone.env | 2 +- .../expected-failures-on-OCIS-storage.md | 50 +++++++++---------- .../expected-failures-on-S3NG-storage.md | 50 +++++++++---------- 3 files changed, 51 insertions(+), 51 deletions(-) diff --git a/.drone.env b/.drone.env index fa334c47a11..5e3f67b8266 100644 --- a/.drone.env +++ b/.drone.env @@ -1,3 +1,3 @@ # The test runner source for API tests -CORE_COMMITID=4ee9352f4df70cb49cdd539f5a6f0275d369605a +CORE_COMMITID=de427a26ffd368f68b0445536793ae20a486b41e CORE_BRANCH=master diff --git a/tests/acceptance/expected-failures-on-OCIS-storage.md b/tests/acceptance/expected-failures-on-OCIS-storage.md index 501e7fa11ca..8816ede5b89 100644 --- a/tests/acceptance/expected-failures-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-on-OCIS-storage.md @@ -410,12 +410,12 @@ File and sync features in a shared scenario #### [cannot accept identical pending shares from different user serially](https://github.com/owncloud/ocis/issues/2131) - [apiShareManagementToShares/acceptShares.feature:599](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToShares/acceptShares.feature#L599) - [apiShareManagementToShares/acceptShares.feature:664](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToShares/acceptShares.feature#L664) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:162](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L162) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:163](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L163) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:202](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L202) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:203](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L203) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:45](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L45) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:46](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L46) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:162](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L162) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:163](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L163) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:202](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L202) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:203](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L203) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:45](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L45) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:46](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L46) #### [sharing with group not available](https://github.com/owncloud/product/issues/293) The first two tests work against ocis. There must be something wrong in the CI setup. @@ -493,8 +493,8 @@ The first two tests work against ocis. There must be something wrong in the CI s - [apiSharePublicLink2/copyFromPublicLink.feature:166](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/copyFromPublicLink.feature#L166) - [apiSharePublicLink2/copyFromPublicLink.feature:181](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/copyFromPublicLink.feature#L181) - [apiSharePublicLink2/copyFromPublicLink.feature:182](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/copyFromPublicLink.feature#L182) -- [apiSharePublicLink2/updatePublicLinkShare.feature:45](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L45) -- [apiSharePublicLink2/updatePublicLinkShare.feature:46](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L46) +- [apiSharePublicLink3/updatePublicLinkShare.feature:45](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L45) +- [apiSharePublicLink3/updatePublicLinkShare.feature:46](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L46) #### [OCIS share permissions not enforced](https://github.com/owncloud/product/issues/270) @@ -505,25 +505,25 @@ The first two tests work against ocis. There must be something wrong in the CI s #### [Adding public upload to a read only shared folder as a receipient is allowed ](https://github.com/owncloud/ocis/issues/2164) -- [apiSharePublicLink2/updatePublicLinkShare.feature:338](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L338) -- [apiSharePublicLink2/updatePublicLinkShare.feature:339](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L339) -- [apiSharePublicLink2/updatePublicLinkShare.feature:398](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L398) -- [apiSharePublicLink2/updatePublicLinkShare.feature:399](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L399) +- [apiSharePublicLink3/updatePublicLinkShare.feature:338](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L338) +- [apiSharePublicLink3/updatePublicLinkShare.feature:339](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L339) +- [apiSharePublicLink3/updatePublicLinkShare.feature:398](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L398) +- [apiSharePublicLink3/updatePublicLinkShare.feature:399](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L399) #### [Upload-only shares must not overwrite but create a separate file](https://github.com/owncloud/ocis-reva/issues/286) -- [apiSharePublicLink2/uploadToPublicLinkShare.feature:24](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L24) -- [apiSharePublicLink2/uploadToPublicLinkShare.feature:277](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L277) +- [apiSharePublicLink3/uploadToPublicLinkShare.feature:24](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/uploadToPublicLinkShare.feature#L24) +- [apiSharePublicLink3/uploadToPublicLinkShare.feature:277](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/uploadToPublicLinkShare.feature#L277) #### [Set quota over settings](https://github.com/owncloud/ocis/issues/1290) _requires a [CS3 user provisioning api that can update the quota for a user](https://github.com/cs3org/cs3apis/pull/95#issuecomment-772780683)_ -- [apiSharePublicLink2/uploadToPublicLinkShare.feature:160](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L160) -- [apiSharePublicLink2/uploadToPublicLinkShare.feature:179](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L179) +- [apiSharePublicLink3/uploadToPublicLinkShare.feature:160](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/uploadToPublicLinkShare.feature#L160) +- [apiSharePublicLink3/uploadToPublicLinkShare.feature:179](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/uploadToPublicLinkShare.feature#L179) #### [various sharing settings cannot be set](https://github.com/owncloud/ocis/issues/1328) -- [apiSharePublicLink2/uploadToPublicLinkShare.feature:198](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L198) +- [apiSharePublicLink3/uploadToPublicLinkShare.feature:198](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/uploadToPublicLinkShare.feature#L198) #### [various sharing settings cannot be set](https://github.com/owncloud/ocis/issues/1328) - [apiShareReshareToShares2/reShareWhenShareWithOnlyMembershipGroups.feature:27](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareReshareToShares2/reShareWhenShareWithOnlyMembershipGroups.feature#L27) @@ -797,8 +797,8 @@ _requires a [CS3 user provisioning api that can update the quota for a user](htt #### [incorrect ocs(v2) status value when sharing to group that does not exist should be 404, gives 998](https://github.com/owncloud/product/issues/250) _ocs: api compatibility, return correct status code_ -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:229](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L229) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:230](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L230) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:229](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L229) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:230](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L230) - [apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature:49](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature#L49) - [apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature:50](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature#L50) - [apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature:51](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature#L51) @@ -1407,10 +1407,10 @@ _ocs: api compatibility, return correct status code_ - [apiShareUpdateToShares/updateShare.feature:196](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareUpdateToShares/updateShare.feature#L196) #### [Sharing folder and sub-folder with same user but different permission,the permission of sub-folder is not obeyed ](https://github.com/owncloud/ocis/issues/2440) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:304](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L304) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:344](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L344) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:470](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L470) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:510](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L510) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:304](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L304) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:344](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L344) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:470](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L470) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:510](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L510) #### [Trying to copy a file into a readonly share gives HTTP 500 error](https://github.com/owncloud/ocis/issues/2166) - [apiWebdavProperties1/copyFile.feature:452](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L452) @@ -1437,8 +1437,8 @@ _ocs: api compatibility, return correct status code_ - [apiVersions/fileVersionAuthor.feature:223](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiVersions/fileVersionAuthor.feature#L223) ### [Allow public link sharing only for certain groups feature not implemented] -- [apiSharePublicLink2/allowGroupToCreatePublicLinks.feature:35](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/allowGroupToCreatePublicLinks.feature#L35) -- [apiSharePublicLink2/allowGroupToCreatePublicLinks.feature:91](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/allowGroupToCreatePublicLinks.feature#L91) +- [apiSharePublicLink3/allowGroupToCreatePublicLinks.feature:35](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/allowGroupToCreatePublicLinks.feature#L35) +- [apiSharePublicLink3/allowGroupToCreatePublicLinks.feature:91](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/allowGroupToCreatePublicLinks.feature#L91) #### [Shares to deleted group listed in the response](https://github.com/owncloud/ocis/issues/2441) - [apiShareManagementBasicToShares/createShareToSharesFolder.feature:495](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToShares/createShareToSharesFolder.feature#L495) diff --git a/tests/acceptance/expected-failures-on-S3NG-storage.md b/tests/acceptance/expected-failures-on-S3NG-storage.md index 48a1d75e3fd..05c90f8f61e 100644 --- a/tests/acceptance/expected-failures-on-S3NG-storage.md +++ b/tests/acceptance/expected-failures-on-S3NG-storage.md @@ -423,12 +423,12 @@ File and sync features in a shared scenario #### [cannot accept identical pending shares from different user serially](https://github.com/owncloud/ocis/issues/2131) - [apiShareManagementToShares/acceptShares.feature:599](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToShares/acceptShares.feature#L599) - [apiShareManagementToShares/acceptShares.feature:664](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToShares/acceptShares.feature#L664) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:162](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L162) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:163](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L163) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:202](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L202) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:203](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L203) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:45](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L45) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:46](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L46) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:162](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L162) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:163](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L163) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:202](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L202) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:203](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L203) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:45](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L45) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:46](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L46) #### [Fix accepting/denying group shares](https://github.com/cs3org/reva/issues/1769) @@ -514,8 +514,8 @@ File and sync features in a shared scenario - [apiSharePublicLink2/copyFromPublicLink.feature:166](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/copyFromPublicLink.feature#L166) - [apiSharePublicLink2/copyFromPublicLink.feature:181](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/copyFromPublicLink.feature#L181) - [apiSharePublicLink2/copyFromPublicLink.feature:182](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/copyFromPublicLink.feature#L182) -- [apiSharePublicLink2/updatePublicLinkShare.feature:45](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L45) -- [apiSharePublicLink2/updatePublicLinkShare.feature:46](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L46) +- [apiSharePublicLink3/updatePublicLinkShare.feature:45](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L45) +- [apiSharePublicLink3/updatePublicLinkShare.feature:46](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L46) #### [OCIS share permissions not enforced](https://github.com/owncloud/product/issues/270) @@ -526,24 +526,24 @@ File and sync features in a shared scenario #### [Adding public upload to a read only shared folder as a receipient is allowed ](https://github.com/owncloud/ocis/issues/2164) -- [apiSharePublicLink2/updatePublicLinkShare.feature:338](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L338) -- [apiSharePublicLink2/updatePublicLinkShare.feature:339](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L339) -- [apiSharePublicLink2/updatePublicLinkShare.feature:398](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L398) -- [apiSharePublicLink2/updatePublicLinkShare.feature:399](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L399) +- [apiSharePublicLink3/updatePublicLinkShare.feature:338](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L338) +- [apiSharePublicLink3/updatePublicLinkShare.feature:339](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L339) +- [apiSharePublicLink3/updatePublicLinkShare.feature:398](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L398) +- [apiSharePublicLink3/updatePublicLinkShare.feature:399](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/updatePublicLinkShare.feature#L399) #### [Upload-only shares must not overwrite but create a separate file](https://github.com/owncloud/ocis/issues/1267) -- [apiSharePublicLink2/uploadToPublicLinkShare.feature:24](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L24) -- [apiSharePublicLink2/uploadToPublicLinkShare.feature:277](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L277) +- [apiSharePublicLink3/uploadToPublicLinkShare.feature:24](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/uploadToPublicLinkShare.feature#L24) +- [apiSharePublicLink3/uploadToPublicLinkShare.feature:277](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/uploadToPublicLinkShare.feature#L277) #### [Set quota over settings](https://github.com/owncloud/ocis/issues/1290) _requires a [CS3 user provisioning api that can update the quota for a user](https://github.com/cs3org/cs3apis/pull/95#issuecomment-772780683)_ -- [apiSharePublicLink2/uploadToPublicLinkShare.feature:160](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L160) -- [apiSharePublicLink2/uploadToPublicLinkShare.feature:179](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L179) +- [apiSharePublicLink3/uploadToPublicLinkShare.feature:160](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/uploadToPublicLinkShare.feature#L160) +- [apiSharePublicLink3/uploadToPublicLinkShare.feature:179](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/uploadToPublicLinkShare.feature#L179) #### [various sharing settings cannot be set](https://github.com/owncloud/ocis/issues/1328) -- [apiSharePublicLink2/uploadToPublicLinkShare.feature:198](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/uploadToPublicLinkShare.feature#L198) +- [apiSharePublicLink3/uploadToPublicLinkShare.feature:198](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/uploadToPublicLinkShare.feature#L198) #### [various sharing settings cannot be set](https://github.com/owncloud/ocis/issues/1328) - [apiShareReshareToShares2/reShareWhenShareWithOnlyMembershipGroups.feature:27](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareReshareToShares2/reShareWhenShareWithOnlyMembershipGroups.feature#L27) @@ -810,8 +810,8 @@ _requires a [CS3 user provisioning api that can update the quota for a user](htt #### [incorrect ocs(v2) status value when sharing to group that does not exist should be 404, gives 998](https://github.com/owncloud/product/issues/250) _ocs: api compatibility, return correct status code_ -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:229](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L229) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:230](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L230) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:229](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L229) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:230](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L230) - [apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature:49](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature#L49) - [apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature:50](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature#L50) - [apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature:51](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareGroupCaseSensitive.feature#L51) @@ -1427,10 +1427,10 @@ _ocs: api compatibility, return correct status code_ - [apiShareUpdateToShares/updateShare.feature:196](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareUpdateToShares/updateShare.feature#L196) #### [Sharing folder and sub-folder with same user but different permission,the permission of sub-folder is not obeyed ](https://github.com/owncloud/ocis/issues/2440) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:304](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L304) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:344](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L344) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:470](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L470) -- [apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature:510](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature#L510) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:304](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L304) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:344](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L344) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:470](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L470) +- [apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:510](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L510) #### [Trying to copy a file into a readonly share gives HTTP 500 error](https://github.com/owncloud/ocis/issues/2166) - [apiWebdavProperties1/copyFile.feature:452](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L452) @@ -1441,8 +1441,8 @@ _ocs: api compatibility, return correct status code_ - [apiWebdavProperties1/copyFile.feature:484](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavProperties1/copyFile.feature#L484) ### [Allow public link sharing only for certain groups feature not implemented] -- [apiSharePublicLink2/allowGroupToCreatePublicLinks.feature:35](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/allowGroupToCreatePublicLinks.feature#L35) -- [apiSharePublicLink2/allowGroupToCreatePublicLinks.feature:91](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink2/allowGroupToCreatePublicLinks.feature#L91) +- [apiSharePublicLink3/allowGroupToCreatePublicLinks.feature:35](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/allowGroupToCreatePublicLinks.feature#L35) +- [apiSharePublicLink3/allowGroupToCreatePublicLinks.feature:91](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink3/allowGroupToCreatePublicLinks.feature#L91) #### [Shares to deleted group listed in the response](https://github.com/owncloud/ocis/issues/2441) - [apiShareManagementBasicToShares/createShareToSharesFolder.feature:495](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementBasicToShares/createShareToSharesFolder.feature#L495) From bdbc57ff6f1d9c1ffc8303045d8fcf0b7fb3031e Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 5 May 2022 12:30:14 +0545 Subject: [PATCH 7/7] Bump CORE_COMMITID to include new trashbin test code (#2827) --- .drone.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.env b/.drone.env index 5e3f67b8266..5f3e3645b64 100644 --- a/.drone.env +++ b/.drone.env @@ -1,3 +1,3 @@ # The test runner source for API tests -CORE_COMMITID=de427a26ffd368f68b0445536793ae20a486b41e +CORE_COMMITID=a11dbcf8ae3903c550bffea6bbfc7f587bede995 CORE_BRANCH=master