From 7111b4822550635e1c628b909a6184806717b3e4 Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Thu, 26 Jan 2023 17:38:19 +0100
Subject: [PATCH 01/11] rework of ocm in cs3apis
---
cs3/ocm/core/v1beta1/ocm_core_api.proto | 20 ++++++++---
cs3/ocm/core/v1beta1/resources.proto | 44 ++++++++++++++++++++-----
2 files changed, 51 insertions(+), 13 deletions(-)
diff --git a/cs3/ocm/core/v1beta1/ocm_core_api.proto b/cs3/ocm/core/v1beta1/ocm_core_api.proto
index d004f89c..bb667271 100644
--- a/cs3/ocm/core/v1beta1/ocm_core_api.proto
+++ b/cs3/ocm/core/v1beta1/ocm_core_api.proto
@@ -30,6 +30,7 @@ option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";
import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/ocm/core/v1beta1/resources.proto";
+import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/rpc/v1beta1/status.proto";
import "cs3/types/v1beta1/types.proto";
@@ -66,19 +67,28 @@ message CreateOCMCoreShareRequest {
string name = 3;
// REQUIRED.
// Identifier to identify the resource at the provider side. This is unique per provider.
- string provider_id = 4;
+ string resource_id = 4;
// REQUIRED.
- // Provider specific identifier of the user that wants to share the resource.
+ // Provider specific identifier of the owner of the resource.
cs3.identity.user.v1beta1.UserId owner = 5;
// REQUIRED.
+ // Provider specific identifier of the user that wants to share the resource.
+ cs3.identity.user.v1beta1.UserId sender = 6;
+ // REQUIRED.
// Consumer specific identifier of the user or group the provider wants to share the resource with.
// This is known in advance, for example using the OCM invitation flow.
// Please note that the consumer service endpoint is known in advance as well, so this is no part of the request body.
// TODO: this field needs to represent either a user or group in the future, not only a user.
- cs3.identity.user.v1beta1.UserId share_with = 6;
+ cs3.identity.user.v1beta1.UserId share_with = 7;
+ // REQUIRED.
+ // Resource type.
+ cs3.storage.provider.v1beta1.ResourceType resource_type = 8;
+ // REQUIRED.
+ // Recipient share type.
+ ShareType share_type = 9;
// REQUIRED.
- // The protocol which is used to establish synchronisation.
- Protocol protocol = 7;
+ // The protocols which are used to establish synchronisation.
+ repeated Protocol protocols = 10;
}
message CreateOCMCoreShareResponse {
diff --git a/cs3/ocm/core/v1beta1/resources.proto b/cs3/ocm/core/v1beta1/resources.proto
index 22ae893c..18d21a67 100644
--- a/cs3/ocm/core/v1beta1/resources.proto
+++ b/cs3/ocm/core/v1beta1/resources.proto
@@ -28,15 +28,43 @@ option java_package = "com.cs3.ocm.core.v1beta1";
option objc_class_prefix = "COC";
option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";
-import "cs3/types/v1beta1/types.proto";
-
// The protocol which is used to establish synchronisation.
message Protocol {
// REQUIRED.
- // The name of the protocol to use.
- string name = 1;
- // REQUIRED.
- // JSON object with protocol specific options,
- // e.g. uri, access_token, password, permissions etc.
- cs3.types.v1beta1.Opaque opaque = 2;
+ oneof term {
+ WebDAVProtocol webdap_options = 1;
+ WebappProtocol webapp_options = 2;
+ DatatxProtocol datatx_oprions = 3;
+ }
}
+
+// Defines the options for the WebDAV protocol.
+message WebDAVProtocol {
+ // Secret use to access the resource.
+ string shared_secret = 1;
+ // Permissions of the shared resource.
+ string permissions = 2; // TODO: use cs3 permissions
+ // WebDAV URL used to access the resource.
+ string uri = 3;
+}
+
+// Defines the options for the Webapp protocol.
+message WebappProtocol {
+ // TODO: add
+ string uriTemplate = 1;
+}
+
+// Defines the options for the Datatx protocol.
+message DatatxProtocol {
+ string shared_secret = 1;
+ string source_uri = 2;
+ uint64 size = 3;
+}
+
+// Defines the type of share based on its recipient.
+enum ShareType {
+ // Share of type user.
+ SHARE_TYPE_USER = 0;
+ // Share of type group.
+ SHARE_TYPE_GROUP = 1;
+ }
\ No newline at end of file
From 1b191adfbaaa2914d1622497c4ad7e5520cf6a42 Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Fri, 27 Jan 2023 09:15:32 +0100
Subject: [PATCH 02/11] defined ocm protocols
---
cs3/ocm/core/v1beta1/resources.proto | 30 +++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/cs3/ocm/core/v1beta1/resources.proto b/cs3/ocm/core/v1beta1/resources.proto
index 18d21a67..54df1d3e 100644
--- a/cs3/ocm/core/v1beta1/resources.proto
+++ b/cs3/ocm/core/v1beta1/resources.proto
@@ -28,6 +28,8 @@ option java_package = "com.cs3.ocm.core.v1beta1";
option objc_class_prefix = "COC";
option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";
+import "cs3/sharing/ocm/v1beta1/resources.proto";
+
// The protocol which is used to establish synchronisation.
message Protocol {
// REQUIRED.
@@ -40,31 +42,41 @@ message Protocol {
// Defines the options for the WebDAV protocol.
message WebDAVProtocol {
- // Secret use to access the resource.
+ // REQUIRED.
+ // Secret used to access the resource.
string shared_secret = 1;
+ // REQUIRED.
// Permissions of the shared resource.
- string permissions = 2; // TODO: use cs3 permissions
- // WebDAV URL used to access the resource.
+ cs3.sharing.ocm.v1beta1.SharePermissions permissions = 2;
+ // REQUIRED.
+ // WebDAV URI used to access the resource.
string uri = 3;
}
// Defines the options for the Webapp protocol.
message WebappProtocol {
- // TODO: add
+ // REQUIRED.
+ // Template URI to open the resource with a remote app.
string uriTemplate = 1;
}
// Defines the options for the Datatx protocol.
message DatatxProtocol {
+ // REQUIRED.
+ // Secret used to access the source of the data transfer.
string shared_secret = 1;
+ // REQUIRED.
+ // Source URI for the data transfer.
string source_uri = 2;
+ // REQUIRED.
+ // Size in bytes of the source.
uint64 size = 3;
}
// Defines the type of share based on its recipient.
enum ShareType {
- // Share of type user.
- SHARE_TYPE_USER = 0;
- // Share of type group.
- SHARE_TYPE_GROUP = 1;
- }
\ No newline at end of file
+ // Share of type user.
+ SHARE_TYPE_USER = 0;
+ // Share of type group.
+ SHARE_TYPE_GROUP = 1;
+}
\ No newline at end of file
From 856fe23fa7cd2197f74d5447d3b62fb807824347 Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Mon, 30 Jan 2023 11:24:45 +0100
Subject: [PATCH 03/11] add opaque to protocols
---
cs3/ocm/core/v1beta1/resources.proto | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cs3/ocm/core/v1beta1/resources.proto b/cs3/ocm/core/v1beta1/resources.proto
index 54df1d3e..fe467dee 100644
--- a/cs3/ocm/core/v1beta1/resources.proto
+++ b/cs3/ocm/core/v1beta1/resources.proto
@@ -29,6 +29,7 @@ option objc_class_prefix = "COC";
option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";
import "cs3/sharing/ocm/v1beta1/resources.proto";
+import "cs3/types/v1beta1/types.proto";
// The protocol which is used to establish synchronisation.
message Protocol {
@@ -37,6 +38,7 @@ message Protocol {
WebDAVProtocol webdap_options = 1;
WebappProtocol webapp_options = 2;
DatatxProtocol datatx_oprions = 3;
+ cs3.types.v1beta1.Opaque generic_options = 4;
}
}
From 8e6a048ce6b8485e33dd9d2b66b92c8e58023ee8 Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Mon, 30 Jan 2023 16:10:46 +0100
Subject: [PATCH 04/11] add protocol fields to ocm share
---
cs3/ocm/core/v1beta1/ocm_core_api.proto | 6 +-
cs3/ocm/core/v1beta1/resources.proto | 84 -------------------------
cs3/sharing/ocm/v1beta1/resources.proto | 67 +++++++++++++++++---
3 files changed, 61 insertions(+), 96 deletions(-)
delete mode 100644 cs3/ocm/core/v1beta1/resources.proto
diff --git a/cs3/ocm/core/v1beta1/ocm_core_api.proto b/cs3/ocm/core/v1beta1/ocm_core_api.proto
index bb667271..7355cec6 100644
--- a/cs3/ocm/core/v1beta1/ocm_core_api.proto
+++ b/cs3/ocm/core/v1beta1/ocm_core_api.proto
@@ -29,10 +29,10 @@ option objc_class_prefix = "COC";
option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";
import "cs3/identity/user/v1beta1/resources.proto";
-import "cs3/ocm/core/v1beta1/resources.proto";
import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/rpc/v1beta1/status.proto";
import "cs3/types/v1beta1/types.proto";
+import "cs3/sharing/ocm/v1beta1/resources.proto";
// OCM Core API
//
@@ -85,10 +85,10 @@ message CreateOCMCoreShareRequest {
cs3.storage.provider.v1beta1.ResourceType resource_type = 8;
// REQUIRED.
// Recipient share type.
- ShareType share_type = 9;
+ cs3.sharing.ocm.v1beta1.ShareType share_type = 9;
// REQUIRED.
// The protocols which are used to establish synchronisation.
- repeated Protocol protocols = 10;
+ repeated cs3.sharing.ocm.v1beta1.Protocol protocols = 10;
}
message CreateOCMCoreShareResponse {
diff --git a/cs3/ocm/core/v1beta1/resources.proto b/cs3/ocm/core/v1beta1/resources.proto
deleted file mode 100644
index fe467dee..00000000
--- a/cs3/ocm/core/v1beta1/resources.proto
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2018-2019 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.
-
-syntax = "proto3";
-
-package cs3.ocm.core.v1beta1;
-
-option csharp_namespace = "Cs3.Ocm.Core.V1Beta1";
-option go_package = "corev1beta1";
-option java_multiple_files = true;
-option java_outer_classname = "ResourcesProto";
-option java_package = "com.cs3.ocm.core.v1beta1";
-option objc_class_prefix = "COC";
-option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";
-
-import "cs3/sharing/ocm/v1beta1/resources.proto";
-import "cs3/types/v1beta1/types.proto";
-
-// The protocol which is used to establish synchronisation.
-message Protocol {
- // REQUIRED.
- oneof term {
- WebDAVProtocol webdap_options = 1;
- WebappProtocol webapp_options = 2;
- DatatxProtocol datatx_oprions = 3;
- cs3.types.v1beta1.Opaque generic_options = 4;
- }
-}
-
-// Defines the options for the WebDAV protocol.
-message WebDAVProtocol {
- // REQUIRED.
- // Secret used to access the resource.
- string shared_secret = 1;
- // REQUIRED.
- // Permissions of the shared resource.
- cs3.sharing.ocm.v1beta1.SharePermissions permissions = 2;
- // REQUIRED.
- // WebDAV URI used to access the resource.
- string uri = 3;
-}
-
-// Defines the options for the Webapp protocol.
-message WebappProtocol {
- // REQUIRED.
- // Template URI to open the resource with a remote app.
- string uriTemplate = 1;
-}
-
-// Defines the options for the Datatx protocol.
-message DatatxProtocol {
- // REQUIRED.
- // Secret used to access the source of the data transfer.
- string shared_secret = 1;
- // REQUIRED.
- // Source URI for the data transfer.
- string source_uri = 2;
- // REQUIRED.
- // Size in bytes of the source.
- uint64 size = 3;
-}
-
-// Defines the type of share based on its recipient.
-enum ShareType {
- // Share of type user.
- SHARE_TYPE_USER = 0;
- // Share of type group.
- SHARE_TYPE_GROUP = 1;
-}
\ No newline at end of file
diff --git a/cs3/sharing/ocm/v1beta1/resources.proto b/cs3/sharing/ocm/v1beta1/resources.proto
index f3de64fd..d510f3c3 100644
--- a/cs3/sharing/ocm/v1beta1/resources.proto
+++ b/cs3/sharing/ocm/v1beta1/resources.proto
@@ -70,16 +70,12 @@ message Share {
// REQUIRED.
// Last modification time of the share.
cs3.types.v1beta1.Timestamp mtime = 9;
- // Defines the type of share based on its origin.
- enum ShareType {
- SHARE_TYPE_INVALID = 0;
- // A regular file or folder share.
- SHARE_TYPE_REGULAR = 1;
- // A file or folder transfer.
- SHARE_TYPE_TRANSFER = 2;
- }
- // Specifies the type of the share.
+ // REQUIRED.
+ // Recipient share type.
ShareType share_type = 10;
+ // REQUIRED.
+ // The protocols which are used to establish synchronisation.
+ repeated Protocol protocols = 11;
}
// The permissions for a share.
@@ -176,3 +172,56 @@ message ShareGrant {
// The share permissions for the grant.
SharePermissions permissions = 2;
}
+
+// Defines the type of share based on its recipient.
+enum ShareType {
+ // Share of type user.
+ SHARE_TYPE_USER = 0;
+ // Share of type group.
+ SHARE_TYPE_GROUP = 1;
+}
+
+
+// The protocol which is used to establish synchronisation.
+message Protocol {
+ // REQUIRED.
+ oneof term {
+ WebDAVProtocol webdap_options = 1;
+ WebappProtocol webapp_options = 2;
+ DatatxProtocol datatx_oprions = 3;
+ cs3.types.v1beta1.Opaque generic_options = 4;
+ }
+}
+
+// Defines the options for the WebDAV protocol.
+message WebDAVProtocol {
+ // REQUIRED.
+ // Secret used to access the resource.
+ string shared_secret = 1;
+ // REQUIRED.
+ // Permissions of the shared resource.
+ cs3.sharing.ocm.v1beta1.SharePermissions permissions = 2;
+ // REQUIRED.
+ // WebDAV URI used to access the resource.
+ string uri = 3;
+}
+
+// Defines the options for the Webapp protocol.
+message WebappProtocol {
+ // REQUIRED.
+ // Template URI to open the resource with a remote app.
+ string uriTemplate = 1;
+}
+
+// Defines the options for the Datatx protocol.
+message DatatxProtocol {
+ // REQUIRED.
+ // Secret used to access the source of the data transfer.
+ string shared_secret = 1;
+ // REQUIRED.
+ // Source URI for the data transfer.
+ string source_uri = 2;
+ // REQUIRED.
+ // Size in bytes of the source.
+ uint64 size = 3;
+}
\ No newline at end of file
From a6b1d6c73f45a08b99b738d5362d71a212913e1a Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Thu, 2 Feb 2023 14:36:20 +0100
Subject: [PATCH 05/11] splitted created share to received share
---
cs3/app/provider/v1beta1/provider_api.proto | 15 ---
cs3/app/provider/v1beta1/resources.proto | 16 +++
cs3/ocm/core/v1beta1/ocm_core_api.proto | 5 +-
cs3/sharing/ocm/v1beta1/ocm_api.proto | 9 +-
cs3/sharing/ocm/v1beta1/resources.proto | 116 ++++++++++++++------
5 files changed, 110 insertions(+), 51 deletions(-)
diff --git a/cs3/app/provider/v1beta1/provider_api.proto b/cs3/app/provider/v1beta1/provider_api.proto
index fd5bfe18..567323ce 100644
--- a/cs3/app/provider/v1beta1/provider_api.proto
+++ b/cs3/app/provider/v1beta1/provider_api.proto
@@ -67,21 +67,6 @@ message OpenInAppRequest {
storage.provider.v1beta1.ResourceInfo resource_info = 2;
// REQUIRED.
// View mode.
- enum ViewMode {
- VIEW_MODE_INVALID = 0;
- // The resource can be opened but not downloaded.
- VIEW_MODE_VIEW_ONLY = 1;
- // The resource can be downloaded.
- VIEW_MODE_READ_ONLY = 2;
- // The resource can be downloaded and updated. The underlying application
- // MUST be a fully capable editor to support this mode.
- VIEW_MODE_READ_WRITE = 3;
- // The resource can be downloaded and updated, but must be shown in
- // preview mode. If the underlying application does not support a preview mode,
- // or if in a view-only mode users are not allowed to switch to edit mode,
- // then this mode MUST fall back to READ_WRITE.
- VIEW_MODE_PREVIEW = 4;
- }
ViewMode view_mode = 3;
// REQUIRED.
// The access token this application provider will use when contacting
diff --git a/cs3/app/provider/v1beta1/resources.proto b/cs3/app/provider/v1beta1/resources.proto
index b27901d8..7b1c1dce 100644
--- a/cs3/app/provider/v1beta1/resources.proto
+++ b/cs3/app/provider/v1beta1/resources.proto
@@ -45,3 +45,19 @@ message OpenInAppURL {
// The headers to be added to the request.
map headers = 4;
}
+
+enum ViewMode {
+ VIEW_MODE_INVALID = 0;
+ // The resource can be opened but not downloaded.
+ VIEW_MODE_VIEW_ONLY = 1;
+ // The resource can be downloaded.
+ VIEW_MODE_READ_ONLY = 2;
+ // The resource can be downloaded and updated. The underlying application
+ // MUST be a fully capable editor to support this mode.
+ VIEW_MODE_READ_WRITE = 3;
+ // The resource can be downloaded and updated, but must be shown in
+ // preview mode. If the underlying application does not support a preview mode,
+ // or if in a view-only mode users are not allowed to switch to edit mode,
+ // then this mode MUST fall back to READ_WRITE.
+ VIEW_MODE_PREVIEW = 4;
+}
\ No newline at end of file
diff --git a/cs3/ocm/core/v1beta1/ocm_core_api.proto b/cs3/ocm/core/v1beta1/ocm_core_api.proto
index 7355cec6..1a86a2f9 100644
--- a/cs3/ocm/core/v1beta1/ocm_core_api.proto
+++ b/cs3/ocm/core/v1beta1/ocm_core_api.proto
@@ -86,9 +86,12 @@ message CreateOCMCoreShareRequest {
// REQUIRED.
// Recipient share type.
cs3.sharing.ocm.v1beta1.ShareType share_type = 9;
+ // OPTIONAL.
+ // The expiration time for the ocm share.
+ cs3.types.v1beta1.Timestamp expiration = 10;
// REQUIRED.
// The protocols which are used to establish synchronisation.
- repeated cs3.sharing.ocm.v1beta1.Protocol protocols = 10;
+ repeated cs3.sharing.ocm.v1beta1.Protocol protocols = 11;
}
message CreateOCMCoreShareResponse {
diff --git a/cs3/sharing/ocm/v1beta1/ocm_api.proto b/cs3/sharing/ocm/v1beta1/ocm_api.proto
index ed5592dd..06611755 100644
--- a/cs3/sharing/ocm/v1beta1/ocm_api.proto
+++ b/cs3/sharing/ocm/v1beta1/ocm_api.proto
@@ -91,11 +91,16 @@ message CreateOCMShareRequest {
// The unique identifier for the shared storage resource.
storage.provider.v1beta1.ResourceId resource_id = 2;
// REQUIRED.
- // The share grant for the share.
- ShareGrant grant = 3;
+ // The grantee for the share.
+ storage.provider.v1beta1.Grantee grantee = 3;
// REQUIRED.
// The details of the recipient user's mesh provider.
cs3.ocm.provider.v1beta1.ProviderInfo recipient_mesh_provider = 4;
+ // REQUIRED.
+ repeated AccessMethod access_methods = 5;
+ // OPTIONAL.
+ // The expiration time for the ocm share.
+ cs3.types.v1beta1.Timestamp expiration = 6;
}
message CreateOCMShareResponse {
diff --git a/cs3/sharing/ocm/v1beta1/resources.proto b/cs3/sharing/ocm/v1beta1/resources.proto
index d510f3c3..8251f594 100644
--- a/cs3/sharing/ocm/v1beta1/resources.proto
+++ b/cs3/sharing/ocm/v1beta1/resources.proto
@@ -31,24 +31,24 @@ option php_namespace = "Cs3\\Sharing\\Ocm\\V1Beta1";
import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/types/v1beta1/types.proto";
+import "cs3/app/provider/v1beta1/resources.proto";
// Shares are relationships between a resource owner
-// (usually the authenticated user) who grants permissions to a recipient (grantee)
-// on a specified resource (resource_id). UserShares represents both user and groups.
+// (usually the authenticated user) who grants permissions to a recipient
+// (grantee) on a specified resource (resource_id). UserShares represents both
+// user and groups.
message Share {
// REQUIRED.
// Opaque unique identifier of the share.
ShareId id = 1;
// REQUIRED.
- // Unique identifier of the shared resource.
- storage.provider.v1beta1.ResourceId resource_id = 2;
+ // The unlisted token to give access to the ocm share.
+ string token = 2;
// REQUIRED.
// Name of the shared resource.
string name = 3;
// REQUIRED.
- // Permissions for the grantee to use
- // the resource.
- SharePermissions permissions = 4;
+ storage.provider.v1beta1.ResourceId resource_id = 4;
// REQUIRED.
// The receiver of the share, like a user, group ...
storage.provider.v1beta1.Grantee grantee = 5;
@@ -70,12 +70,16 @@ message Share {
// REQUIRED.
// Last modification time of the share.
cs3.types.v1beta1.Timestamp mtime = 9;
+ // OPTIONAL.
+ // The expiration time for the ocm share.
+ cs3.types.v1beta1.Timestamp expiration = 10;
// REQUIRED.
// Recipient share type.
- ShareType share_type = 10;
+ cs3.sharing.ocm.v1beta1.ShareType share_type = 11;
// REQUIRED.
- // The protocols which are used to establish synchronisation.
- repeated Protocol protocols = 11;
+ repeated AccessMethod access_methods = 12;
+ // OPTIONAL.
+ cs3.types.v1beta1.Opaque opaque = 13;
}
// The permissions for a share.
@@ -85,19 +89,49 @@ message SharePermissions {
}
// A received share is the share that a grantee will receive.
-// It expands the original share by adding state to the share,
-// a display name from the perspective of the grantee and a
-// resource mount point in case the share will be mounted
-// in a storage provider.
message ReceivedShare {
// REQUIRED.
- Share share = 1;
+ // Opaque unique identifier of the share.
+ ShareId id = 1;
+ // REQUIRED.
+ // Name of the shared resource.
+ string name = 2;
// REQUIRED.
- // The state of the share.
- ShareState state = 2;
+ storage.provider.v1beta1.ResourceId resource_id = 3;
+ // REQUIRED.
+ // The receiver of the share, like a user, group ...
+ storage.provider.v1beta1.Grantee grantee = 4;
+ // REQUIRED.
+ // Uniquely identifies the owner of the share
+ // (the resource owner at the time of creating the share).
+ // In case the ownership of the underlying resource changes
+ // the share owner field MAY change to reflect the change of ownsership.
+ cs3.identity.user.v1beta1.UserId owner = 5;
+ // REQUIRED.
+ // Uniquely identifies a principal who initiates the share creation.
+ // A creator can create shares on behalf of the owner (because of re-sharing,
+ // because belonging to special groups, ...).
+ // Creator and owner often result in being the same principal.
+ cs3.identity.user.v1beta1.UserId creator = 6;
+ // REQUIRED.
+ // Creation time of the share.
+ cs3.types.v1beta1.Timestamp ctime = 7;
// REQUIRED.
- // The mount point of the share.
- storage.provider.v1beta1.Reference mount_point = 3;
+ // Last modification time of the share.
+ cs3.types.v1beta1.Timestamp mtime = 8;
+ // OPTIONAL.
+ // The expiration time for the ocm share.
+ cs3.types.v1beta1.Timestamp expiration = 9;
+ // REQUIRED.
+ // Recipient share type.
+ cs3.sharing.ocm.v1beta1.ShareType share_type = 10;
+ // REQUIRED.
+ repeated Protocol protocols = 11;
+ // REQUIRED.
+ // The state of the share.
+ ShareState state = 12;
+ // OPTIONAL.
+ cs3.types.v1beta1.Opaque opaque = 13;
}
// The state of the share.
@@ -131,11 +165,11 @@ enum ShareState {
// 4) The grantee for the share = Grantee("type" = "user", "" => "Bob")
message ShareKey {
// REQUIRED.
- cs3.identity.user.v1beta1.UserId owner = 2;
+ cs3.identity.user.v1beta1.UserId owner = 1;
// REQUIRED.
- storage.provider.v1beta1.ResourceId resource_id = 3;
+ storage.provider.v1beta1.ResourceId resource_id = 2;
// REQUIRED.
- storage.provider.v1beta1.Grantee grantee = 4;
+ storage.provider.v1beta1.Grantee grantee = 3;
}
// A share id identifies uniquely a // share in the share provider namespace.
@@ -145,7 +179,7 @@ message ShareId {
// The internal id used by service implementor to
// uniquely identity the share in the internal
// implementation of the service.
- string opaque_id = 2;
+ string opaque_id = 1;
}
// The mechanism to identify a share
@@ -173,15 +207,6 @@ message ShareGrant {
SharePermissions permissions = 2;
}
-// Defines the type of share based on its recipient.
-enum ShareType {
- // Share of type user.
- SHARE_TYPE_USER = 0;
- // Share of type group.
- SHARE_TYPE_GROUP = 1;
-}
-
-
// The protocol which is used to establish synchronisation.
message Protocol {
// REQUIRED.
@@ -224,4 +249,29 @@ message DatatxProtocol {
// REQUIRED.
// Size in bytes of the source.
uint64 size = 3;
-}
\ No newline at end of file
+}
+
+// Defines the type of share based on its recipient.
+enum ShareType {
+ // Share of type user.
+ SHARE_TYPE_USER = 0;
+ // Share of type group.
+ SHARE_TYPE_GROUP = 1;
+}
+
+message AccessMethod {
+ oneof term {
+ WebDAVAccessMethod webdav_options = 1;
+ WebappAccessMethod webapp_options = 2;
+ DatatxAccessMethod datatx_options = 3;
+ cs3.types.v1beta1.Opaque generic_options = 4;
+ }
+}
+
+message WebDAVAccessMethod {
+ storage.provider.v1beta1.ResourcePermissions permissions = 2;
+}
+
+message WebappAccessMethod { cs3.app.provider.v1beta1.ViewMode view_mode = 2; }
+
+message DatatxAccessMethod {}
\ No newline at end of file
From 9b78734287bb5d6588adcd09717e6c47b4d4240f Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Tue, 7 Feb 2023 15:06:48 +0100
Subject: [PATCH 06/11] updated proto.lock
---
proto.lock | 406 +++++++++++++++++++++++++++++++++++++----------------
1 file changed, 285 insertions(+), 121 deletions(-)
diff --git a/proto.lock b/proto.lock
index 5fbd575b..f4b8ff27 100644
--- a/proto.lock
+++ b/proto.lock
@@ -352,32 +352,6 @@
{
"protopath": "cs3:/:app:/:provider:/:v1beta1:/:provider_api.proto",
"def": {
- "enums": [
- {
- "name": "OpenInAppRequest.ViewMode",
- "enum_fields": [
- {
- "name": "VIEW_MODE_INVALID"
- },
- {
- "name": "VIEW_MODE_VIEW_ONLY",
- "integer": 1
- },
- {
- "name": "VIEW_MODE_READ_ONLY",
- "integer": 2
- },
- {
- "name": "VIEW_MODE_READ_WRITE",
- "integer": 3
- },
- {
- "name": "VIEW_MODE_PREVIEW",
- "integer": 4
- }
- ]
- }
- ],
"messages": [
{
"name": "OpenInAppRequest",
@@ -489,6 +463,32 @@
{
"protopath": "cs3:/:app:/:provider:/:v1beta1:/:resources.proto",
"def": {
+ "enums": [
+ {
+ "name": "ViewMode",
+ "enum_fields": [
+ {
+ "name": "VIEW_MODE_INVALID"
+ },
+ {
+ "name": "VIEW_MODE_VIEW_ONLY",
+ "integer": 1
+ },
+ {
+ "name": "VIEW_MODE_READ_ONLY",
+ "integer": 2
+ },
+ {
+ "name": "VIEW_MODE_READ_WRITE",
+ "integer": 3
+ },
+ {
+ "name": "VIEW_MODE_PREVIEW",
+ "integer": 4
+ }
+ ]
+ }
+ ],
"messages": [
{
"name": "OpenInAppURL",
@@ -3469,7 +3469,7 @@
},
{
"id": 4,
- "name": "provider_id",
+ "name": "resource_id",
"type": "string"
},
{
@@ -3479,13 +3479,34 @@
},
{
"id": 6,
- "name": "share_with",
+ "name": "sender",
"type": "cs3.identity.user.v1beta1.UserId"
},
{
"id": 7,
- "name": "protocol",
- "type": "Protocol"
+ "name": "share_with",
+ "type": "cs3.identity.user.v1beta1.UserId"
+ },
+ {
+ "id": 8,
+ "name": "resource_type",
+ "type": "cs3.storage.provider.v1beta1.ResourceType"
+ },
+ {
+ "id": 9,
+ "name": "share_type",
+ "type": "cs3.sharing.ocm.v1beta1.ShareType"
+ },
+ {
+ "id": 10,
+ "name": "expiration",
+ "type": "cs3.types.v1beta1.Timestamp"
+ },
+ {
+ "id": 11,
+ "name": "protocols",
+ "type": "cs3.sharing.ocm.v1beta1.Protocol",
+ "is_repeated": true
}
]
},
@@ -3532,73 +3553,16 @@
"path": "cs3/identity/user/v1beta1/resources.proto"
},
{
- "path": "cs3/ocm/core/v1beta1/resources.proto"
+ "path": "cs3/storage/provider/v1beta1/resources.proto"
},
{
"path": "cs3/rpc/v1beta1/status.proto"
},
{
"path": "cs3/types/v1beta1/types.proto"
- }
- ],
- "package": {
- "name": "cs3.ocm.core.v1beta1"
- },
- "options": [
- {
- "name": "csharp_namespace",
- "value": "Cs3.Ocm.Core.V1Beta1"
},
{
- "name": "go_package",
- "value": "corev1beta1"
- },
- {
- "name": "java_multiple_files",
- "value": "true"
- },
- {
- "name": "java_outer_classname",
- "value": "OcmCoreApiProto"
- },
- {
- "name": "java_package",
- "value": "com.cs3.ocm.core.v1beta1"
- },
- {
- "name": "objc_class_prefix",
- "value": "COC"
- },
- {
- "name": "php_namespace",
- "value": "Cs3\\\\Ocm\\\\Core\\\\V1Beta1"
- }
- ]
- }
- },
- {
- "protopath": "cs3:/:ocm:/:core:/:v1beta1:/:resources.proto",
- "def": {
- "messages": [
- {
- "name": "Protocol",
- "fields": [
- {
- "id": 1,
- "name": "name",
- "type": "string"
- },
- {
- "id": 2,
- "name": "opaque",
- "type": "cs3.types.v1beta1.Opaque"
- }
- ]
- }
- ],
- "imports": [
- {
- "path": "cs3/types/v1beta1/types.proto"
+ "path": "cs3/sharing/ocm/v1beta1/resources.proto"
}
],
"package": {
@@ -3619,7 +3583,7 @@
},
{
"name": "java_outer_classname",
- "value": "ResourcesProto"
+ "value": "OcmCoreApiProto"
},
{
"name": "java_package",
@@ -6333,13 +6297,24 @@
},
{
"id": 3,
- "name": "grant",
- "type": "ShareGrant"
+ "name": "grantee",
+ "type": "storage.provider.v1beta1.Grantee"
},
{
"id": 4,
"name": "recipient_mesh_provider",
"type": "cs3.ocm.provider.v1beta1.ProviderInfo"
+ },
+ {
+ "id": 5,
+ "name": "access_methods",
+ "type": "AccessMethod",
+ "is_repeated": true
+ },
+ {
+ "id": 6,
+ "name": "expiration",
+ "type": "cs3.types.v1beta1.Timestamp"
}
]
},
@@ -6786,38 +6761,34 @@
"def": {
"enums": [
{
- "name": "Share.ShareType",
+ "name": "ShareState",
"enum_fields": [
{
- "name": "SHARE_TYPE_INVALID"
+ "name": "SHARE_STATE_INVALID"
},
{
- "name": "SHARE_TYPE_REGULAR",
+ "name": "SHARE_STATE_PENDING",
"integer": 1
},
{
- "name": "SHARE_TYPE_TRANSFER",
+ "name": "SHARE_STATE_ACCEPTED",
"integer": 2
+ },
+ {
+ "name": "SHARE_STATE_REJECTED",
+ "integer": 3
}
]
},
{
- "name": "ShareState",
+ "name": "ShareType",
"enum_fields": [
{
- "name": "SHARE_STATE_INVALID"
+ "name": "SHARE_TYPE_USER"
},
{
- "name": "SHARE_STATE_PENDING",
+ "name": "SHARE_TYPE_GROUP",
"integer": 1
- },
- {
- "name": "SHARE_STATE_ACCEPTED",
- "integer": 2
- },
- {
- "name": "SHARE_STATE_REJECTED",
- "integer": 3
}
]
}
@@ -6833,8 +6804,8 @@
},
{
"id": 2,
- "name": "resource_id",
- "type": "storage.provider.v1beta1.ResourceId"
+ "name": "token",
+ "type": "string"
},
{
"id": 3,
@@ -6843,8 +6814,8 @@
},
{
"id": 4,
- "name": "permissions",
- "type": "SharePermissions"
+ "name": "resource_id",
+ "type": "storage.provider.v1beta1.ResourceId"
},
{
"id": 5,
@@ -6873,8 +6844,24 @@
},
{
"id": 10,
+ "name": "expiration",
+ "type": "cs3.types.v1beta1.Timestamp"
+ },
+ {
+ "id": 11,
"name": "share_type",
- "type": "ShareType"
+ "type": "cs3.sharing.ocm.v1beta1.ShareType"
+ },
+ {
+ "id": 12,
+ "name": "access_methods",
+ "type": "AccessMethod",
+ "is_repeated": true
+ },
+ {
+ "id": 13,
+ "name": "opaque",
+ "type": "cs3.types.v1beta1.Opaque"
}
]
},
@@ -6898,18 +6885,69 @@
"fields": [
{
"id": 1,
- "name": "share",
- "type": "Share"
+ "name": "id",
+ "type": "ShareId"
},
{
"id": 2,
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "id": 3,
+ "name": "resource_id",
+ "type": "storage.provider.v1beta1.ResourceId"
+ },
+ {
+ "id": 4,
+ "name": "grantee",
+ "type": "storage.provider.v1beta1.Grantee"
+ },
+ {
+ "id": 5,
+ "name": "owner",
+ "type": "cs3.identity.user.v1beta1.UserId"
+ },
+ {
+ "id": 6,
+ "name": "creator",
+ "type": "cs3.identity.user.v1beta1.UserId"
+ },
+ {
+ "id": 7,
+ "name": "ctime",
+ "type": "cs3.types.v1beta1.Timestamp"
+ },
+ {
+ "id": 8,
+ "name": "mtime",
+ "type": "cs3.types.v1beta1.Timestamp"
+ },
+ {
+ "id": 9,
+ "name": "expiration",
+ "type": "cs3.types.v1beta1.Timestamp"
+ },
+ {
+ "id": 10,
+ "name": "share_type",
+ "type": "cs3.sharing.ocm.v1beta1.ShareType"
+ },
+ {
+ "id": 11,
+ "name": "protocols",
+ "type": "Protocol",
+ "is_repeated": true
+ },
+ {
+ "id": 12,
"name": "state",
"type": "ShareState"
},
{
- "id": 3,
- "name": "mount_point",
- "type": "storage.provider.v1beta1.Reference"
+ "id": 13,
+ "name": "opaque",
+ "type": "cs3.types.v1beta1.Opaque"
}
]
},
@@ -6917,17 +6955,17 @@
"name": "ShareKey",
"fields": [
{
- "id": 2,
+ "id": 1,
"name": "owner",
"type": "cs3.identity.user.v1beta1.UserId"
},
{
- "id": 3,
+ "id": 2,
"name": "resource_id",
"type": "storage.provider.v1beta1.ResourceId"
},
{
- "id": 4,
+ "id": 3,
"name": "grantee",
"type": "storage.provider.v1beta1.Grantee"
}
@@ -6937,7 +6975,7 @@
"name": "ShareId",
"fields": [
{
- "id": 2,
+ "id": 1,
"name": "opaque_id",
"type": "string"
}
@@ -6972,6 +7010,129 @@
"type": "SharePermissions"
}
]
+ },
+ {
+ "name": "Protocol",
+ "fields": [
+ {
+ "id": 1,
+ "name": "webdap_options",
+ "type": "WebDAVProtocol"
+ },
+ {
+ "id": 2,
+ "name": "webapp_options",
+ "type": "WebappProtocol"
+ },
+ {
+ "id": 3,
+ "name": "datatx_oprions",
+ "type": "DatatxProtocol"
+ },
+ {
+ "id": 4,
+ "name": "generic_options",
+ "type": "cs3.types.v1beta1.Opaque"
+ }
+ ]
+ },
+ {
+ "name": "WebDAVProtocol",
+ "fields": [
+ {
+ "id": 1,
+ "name": "shared_secret",
+ "type": "string"
+ },
+ {
+ "id": 2,
+ "name": "permissions",
+ "type": "cs3.sharing.ocm.v1beta1.SharePermissions"
+ },
+ {
+ "id": 3,
+ "name": "uri",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "WebappProtocol",
+ "fields": [
+ {
+ "id": 1,
+ "name": "uriTemplate",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "DatatxProtocol",
+ "fields": [
+ {
+ "id": 1,
+ "name": "shared_secret",
+ "type": "string"
+ },
+ {
+ "id": 2,
+ "name": "source_uri",
+ "type": "string"
+ },
+ {
+ "id": 3,
+ "name": "size",
+ "type": "uint64"
+ }
+ ]
+ },
+ {
+ "name": "AccessMethod",
+ "fields": [
+ {
+ "id": 1,
+ "name": "webdav_options",
+ "type": "WebDAVAccessMethod"
+ },
+ {
+ "id": 2,
+ "name": "webapp_options",
+ "type": "WebappAccessMethod"
+ },
+ {
+ "id": 3,
+ "name": "datatx_options",
+ "type": "DatatxAccessMethod"
+ },
+ {
+ "id": 4,
+ "name": "generic_options",
+ "type": "cs3.types.v1beta1.Opaque"
+ }
+ ]
+ },
+ {
+ "name": "WebDAVAccessMethod",
+ "fields": [
+ {
+ "id": 2,
+ "name": "permissions",
+ "type": "storage.provider.v1beta1.ResourcePermissions"
+ }
+ ]
+ },
+ {
+ "name": "WebappAccessMethod",
+ "fields": [
+ {
+ "id": 2,
+ "name": "view_mode",
+ "type": "cs3.app.provider.v1beta1.ViewMode"
+ }
+ ]
+ },
+ {
+ "name": "DatatxAccessMethod"
}
],
"imports": [
@@ -6983,6 +7144,9 @@
},
{
"path": "cs3/types/v1beta1/types.proto"
+ },
+ {
+ "path": "cs3/app/provider/v1beta1/resources.proto"
}
],
"package": {
From b31daa79fef8316c834a801d07a4b7fa1348c95b Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Thu, 2 Feb 2023 16:08:16 +0100
Subject: [PATCH 07/11] updated proto.lock
---
cs3/app/provider/v1beta1/resources.proto | 2 +-
cs3/ocm/core/v1beta1/ocm_core_api.proto | 4 ++--
cs3/sharing/ocm/v1beta1/resources.proto | 8 +++++---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/cs3/app/provider/v1beta1/resources.proto b/cs3/app/provider/v1beta1/resources.proto
index 7b1c1dce..6a82a025 100644
--- a/cs3/app/provider/v1beta1/resources.proto
+++ b/cs3/app/provider/v1beta1/resources.proto
@@ -60,4 +60,4 @@ enum ViewMode {
// or if in a view-only mode users are not allowed to switch to edit mode,
// then this mode MUST fall back to READ_WRITE.
VIEW_MODE_PREVIEW = 4;
-}
\ No newline at end of file
+}
diff --git a/cs3/ocm/core/v1beta1/ocm_core_api.proto b/cs3/ocm/core/v1beta1/ocm_core_api.proto
index 1a86a2f9..2f04a406 100644
--- a/cs3/ocm/core/v1beta1/ocm_core_api.proto
+++ b/cs3/ocm/core/v1beta1/ocm_core_api.proto
@@ -29,10 +29,10 @@ option objc_class_prefix = "COC";
option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";
import "cs3/identity/user/v1beta1/resources.proto";
-import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/rpc/v1beta1/status.proto";
-import "cs3/types/v1beta1/types.proto";
import "cs3/sharing/ocm/v1beta1/resources.proto";
+import "cs3/storage/provider/v1beta1/resources.proto";
+import "cs3/types/v1beta1/types.proto";
// OCM Core API
//
diff --git a/cs3/sharing/ocm/v1beta1/resources.proto b/cs3/sharing/ocm/v1beta1/resources.proto
index 8251f594..7d7a8c78 100644
--- a/cs3/sharing/ocm/v1beta1/resources.proto
+++ b/cs3/sharing/ocm/v1beta1/resources.proto
@@ -28,10 +28,10 @@ option java_package = "com.cs3.sharing.ocm.v1beta1";
option objc_class_prefix = "CSO";
option php_namespace = "Cs3\\Sharing\\Ocm\\V1Beta1";
+import "cs3/app/provider/v1beta1/resources.proto";
import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/types/v1beta1/types.proto";
-import "cs3/app/provider/v1beta1/resources.proto";
// Shares are relationships between a resource owner
// (usually the authenticated user) who grants permissions to a recipient
@@ -272,6 +272,8 @@ message WebDAVAccessMethod {
storage.provider.v1beta1.ResourcePermissions permissions = 2;
}
-message WebappAccessMethod { cs3.app.provider.v1beta1.ViewMode view_mode = 2; }
+message WebappAccessMethod {
+ cs3.app.provider.v1beta1.ViewMode view_mode = 2;
+}
-message DatatxAccessMethod {}
\ No newline at end of file
+message DatatxAccessMethod {}
From 3165635105aee6fae6830fb4bddb14eb0c2bb1db Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Mon, 6 Feb 2023 11:46:31 +0100
Subject: [PATCH 08/11] fixes for review
---
cs3/app/provider/v1beta1/resources.proto | 1 +
cs3/sharing/ocm/v1beta1/ocm_api.proto | 3 ++
cs3/sharing/ocm/v1beta1/resources.proto | 41 ++++++++++++++++++------
proto.lock | 29 +++++++++++------
4 files changed, 55 insertions(+), 19 deletions(-)
diff --git a/cs3/app/provider/v1beta1/resources.proto b/cs3/app/provider/v1beta1/resources.proto
index 6a82a025..59f69665 100644
--- a/cs3/app/provider/v1beta1/resources.proto
+++ b/cs3/app/provider/v1beta1/resources.proto
@@ -46,6 +46,7 @@ message OpenInAppURL {
map headers = 4;
}
+// Defines the view modes.
enum ViewMode {
VIEW_MODE_INVALID = 0;
// The resource can be opened but not downloaded.
diff --git a/cs3/sharing/ocm/v1beta1/ocm_api.proto b/cs3/sharing/ocm/v1beta1/ocm_api.proto
index 06611755..d6d3d7ea 100644
--- a/cs3/sharing/ocm/v1beta1/ocm_api.proto
+++ b/cs3/sharing/ocm/v1beta1/ocm_api.proto
@@ -113,6 +113,9 @@ message CreateOCMShareResponse {
// REQUIRED.
// The created share.
Share share = 3;
+ // OPTIONAL.
+ // Display name of the recipient of the share.
+ string recipient_display_name = 4;
}
message UpdateOCMShareRequest {
diff --git a/cs3/sharing/ocm/v1beta1/resources.proto b/cs3/sharing/ocm/v1beta1/resources.proto
index 7d7a8c78..84178806 100644
--- a/cs3/sharing/ocm/v1beta1/resources.proto
+++ b/cs3/sharing/ocm/v1beta1/resources.proto
@@ -210,10 +210,17 @@ message ShareGrant {
// The protocol which is used to establish synchronisation.
message Protocol {
// REQUIRED.
+ // One of the protocols MUST be specified.
oneof term {
- WebDAVProtocol webdap_options = 1;
+ // Options for WebDAV protocol.
+ WebDAVProtocol webdav_options = 1;
+ // Options for Webapp protocol.
WebappProtocol webapp_options = 2;
- DatatxProtocol datatx_oprions = 3;
+ // Options for transfer protocol.
+ TransferProtocol transfer_options = 3;
+ // Options for a generic protocol.
+ // Used to implement future protocols
+ // in the OCM specs.
cs3.types.v1beta1.Opaque generic_options = 4;
}
}
@@ -235,11 +242,11 @@ message WebDAVProtocol {
message WebappProtocol {
// REQUIRED.
// Template URI to open the resource with a remote app.
- string uriTemplate = 1;
+ string uri_template = 1;
}
-// Defines the options for the Datatx protocol.
-message DatatxProtocol {
+// Defines the options for the Transfer protocol.
+message TransferProtocol {
// REQUIRED.
// Secret used to access the source of the data transfer.
string shared_secret = 1;
@@ -253,27 +260,43 @@ message DatatxProtocol {
// Defines the type of share based on its recipient.
enum ShareType {
+ SHARE_TYPE_INVALID = 0;
// Share of type user.
- SHARE_TYPE_USER = 0;
+ SHARE_TYPE_USER = 1;
// Share of type group.
- SHARE_TYPE_GROUP = 1;
+ SHARE_TYPE_GROUP = 2;
}
+// Defines how the recipient accesses the share.
message AccessMethod {
+ // REQUIRED.
+ // One of the access method MUST be specified.
oneof term {
+ // Options for the WebDAV access method.
WebDAVAccessMethod webdav_options = 1;
+ // Options for the Webapp access method.
WebappAccessMethod webapp_options = 2;
- DatatxAccessMethod datatx_options = 3;
+ // Options for the Transfer access method.
+ TransferAccessMethod transfer_options = 3;
+ // Options for a generic transfer method.
+ // Used to implement future access methods.
cs3.types.v1beta1.Opaque generic_options = 4;
}
}
+// Defines the options for the WebDAV access method.
message WebDAVAccessMethod {
+ // REQUIRED.
+ // The permissions for the share.
storage.provider.v1beta1.ResourcePermissions permissions = 2;
}
+// Defines the options for the Webapp access method.
message WebappAccessMethod {
+ // REQUIRED.
+ // The view mode for the share.
cs3.app.provider.v1beta1.ViewMode view_mode = 2;
}
-message DatatxAccessMethod {}
+// Defines the options for the Transfer access method.
+message TransferAccessMethod {}
diff --git a/proto.lock b/proto.lock
index f4b8ff27..34ffaede 100644
--- a/proto.lock
+++ b/proto.lock
@@ -6335,6 +6335,11 @@
"id": 3,
"name": "share",
"type": "Share"
+ },
+ {
+ "id": 4,
+ "name": "recipient_display_name",
+ "type": "string"
}
]
},
@@ -6784,11 +6789,15 @@
"name": "ShareType",
"enum_fields": [
{
- "name": "SHARE_TYPE_USER"
+ "name": "SHARE_TYPE_INVALID"
},
{
- "name": "SHARE_TYPE_GROUP",
+ "name": "SHARE_TYPE_USER",
"integer": 1
+ },
+ {
+ "name": "SHARE_TYPE_GROUP",
+ "integer": 2
}
]
}
@@ -7016,7 +7025,7 @@
"fields": [
{
"id": 1,
- "name": "webdap_options",
+ "name": "webdav_options",
"type": "WebDAVProtocol"
},
{
@@ -7026,8 +7035,8 @@
},
{
"id": 3,
- "name": "datatx_oprions",
- "type": "DatatxProtocol"
+ "name": "transfer_options",
+ "type": "TransferProtocol"
},
{
"id": 4,
@@ -7061,13 +7070,13 @@
"fields": [
{
"id": 1,
- "name": "uriTemplate",
+ "name": "uri_template",
"type": "string"
}
]
},
{
- "name": "DatatxProtocol",
+ "name": "TransferProtocol",
"fields": [
{
"id": 1,
@@ -7101,8 +7110,8 @@
},
{
"id": 3,
- "name": "datatx_options",
- "type": "DatatxAccessMethod"
+ "name": "transfer_options",
+ "type": "TransferAccessMethod"
},
{
"id": 4,
@@ -7132,7 +7141,7 @@
]
},
{
- "name": "DatatxAccessMethod"
+ "name": "TransferAccessMethod"
}
],
"imports": [
From f27a133fbf6da37807de9d9eb9e84ee31c70c900 Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Mon, 6 Feb 2023 11:50:19 +0100
Subject: [PATCH 09/11] revert position of resource_id field in share message
---
cs3/sharing/ocm/v1beta1/resources.proto | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/cs3/sharing/ocm/v1beta1/resources.proto b/cs3/sharing/ocm/v1beta1/resources.proto
index 84178806..d2bd23fd 100644
--- a/cs3/sharing/ocm/v1beta1/resources.proto
+++ b/cs3/sharing/ocm/v1beta1/resources.proto
@@ -42,13 +42,14 @@ message Share {
// Opaque unique identifier of the share.
ShareId id = 1;
// REQUIRED.
- // The unlisted token to give access to the ocm share.
- string token = 2;
+ // Unique identifier of the shared resource.
+ storage.provider.v1beta1.ResourceId resource_id = 2;
// REQUIRED.
// Name of the shared resource.
string name = 3;
// REQUIRED.
- storage.provider.v1beta1.ResourceId resource_id = 4;
+ // The unlisted token to give access to the ocm share.
+ string token = 4;
// REQUIRED.
// The receiver of the share, like a user, group ...
storage.provider.v1beta1.Grantee grantee = 5;
From c55fb0fd2288af895d58c97641e00f0d31302ee1 Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Mon, 6 Feb 2023 11:51:49 +0100
Subject: [PATCH 10/11] update proto.lock
---
proto.lock | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/proto.lock b/proto.lock
index 34ffaede..6be96b6e 100644
--- a/proto.lock
+++ b/proto.lock
@@ -6813,8 +6813,8 @@
},
{
"id": 2,
- "name": "token",
- "type": "string"
+ "name": "resource_id",
+ "type": "storage.provider.v1beta1.ResourceId"
},
{
"id": 3,
@@ -6823,8 +6823,8 @@
},
{
"id": 4,
- "name": "resource_id",
- "type": "storage.provider.v1beta1.ResourceId"
+ "name": "token",
+ "type": "string"
},
{
"id": 5,
From 0e99527e3e22f60942a0ccbce7ef99747f3d9ccc Mon Sep 17 00:00:00 2001
From: Gianmaria Del Monte
Date: Tue, 7 Feb 2023 15:10:27 +0100
Subject: [PATCH 11/11] updated docs
---
docs/index.html | 746 ++++++++++++++++++++++++++++++++++++------------
1 file changed, 567 insertions(+), 179 deletions(-)
diff --git a/docs/index.html b/docs/index.html
index ece79492..491c6db4 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -566,10 +566,6 @@ Table of Contents
-
- EOpenInAppRequest.ViewMode
-
-
@@ -597,6 +593,10 @@ Table of Contents
+
+ EViewMode
+
+
@@ -1018,21 +1018,6 @@ Table of Contents
-
- cs3/ocm/core/v1beta1/resources.proto
-
-
-
-
cs3/ocm/invite/v1beta1/invite_api.proto
+
+ MTransferAccessMethod
+
+
+
+ MTransferProtocol
+
+
+
+ MWebDAVAccessMethod
+
+
+
+ MWebDAVProtocol
+
+
+
+ MWebappAccessMethod
+
- EShare.ShareType
+ MWebappProtocol
+
EShareState
+
+ EShareType
+
+
@@ -5529,9 +5546,10 @@ OpenInAppRequest
view_mode |
- OpenInAppRequest.ViewMode |
+ ViewMode |
|
- |
+ REQUIRED.
+View mode. |
@@ -5600,51 +5618,6 @@ OpenInAppResponse
- OpenInAppRequest.ViewMode
- REQUIRED.
View mode.
-
-
- Name | Number | Description |
-
-
-
-
- VIEW_MODE_INVALID |
- 0 |
- |
-
-
-
- VIEW_MODE_VIEW_ONLY |
- 1 |
- The resource can be opened but not downloaded. |
-
-
-
- VIEW_MODE_READ_ONLY |
- 2 |
- The resource can be downloaded. |
-
-
-
- VIEW_MODE_READ_WRITE |
- 3 |
- The resource can be downloaded and updated. The underlying application
-MUST be a fully capable editor to support this mode. |
-
-
-
- VIEW_MODE_PREVIEW |
- 4 |
- The resource can be downloaded and updated, but must be shown in
-preview mode. If the underlying application does not support a preview mode,
-or if in a view-only mode users are not allowed to switch to edit mode,
-then this mode MUST fall back to READ_WRITE. |
-
-
-
-
-
@@ -5792,6 +5765,51 @@ Defines the view modes.
+
+
+ Name | Number | Description |
+
+
+
+
+ VIEW_MODE_INVALID |
+ 0 |
+ |
+
+
+
+ VIEW_MODE_VIEW_ONLY |
+ 1 |
+ The resource can be opened but not downloaded. |
+
+
+
+ VIEW_MODE_READ_ONLY |
+ 2 |
+ The resource can be downloaded. |
+
+
+
+ VIEW_MODE_READ_WRITE |
+ 3 |
+ The resource can be downloaded and updated. The underlying application
+MUST be a fully capable editor to support this mode. |
+
+
+
+ VIEW_MODE_PREVIEW |
+ 4 |
+ The resource can be downloaded and updated, but must be shown in
+preview mode. If the underlying application does not support a preview mode,
+or if in a view-only mode users are not allowed to switch to edit mode,
+then this mode MUST fall back to READ_WRITE. |
+
+
+
+
+
@@ -8742,7 +8760,7 @@ CreateOCMCoreShareReques
- provider_id |
+ resource_id |
string |
|
REQUIRED.
@@ -8754,6 +8772,14 @@ CreateOCMCoreShareReques
cs3.identity.user.v1beta1.UserId |
|
REQUIRED.
+Provider specific identifier of the owner of the resource. |
+ |
+
+
+ sender |
+ cs3.identity.user.v1beta1.UserId |
+ |
+ REQUIRED.
Provider specific identifier of the user that wants to share the resource. |
@@ -8769,11 +8795,35 @@ CreateOCMCoreShareReques
- protocol |
- Protocol |
+ resource_type |
+ cs3.storage.provider.v1beta1.ResourceType |
+ |
+ REQUIRED.
+Resource type. |
+
+
+
+ share_type |
+ cs3.sharing.ocm.v1beta1.ShareType |
+ |
+ REQUIRED.
+Recipient share type. |
+
+
+
+ expiration |
+ cs3.types.v1beta1.Timestamp |
|
+ OPTIONAL.
+The expiration time for the ocm share. |
+
+
+
+ protocols |
+ cs3.sharing.ocm.v1beta1.Protocol |
+ repeated |
REQUIRED.
-The protocol which is used to establish synchronisation. |
+The protocols which are used to establish synchronisation.
@@ -8858,54 +8908,6 @@ OcmCoreAPI
-
-
cs3/ocm/core/v1beta1/resources.proto
Top
-
-
-
-
- Protocol
- The protocol which is used to establish synchronisation.
-
-
-
-
- Field | Type | Label | Description |
-
-
-
-
- name |
- string |
- |
- REQUIRED.
-The name of the protocol to use. |
-
-
-
- opaque |
- cs3.types.v1beta1.Opaque |
- |
- REQUIRED.
-JSON object with protocol specific options,
-e.g. uri, access_token, password, permissions etc. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
cs3/ocm/invite/v1beta1/invite_api.proto
Top
@@ -12465,11 +12467,11 @@ CreateOCMShareRequest
- grant |
- ShareGrant |
+ grantee |
+ cs3.storage.provider.v1beta1.Grantee |
|
REQUIRED.
-The share grant for the share. |
+The grantee for the share.
@@ -12480,6 +12482,21 @@ CreateOCMShareRequest
+
+ access_methods |
+ AccessMethod |
+ repeated |
+ REQUIRED. |
+
+
+
+ expiration |
+ cs3.types.v1beta1.Timestamp |
+ |
+ OPTIONAL.
+The expiration time for the ocm share. |
+
+
@@ -12521,6 +12538,14 @@ CreateOCMShareResponse
The created share.
+
+ recipient_display_name |
+ string |
+ |
+ OPTIONAL.
+Display name of the recipient of the share. |
+
+
@@ -13310,8 +13335,8 @@ cs3/sharing/ocm/v1beta1/resourc
- ReceivedShare
- A received share is the share that a grantee will receive.
It expands the original share by adding state to the share,
a display name from the perspective of the grantee and a
resource mount point in case the share will be mounted
in a storage provider.
+ AccessMethod
+ Defines how the recipient accesses the share.
@@ -13321,26 +13346,32 @@ ReceivedShare
- share |
- Share |
+ webdav_options |
+ WebDAVAccessMethod |
|
- REQUIRED. |
+ Options for the WebDAV access method. |
- state |
- ShareState |
+ webapp_options |
+ WebappAccessMethod |
|
- REQUIRED.
-The state of the share. |
+ Options for the Webapp access method. |
- mount_point |
- cs3.storage.provider.v1beta1.Reference |
+ transfer_options |
+ TransferAccessMethod |
|
- REQUIRED.
-The mount point of the share. |
+ Options for the Transfer access method. |
+
+
+
+ generic_options |
+ cs3.types.v1beta1.Opaque |
+ |
+ Options for a generic transfer method.
+Used to implement future access methods. |
@@ -13350,8 +13381,8 @@ ReceivedShare
- Share
- Shares are relationships between a resource owner
(usually the authenticated user) who grants permissions to a recipient (grantee)
on a specified resource (resource_id). UserShares represents both user and groups.
+ Protocol
+ The protocol which is used to establish synchronisation.
+
+
+
+
+
+ ReceivedShare
+ A received share is the share that a grantee will receive.
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ id |
+ ShareId |
+ |
+ REQUIRED.
+Opaque unique identifier of the share. |
+
+
+
+ name |
+ string |
|
REQUIRED.
Name of the shared resource. |
- permissions |
- SharePermissions |
+ resource_id |
+ cs3.storage.provider.v1beta1.ResourceId |
+ |
+ REQUIRED. |
+
+
+
+ grantee |
+ cs3.storage.provider.v1beta1.Grantee |
|
REQUIRED.
-Permissions for the grantee to use
-the resource. |
+The receiver of the share, like a user, group ...
+
+
+
+ owner |
+ cs3.identity.user.v1beta1.UserId |
+ |
+ REQUIRED.
+Uniquely identifies the owner of the share
+(the resource owner at the time of creating the share).
+In case the ownership of the underlying resource changes
+the share owner field MAY change to reflect the change of ownsership. |
+
+
+
+ creator |
+ cs3.identity.user.v1beta1.UserId |
+ |
+ REQUIRED.
+Uniquely identifies a principal who initiates the share creation.
+A creator can create shares on behalf of the owner (because of re-sharing,
+because belonging to special groups, ...).
+Creator and owner often result in being the same principal. |
+
+
+
+ ctime |
+ cs3.types.v1beta1.Timestamp |
+ |
+ REQUIRED.
+Creation time of the share. |
+
+
+
+ mtime |
+ cs3.types.v1beta1.Timestamp |
+ |
+ REQUIRED.
+Last modification time of the share. |
+
+
+
+ expiration |
+ cs3.types.v1beta1.Timestamp |
+ |
+ OPTIONAL.
+The expiration time for the ocm share. |
+
+
+
+ share_type |
+ ShareType |
+ |
+ REQUIRED.
+Recipient share type. |
+
+
+
+ protocols |
+ Protocol |
+ repeated |
+ REQUIRED. |
+
+
+
+ state |
+ ShareState |
+ |
+ REQUIRED.
+The state of the share. |
+
+
+
+ opaque |
+ cs3.types.v1beta1.Opaque |
+ |
+ OPTIONAL. |
+
+
+
+
+
+
+
+
+
+ Share
+ Shares are relationships between a resource owner
(usually the authenticated user) who grants permissions to a recipient
(grantee) on a specified resource (resource_id). UserShares represents both
user and groups.
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ id |
+ ShareId |
+ |
+ REQUIRED.
+Opaque unique identifier of the share. |
+
+
+
+ resource_id |
+ cs3.storage.provider.v1beta1.ResourceId |
+ |
+ REQUIRED.
+Unique identifier of the shared resource. |
+
+
+
+ name |
+ string |
+ |
+ REQUIRED.
+Name of the shared resource. |
+
+
+
+ token |
+ string |
+ |
+ REQUIRED.
+The unlisted token to give access to the ocm share. |
@@ -13439,11 +13640,34 @@ Share
Last modification time of the share.
+
+ expiration |
+ cs3.types.v1beta1.Timestamp |
+ |
+ OPTIONAL.
+The expiration time for the ocm share. |
+
+
share_type |
- Share.ShareType |
+ ShareType |
+ |
+ REQUIRED.
+Recipient share type. |
+
+
+
+ access_methods |
+ AccessMethod |
+ repeated |
+ REQUIRED. |
+
+
+
+ opaque |
+ cs3.types.v1beta1.Opaque |
|
- Specifies the type of the share. |
+ OPTIONAL. |
@@ -13614,10 +13838,174 @@ ShareReference
+ TransferAccessMethod
+ Defines the options for the Transfer access method.
+
+
+
+
+
+ TransferProtocol
+ Defines the options for the Transfer protocol.
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ shared_secret |
+ string |
+ |
+ REQUIRED.
+Secret used to access the source of the data transfer. |
+
+
+
+ source_uri |
+ string |
+ |
+ REQUIRED.
+Source URI for the data transfer. |
+
+
+
+ size |
+ uint64 |
+ |
+ REQUIRED.
+Size in bytes of the source. |
+
+
+
+
+
+
+
+
+
+ WebDAVAccessMethod
+ Defines the options for the WebDAV access method.
+
+
+
+
+
+
- Share.ShareType
- Defines the type of share based on its origin.
+ WebDAVProtocol
+ Defines the options for the WebDAV protocol.
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ shared_secret |
+ string |
+ |
+ REQUIRED.
+Secret used to access the resource. |
+
+
+
+ permissions |
+ SharePermissions |
+ |
+ REQUIRED.
+Permissions of the shared resource. |
+
+
+
+ uri |
+ string |
+ |
+ REQUIRED.
+WebDAV URI used to access the resource. |
+
+
+
+
+
+
+
+
+
+ WebappAccessMethod
+ Defines the options for the Webapp access method.
+
+
+
+
+
+
+
+
+ WebappProtocol
+ Defines the options for the Webapp protocol.
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ uri_template |
+ string |
+ |
+ REQUIRED.
+Template URI to open the resource with a remote app. |
+
+
+
+
+
+
+
+
+
+
+
+ ShareState
+ The state of the share.
Name | Number | Description |
@@ -13625,28 +14013,38 @@ Share.ShareType
- SHARE_TYPE_INVALID |
+ SHARE_STATE_INVALID |
0 |
- |
+ The share is no longer valid, for example, the share expired. |
- SHARE_TYPE_REGULAR |
+ SHARE_STATE_PENDING |
1 |
- A regular file or folder share. |
+ New shares MUST be created in the SHARE_STATE_PENDING state.
+This state means the share is pending to be accepted or rejected
+by the recipient of the share. |
- SHARE_TYPE_TRANSFER |
+ SHARE_STATE_ACCEPTED |
2 |
- A file or folder transfer. |
+ The recipient of the share has accepted the share. |
+
+
+
+ SHARE_STATE_REJECTED |
+ 3 |
+ The recipient of the share has rejected the share.
+Do not means the share is removed, the recipient MAY
+change the state to accepted or pending. |
- ShareState
- The state of the share.
+ ShareType
+ Defines the type of share based on its recipient.
Name | Number | Description |
@@ -13654,31 +14052,21 @@ ShareState
- SHARE_STATE_INVALID |
+ SHARE_TYPE_INVALID |
0 |
- The share is no longer valid, for example, the share expired. |
+ |
- SHARE_STATE_PENDING |
+ SHARE_TYPE_USER |
1 |
- New shares MUST be created in the SHARE_STATE_PENDING state.
-This state means the share is pending to be accepted or rejected
-by the recipient of the share. |
+ Share of type user. |
- SHARE_STATE_ACCEPTED |
+ SHARE_TYPE_GROUP |
2 |
- The recipient of the share has accepted the share. |
-
-
-
- SHARE_STATE_REJECTED |
- 3 |
- The recipient of the share has rejected the share.
-Do not means the share is removed, the recipient MAY
-change the state to accepted or pending. |
+ Share of type group. |