Skip to content

Commit 635591b

Browse files
Preparing v1.1 (#71)
* Preparing v1.1 * Renamed example resource to avoid unneeded self-referencing * Fixed description of the share.expiration field * Fixed missing link * Clarified use of relative path when accessing a share * Fixed order following rebase * Improved single protocol example Co-authored-by: Sandro Mesterheide <1752390+smesterheide@users.noreply.github.com> * Improved multi protocol example --------- Co-authored-by: Sandro Mesterheide <1752390+smesterheide@users.noreply.github.com>
1 parent 9ddb138 commit 635591b

File tree

3 files changed

+48
-17
lines changed

3 files changed

+48
-17
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
3+
## [1.1.0] - 2023-05-15 - Giuseppe Lo Presti <lopresti@cern.ch>
4+
5+
* Added a new `/invite-accepted` endpoint to support an invitation
6+
workflow in the context of the ScienceMesh.
7+
* Officially added the `/ocm-provider` discovery endpoint, already
8+
in use by several implementations. Within this endpoint, clarified
9+
which are the minimal capabilities required to be "OCM compliant".
10+
* Added support for multi-protocol shares, and fully specified
11+
the properties required for each supported protocol.
12+
* Added a `federation` recipient share type.
13+
* Deprecated `protocol.options` in `/shares`.
14+
15+
## [1.0.0] - 2020-07-01 - Bjoern Schiessle <bjoern@schiessle.org>
16+
17+
* First official release of the Open Cloud Mesh (OCM) protocol
18+
specification, to enable federated sharing and notifications.
19+
The supported endpoints are `/shares` and `/notifications`.
20+

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ the [OpenAPI](https://github.com/OAI/OpenAPI-Specification) (fka Swagger) specif
2121
## Scope and assumptions
2222

2323
* For the core sharing functionality, the provider knows the consumer (both endpoint and user) when it creates a share with the consumer (also see [#26](https://github.com/cs3org/OCM-API/issues/26)). In addition, an optional invitation workflow is available in this specification (see below), which gives the consumer a way to automatically trust a provider (and vice versa). The [ScienceMesh](https://sciencemesh.io) infrastructure provides a managed white list of trusted federated sites.
24-
* Consumer doesn't have to accept a share, the resource will be available to the consumer immediately (#25).
24+
* Consumer doesn't have to accept a share, the resource will be available to the consumer immediately ([#25](https://github.com/cs3org/OCM-API/issues/25)).
2525
* Dealing with incoming shares is a vendor specific implementation. One vendor might use an 'accept before' process while another vendor might use a 'decline after' approach. This is considered part of the UX and thus not part of the interaction between different vendors. However, the consumer could notify the provider by using the introduced `/notifications` endpoint (also see [#27](https://github.com/cs3org/OCM-API/issues/27)).
2626
* Reverting access to outgoing shares is a vendor specific implementation. One vendor might delete an entire share while another might invalidate an access token. This is considered part of vendor specific internals and thus not part of the interaction between different vendors. However, the provider could notify the consumer by using the introduced `/notifications` endpoint (also see [#27](https://github.com/cs3org/OCM-API/issues/27)).
2727
* The actual file sync isn't a part of this specification. To keep this specification 'future proof', the file sync protocol will be embedded as a separate object in Open Cloud Mesh API calls. This protocol object contains all protocol specific options, e.g. WebDAV specific options.
@@ -45,9 +45,11 @@ In response to a share creation, the receiving server MAY send back a [notificat
4545
### Share Access
4646
To access a share, the receiving server MAY use multiple ways, depending on the received payload and on the `protocol.name` property:
4747

48-
* If `protocol.name` = `multi`, the receiver SHOULD make a HTTP PROPFIND request to `protocol.webdav.uri` to access the remote resource. If `protocol.webdav.sharedSecret` is not empty, the receiver SHOULD pass it as a `Authorization: bearer` header.
48+
* If `protocol.name` = `multi`, the receiver SHOULD make a HTTP PROPFIND request to `protocol.webdav.uri` to access the remote share. If `protocol.webdav.sharedSecret` is not empty, the receiver SHOULD pass it as a `Authorization: bearer` header.
4949

50-
* If `protocol.name` = `webdav`, the receiver SHOULD inspect the `protocol.options` property. If it contains a `sharedSecret`, as in the [legacy example](https://cs3org.github.io/OCM-API/docs.html?branch=develop&repo=OCM-API&user=cs3org#/paths/~1shares/post), then the receiver SHOULD make a HTTP PROPFIND request to `https://<token>:@<host><path>/<rel_path>`, where: `<host>` is the remote server, `<path>` is obtained by querying the [Discovery](#discovery) endpoint and extracting `resourceTypes[0].protocols.webdav`, and optionally `<rel_path>` is the relative path of the resource within the share, when needed.
50+
* If `protocol.name` = `webdav`, the receiver SHOULD inspect the `protocol.options` property. If it contains a `sharedSecret`, as in the [legacy example](https://cs3org.github.io/OCM-API/docs.html?branch=develop&repo=OCM-API&user=cs3org#/paths/~1shares/post), then the receiver SHOULD make a HTTP PROPFIND request to `https://<sharedSecret>:@<host><path>`, where `<host>` is the remote server, and `<path>` is obtained by querying the [Discovery](#discovery) endpoint at the remote server and extracting the path from `resourceTypes[0].protocols.webdav`.
51+
52+
In both cases, when the share is a folder and the receiver accesses a resource within the share, it SHOULD append its relative path to that URL.
5153

5254
### Share Deletion
5355
A `"SHARE_ACCEPTED"` notification followed by a `"SHARE_UNSHARED"` notification is
@@ -74,12 +76,19 @@ Following this step, both services at `sender.com` and `receiver.com` MAY displa
7476
For further details on this concept, see also [#54](https://github.com/cs3org/OCM-API/pull/54) and related issues. For a discussion about trust policies, see [sciencemesh#196](https://github.com/sciencemesh/sciencemesh/issues/196).
7577

7678

79+
## Changelog
80+
81+
[Available here](CHANGELOG.md)
82+
83+
7784
## Contributing
7885

79-
The specification can be rendered as HTML documentation using [ReDoc](https://github.com/Redocly/redoc):
86+
The specification can be rendered as HTML documentation using [ReDoc](https://github.com/Redocly/redoc) and is available as follows:
87+
88+
* [version 1.1](https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1shares/post) - current official version, supported by ScienceMesh
89+
* [version 1.0](https://cs3org.github.io/OCM-API/docs.html?branch=v1.0.0&repo=OCM-API&user=cs3org#/paths/~1shares/post) - first official and supported version
8090

81-
* [version 1.0](https://cs3org.github.io/OCM-API/docs.html?branch=v1.0.0&repo=OCM-API&user=cs3org#/paths/~1shares/post), current official and supported version
82-
* [develop branch](https://cs3org.github.io/OCM-API/docs.html?branch=develop&repo=OCM-API&user=cs3org), future version supported by ScienceMesh
91+
The current developments yet to be released are available in the [develop branch](https://cs3org.github.io/OCM-API/docs.html?branch=develop&repo=OCM-API&user=cs3org)
8392

8493
The Open Cloud Mesh API specification is an open source, community-driven project. If you'd like to contribute, please follow the [Contributing Guidelines](CONTRIBUTING.md).
8594

spec.yaml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ swagger: "2.0"
22
info:
33
title: Open Cloud Mesh API
44
description: Open Cloud Mesh Open API Specification.
5-
version: 1.0.0
5+
version: 1.1.0
66
x-logo:
77
url: logo.png
88
schemes:
@@ -246,7 +246,7 @@ definitions:
246246
apiVersion:
247247
type: string
248248
description: The OCM API version this endpoint supports
249-
example: 1.0.0
249+
example: 1.1.0
250250
endPoint:
251251
type: string
252252
description: The URI of the OCM API available at this endpoint
@@ -346,7 +346,7 @@ definitions:
346346
name:
347347
type: string
348348
description: Name of the resource (file or folder).
349-
example: spec.yaml
349+
example: resource.txt
350350
description:
351351
type: string
352352
description: Optional description of the resource (file or folder).
@@ -397,8 +397,9 @@ definitions:
397397
expiration:
398398
type: integer
399399
description: |
400-
The expiration time for the OCM share.
401-
Represents seconds of UTC time since Unix epoch.
400+
The expiration time for the OCM share, in seconds
401+
of UTC time since Unix epoch. If omitted, it is assumed
402+
that the share does not expire.
402403
protocol:
403404
type: object
404405
description: |
@@ -506,23 +507,24 @@ definitions:
506507
sharedSecret: "hfiuhworzwnur98d3wjiwhr"
507508
permissions: "some permissions scheme"
508509
singleProtocolNew:
509-
name: "multi"
510+
name: "webdav"
511+
options:
512+
sharedSecret: "hfiuhworzwnur98d3wjiwhr"
510513
webdav:
514+
sharedSecret: "hfiuhworzwnur98d3wjiwhr"
511515
permissions: ["read"]
512-
uri: "https://open-cloud-mesh.org/remote.php/webdav/share-hash/path/to/spec.yaml"
516+
uri: "https://open-cloud-mesh.org/remote.php/webdav/share-secret/path/to/resource.txt"
513517
multipleProtocols:
514518
name: "multi"
515519
options:
516520
webdav:
517-
sharedSecret: "hfiuhworzwnur98d3wjiwhr"
518521
permissions: ["read"]
519-
uri: "https://open-cloud-mesh.org/remote.php/webdav/path/to/spec.yaml"
522+
uri: "https://open-cloud-mesh.org/remote.php/webdav/share-secret/path/to/resource.txt"
520523
webapp:
521524
uriTemplate: "https://open-cloud-mesh.org/s/share-hash/{relative-path-to-shared-resource}"
522525
viewMode: "read"
523526
datatx:
524-
sharedSecret: "hfiuhworzwnur98d3wjiwhr"
525-
srcUri: "https://open-cloud-mesh.org/remote.php/webdav/path/to/spec.yaml"
527+
srcUri: "https://open-cloud-mesh.org/remote.php/webdav/share-secret/path/to/resource.txt"
526528
size: 100000
527529
NewNotification:
528530
type: object

0 commit comments

Comments
 (0)