Skip to content

Commit 13558ec

Browse files
committed
Converted datatx from a protocol to an access type
1 parent 7a3cf42 commit 13558ec

File tree

2 files changed

+73
-102
lines changed

2 files changed

+73
-102
lines changed

IETF-RFC.md

Lines changed: 38 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,6 @@ contain the following information about its OCM API:
623623
endpoint. This value is provided for documentation
624624
purposes, and it SHOULD NOT be intended as a prefix
625625
for share requests.
626-
- datatx (string) - The top-level path used for data transfers.
627-
This value is provided for documentation purposes,
628-
and it SHOULD NOT be intended as a prefix. In
629-
addition, implementations are expected to execute
630-
the transfer using WebDAV [RFC4918] as the wire protocol.
631626
- Any additional protocol supported for this Resource type MAY be
632627
advertised here, where the value MAY correspond to
633628
a top-level URI to be used for that protocol.
@@ -773,42 +768,42 @@ To create a Share, the Sending Server SHOULD make a HTTP POST request
773768
* REQUIRED protocol (object)
774769
JSON object with specific options for each protocol.
775770
The supported protocols are: - `webdav`, to access the data -
776-
`webapp`, to access remote web applications - `datatx`, to transfer
777-
the data to the remote endpoint.
778-
779-
Other custom protocols might be added in the future.
780-
781-
In case a single protocol is offered, there are three ways to
782-
specify this object:
783-
Option 1: Set the `name` field to the name of the protocol,
784-
and put the protocol details in a field named `options`.
785-
Option 2: Set the `name` field to the name of the protocol,
786-
and put the protocol details in a field carrying the name of
787-
the protocol.
788-
Option 3: Set the `name` field to `multi`, and put the
789-
protocol details in a field carrying the name of the protocol.
790-
791-
Option 1 using the `options` field is now deprecated.
792-
Implementations are encouraged to transition to the new
793-
optional properties defined below, such that this field
794-
may be removed in a future major version of the spec.
795-
796-
When specifying more than one protocol as different ways to
797-
access the Share, the `name` field needs to be set to `multi`.
798-
799-
If `multi` is given, one or more protocol
800-
endpoints are expected to be defined according to the
801-
optional properties specified below.
802-
Otherwise, at least `webdav` is expected to be
803-
supported, and its options MAY be given in the opaque
804-
`options` payload for compatibility with v1.0
805-
implementations (see examples). Note though that this
806-
format is deprecated.
807-
Warning: client implementers should be aware that v1.1
808-
servers MAY support both `webdav` and `multi`, but v1.0
809-
servers MAY only support `webdav`.
810-
771+
`webapp`, to access remote web applications.
772+
Other custom protocols might be added in the future.
773+
In case a single protocol is offered, there are three ways to
774+
specify this object:
775+
Option 1: Set the `name` field to the name of the protocol,
776+
and put the protocol details in a field named `options`.
777+
Option 2: Set the `name` field to the name of the protocol,
778+
and put the protocol details in a field carrying the name of
779+
the protocol.
780+
Option 3: Set the `name` field to `multi`, and put the
781+
protocol details in a field carrying the name of the protocol.
782+
Option 1 using the `options` field is now deprecated.
783+
Implementations are encouraged to transition to the new
784+
optional properties defined below, such that this field
785+
may be removed in a future major version of the spec.
786+
When specifying more than one protocol as different ways to
787+
access the Share, the `name` field needs to be set to `multi`.
788+
If `multi` is given, one or more protocol
789+
endpoints are expected to be defined according to the
790+
optional properties specified below.
791+
Otherwise, at least `webdav` is expected to be
792+
supported, and its options MAY be given in the opaque
793+
`options` payload for compatibility with v1.0
794+
implementations (see examples). Note though that this
795+
format is deprecated.
796+
Warning: client implementers should be aware that v1.1+
797+
servers MAY support both `webdav` and `multi`, but v1.0
798+
servers MAY only support `webdav`.
811799
* Protocol details for `webdav` MAY contain:
800+
- OPTIONAL accessType (array of strings) - The type of access
801+
being granted to the remote resource. If omitted, it defaults to
802+
`['remote']`. A subset of: - `remote` signals the recipient that
803+
the resource is available for remote access and interactive
804+
browsing. - `datatx` signals the recipient to transfer the
805+
resource from the given URI. The recipient MAY delegate a
806+
third-party service to execute the data transfer on their behalf.
812807
- REQUIRED uri (string)
813808
A URI to access the Remote Resource. The URI
814809
SHOULD be relative, in which case the prefix
@@ -834,6 +829,9 @@ servers MAY only support `webdav`.
834829
to the Sending Server's {tokenEndPoint} [RFC6749].
835830
This MAY be used if the recipient provider exposes the
836831
`exchange-token` capability.
832+
- OPTIONAL size (integer)
833+
The size of the resource to be transferred, useful
834+
especially in case of `datatx` access type.
837835
* Protocol details for `webapp` MAY contain:
838836
- REQUIRED uri (string)
839837
A URI to a client-browsable view of the Shared
@@ -850,20 +848,6 @@ servers MAY only support `webdav`.
850848
- OPTIONAL sharedSecret (string)
851849
An optional secret to be used to access the remote
852850
web app, for example in the form of a bearer token.
853-
* Protocol details for `datatx` MAY contain:
854-
- REQUIRED srcUri (string)
855-
A URI to access the Remote Resource. The URI
856-
SHOULD be relative, in which case the prefix
857-
exposed by the `/.well-known/ocm` endpoint MUST be
858-
used. Absolute URIs are deprecated.
859-
- OPTIONAL sharedSecret (string)
860-
An optional secret to be used to access the
861-
Resource, for example in the form of a bearer
862-
token. To prevent leaking it in logs it MUST NOT
863-
appear in any URI.
864-
- OPTIONAL size (integer)
865-
The size of the file to be transferred from the
866-
sending server.
867851

868852
## Decision to Discard
869853

spec.yaml

Lines changed: 35 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -388,14 +388,6 @@ components:
388388
The top-level path for web apps at this endpoint. In order to
389389
access a remote web app, implementations SHOULD use this path
390390
as a prefix (see sharing examples).
391-
datatx:
392-
type: string
393-
description: >
394-
The top-level path to be used for data transfers. In order to
395-
access a remote shared resource, implementations SHOULD use
396-
this path as a prefix (see sharing examples). In addition,
397-
implementations are expected to execute the transfer using
398-
WebDAV as the wire protocol.
399391
additionalProperties:
400392
type: string
401393
description: >
@@ -550,16 +542,18 @@ components:
550542
expiration:
551543
type: integer
552544
description: >
553-
The expiration time for the share, in seconds of UTC time since
554-
Unix epoch. If omitted, it is assumed that the share does not expire.
545+
The expiration time for the share, in seconds of UTC time since Unix
546+
epoch. If omitted, it is assumed that the share does not expire. A sender
547+
server MAY use the `expiration` to signal that the resource represents
548+
a cached copy of a dataset that was made available for an efficient
549+
data transfer to the destination server.
555550
protocol:
556551
type: object
557552
description: |
558553
JSON object with specific options for each protocol.
559554
The supported protocols are:
560555
- `webdav`, to access the data
561556
- `webapp`, to access remote web applications
562-
- `datatx`, to transfer the data to the remote endpoint
563557
Other custom protocols might be added in the future.
564558
required:
565559
- name
@@ -587,7 +581,25 @@ components:
587581
this field may be removed in a future major version of the spec.
588582
webdav:
589583
type: object
584+
required:
585+
- uri
586+
- permissions
590587
properties:
588+
accessType:
589+
type: array
590+
description: >
591+
The type of access being granted to the remote resource.
592+
If omitted, it defaults to `['remote']`.
593+
- `remote` signals the recipient that the resource is available
594+
for remote access and interactive browsing.
595+
- `datatx` signals the recipient to transfer the resource
596+
from the given URI. The recipient MAY delegate a third-party
597+
service to execute the data transfer on their behalf.
598+
items:
599+
type: string
600+
enum:
601+
- remote
602+
- datatx
591603
uri:
592604
type: string
593605
description: >
@@ -605,13 +617,13 @@ components:
605617
To prevent leaking it in logs it MUST NOT appear in any URI.
606618
permissions:
607619
type: array
620+
description: >
621+
The permissions granted to the sharee.
622+
- `read` allows read-only access including download of a copy.
623+
- `write` allows create, update, and delete rights on the resource.
624+
- `share` allows re-share rights on the resource.
608625
items:
609626
type: string
610-
description: >
611-
The permissions granted to the sharee.
612-
- `read` allows read-only access including download of a copy.
613-
- `write` allows create, update, and delete rights on the resource.
614-
- `share` allows re-share rights on the resource.
615627
enum:
616628
- read
617629
- write
@@ -621,8 +633,7 @@ components:
621633
items:
622634
type: string
623635
description: >
624-
A list of requirements that the recipient provider MUST
625-
fulfill
636+
A list of requirements that the recipient provider MUST fulfill
626637
to access the resource. Requirements are optional, but if it is
627638
present it MUST NOT be empty. A recipient provider MUST reject
628639
a share whose requirements it does not understand.
@@ -638,6 +649,11 @@ components:
638649
enum:
639650
- must-use-mfa
640651
- must-exchange-token
652+
size:
653+
type: integer
654+
description: >
655+
The size of the resource to be transferred, useful especially
656+
in case of `datatx` access type.
641657
webapp:
642658
type: object
643659
properties:
@@ -672,30 +688,6 @@ components:
672688
in any URI. In a multi-protocol share scenario with WebDAV, the
673689
access requirements provided in the `webdav` part MUST apply for
674690
`webapp` accesses as well.
675-
datatx:
676-
type: object
677-
properties:
678-
sharedSecret:
679-
type: string
680-
description: >
681-
An optional secret to be used to access the resource, such as
682-
a bearer token. To prevent leaking it in logs it MUST NOT
683-
appear in any URI. In a multi-protocol share scenario with WebDAV,
684-
the access requirements provided in the `webdav` part MUST apply
685-
for `datatx` transfers as well.
686-
srcUri:
687-
type: string
688-
description: >
689-
An URI to access the resource at the sending server. The URI
690-
SHOULD be relative, such as a key or a UUID, in which case the
691-
prefix exposed by the `/.well-known/ocm` endpoint SHOULD be used
692-
to access the resource, or it MAY be absolute, including a
693-
hostname. Similar considerations as for the `webdav` case apply.
694-
size:
695-
type: integer
696-
description: >
697-
The size of the file to be transferred from the sending
698-
server.
699691
700692
additionalProperties:
701693
type: object
@@ -718,11 +710,10 @@ components:
718710
permissions:
719711
- read
720712
- write
721-
requirements:
722-
- none
723713
multipleProtocols:
724714
name: multi
725715
webdav:
716+
accessType: ['remote', 'datatx']
726717
uri: 7c084226-d9a1-11e6-bf26-cec0c932ce01
727718
sharedSecret: hfiuhworzwnur98d3wjiwhr
728719
permissions:
@@ -733,10 +724,6 @@ components:
733724
uri: 7c084226-d9a1-11e6-bf26-cec0c932ce01
734725
sharedSecret: hfiuhworzwnur98d3wjiwhr
735726
viewMode: read
736-
datatx:
737-
srcUri: 7c084226-d9a1-11e6-bf26-cec0c932ce01
738-
sharedSecret: hfiuhworzwnur98d3wjiwhr
739-
size: 100000
740727
NewNotification:
741728
type: object
742729
required:

0 commit comments

Comments
 (0)