diff --git a/cs3/sharing/link/v1beta1/link_api.proto b/cs3/sharing/link/v1beta1/link_api.proto index 81b469dc..8fbbb9ec 100644 --- a/cs3/sharing/link/v1beta1/link_api.proto +++ b/cs3/sharing/link/v1beta1/link_api.proto @@ -173,6 +173,9 @@ message ListPublicSharesRequest { // OPTIONAL. // The list of filters to apply if any. repeated Filter filters = 2; + // OPTIONAL. + // If a signature should be included in the share. + bool sign = 3; } message ListPublicSharesResponse { @@ -212,6 +215,9 @@ message GetPublicShareRequest { // REQUIRED. // The reference to which the action should be performed. PublicShareReference ref = 2; + // OPTIONAL. + // If a signature should be included in the share. + bool sign = 3; } message GetPublicShareResponse { @@ -224,9 +230,6 @@ message GetPublicShareResponse { // REQUIRED. // The share. PublicShare share = 3; - // OPTIONAL. - // The share password hash. - string password_hash = 4; } message GetPublicShareByTokenRequest { @@ -237,8 +240,11 @@ message GetPublicShareByTokenRequest { // The unlisted token to identify the public share. string token = 2; // OPTIONAL. - // The public link can be password protected. - string password = 3; + // The public link can require authentication. + PublicShareAuthentication authentication = 3; + // OPTIONAL. + // If a signature should be included in the share. + bool sign = 4; } message GetPublicShareByTokenResponse { @@ -253,5 +259,5 @@ message GetPublicShareByTokenResponse { PublicShare share = 3; // OPTIONAL. // The share password hash. - string password_hash = 4; + string password_hash = 4 [deprecated = true]; } diff --git a/cs3/sharing/link/v1beta1/resources.proto b/cs3/sharing/link/v1beta1/resources.proto index 8f2d9f7a..37db210b 100644 --- a/cs3/sharing/link/v1beta1/resources.proto +++ b/cs3/sharing/link/v1beta1/resources.proto @@ -98,6 +98,11 @@ message PublicShare { // This field is only useful for informational purposes, like for example, // setting the window title in a public share HTML page. string display_name = 11; + // OPTIONAL. + // A time constrained token with which + // GetPublicSharebyToken requests can be + // authenticated. + ShareSignature signature = 12; } // The permissions for a share. @@ -130,6 +135,28 @@ message PublicShareReference { } } +// The mechanism to authenticate a request to +// GetPublicShareByToken. +message PublicShareAuthentication { + oneof spec { + // The password of the share. + string password = 1; + // The signature issued by GetPublicShareByToken. + ShareSignature signature = 2; + } +} + +// A time constrained token which can be used to +// authenticate link share requests. +message ShareSignature { + // REQUIRED. + // The signature value. + string signature = 1; + // REQUIRED. + // The time until the signature becomes invalid. + cs3.types.v1beta1.Timestamp signature_expiration = 2; +} + // Defines the restrictions for the public share. message Grant { // REQUIRED. diff --git a/docs/index.html b/docs/index.html index 0a218d2d..7e87f54d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1103,6 +1103,10 @@
OPTIONAL. +The public link can require authentication.
OPTIONAL. -The public link can be password protected.
Name | +Option | +
password_hash | +true |
+
OPTIONAL. +If a signature should be included in the share.
OPTIONAL. -The share password hash.
OPTIONAL. +If a signature should be included in the share.
OPTIONAL. +A time constrained token with which +GetPublicSharebyToken requests can be +authenticated.
The mechanism to authenticate a request to
GetPublicShareByToken.
+ + +Field | Type | Label | Description |
password | +string | ++ | The password of the share. |
+
signature | +ShareSignature | ++ | The signature issued by GetPublicShareByToken. |
+
A time constrained token which can be used to
authenticate link share requests.
+ + +Field | Type | Label | Description |
signature | +string | ++ | REQUIRED. +The signature value. |
+
signature_expiration | +cs3.types.v1beta1.Timestamp | ++ | REQUIRED. +The time until the signature becomes invalid. |
+