@@ -695,8 +695,8 @@ contain the following information about its OCM API:
695695 ` "/index.php/apps/sciencemesh/accept"` is specified here then a WAYF
696696 Page SHOULD redirect the end-user to
697697` /index.php/apps/sciencemesh/accept?token=zi5kooKu3ivohr9a&providerDomain=example.com` .
698- * OPTIONAL: tokenEndPoint (string) - URL of the token endpoint where
699- the Sending Server can exchange a `code` for a bearer token.
698+ * OPTIONAL: tokenEndPoint (string) - URL of the token endpoint where the
699+ Sending Server can exchange a secret for a short-lived bearer token.
700700 Implementations that offer the `"exchange-token"` capability MUST
701701 provide this URL as well.
702702 Example : ` "https://my-cloud-storage.org/ocm/token"` .
@@ -961,49 +961,53 @@ notification that this happened.
961961# Resource Access
962962
963963To access the Resource, the Receiving Server MAY use multiple ways,
964- depending on the body of the Share Creation Notification. The procedure
965- is as follows :
964+ depending on the body of the Share Creation Notification and the
965+ protocol required for access. The procedure is as follows :
966966
9679671. The receiver MUST extract the OCM Server FQDN from the `sender`
968968 field of the received share, and MUST query the
969- [Discovery](#ocm-api-discovery) endpoint at that address: the
970- ` resourceTypes[0].protocols.webdav` value is the
971- ` <sender-ocm-path>` to be used in step 3.
972- 2. If `code` is not empty, the receiver SHOULD make a signed POST
973- request to the path in the Sending Server’s tokenEndPoint, to
974- exchange the code for a short-lived bearer token, and then use that
975- bearer token to access the Resource (See the [Code Flow](
976- # code-flow) section).
977- 3. If `protocol.name` = `webdav`, the receiver SHOULD inspect the
978- ` protocol.options` property. If it contains a `sharedSecret`, as in
979- the [legacy example](
980- https://cs3org.github.io/OCM-API/docs.html?branch=develop&repo=OCM-API&user=cs3org#/paths/~1shares/post),
981- then the receiver SHOULD make a HTTP PROPFIND request to
982- ` https://<sharedSecret>:@<sender-host><sender-ocm-path>` . Note that
983- this access method, based on Basic Auth, is _deprecated_ and may be
984- removed in a future release of the Protocol.
985- 4. Otherwise, if `protocol.name` = `multi`, the receiver MUST inspect
986- the `protocol.webdav.uri` property : if it's a complete URI, the
987- receiver MUST make a HTTP PROPFIND request against it to access the
988- Remote Resource. If it only contains an identifier `<key>`, the
989- receiver MUST make a HTTP PROPFIND request to
990- ` https://<sender-host><sender-ocm-path>/<key>` in order to access
991- the Remote Resource. Additionally, the receiver MUST pass an
992- `Authorization : bearer` header with either the short-lived bearer
993- token obtained in step 2, if applicable, or the
994- ` protocol.webdav.sharedSecret` value.
969+ [Discovery](#ocm-api-discovery) endpoint at that address: let
970+ ` <sender-ocm-path>` be the `resourceTypes[0].protocols.webdav` value
971+ to be used later, if defined.
972+ 2. If `protocol.name` is `multi`, the receiver MUST inspect the
973+ ` protocol.{protocolName}` properties corresponding to the protocol
974+ of concern, and act according to its semantics. For the specific
975+ case where `protocol.webdav` is available and the receiver wants
976+ to use it, the following steps are to be followed.
977+ 3. The `protocol.webdav.requirements` MUST be inspected :
978+ 3.1. If it includes `must-exchange-token`, the receiver MUST make a
979+ signed POST request to the path in the Sending Server’s
980+ {tokenEndPoint}, to exchange the `protocol.webdav.sharedSecret`
981+ token for a short-lived bearer token, and then use that bearer
982+ token to access the Resource (See the [Code Flow](#code-flow)
983+ section).
984+ 3.2. If it includes `must-use-mfa`, the Receiving Server MUST ensure
985+ that the Receiving Party has been authenticated with MFA, or prompt
986+ the consumer in order to elevate their session, if applicable.
987+ 4. The `protocol.webdav.uri` property MUST now be inspected : if it's a
988+ complete URI, the receiver MUST make a HTTP PROPFIND request against
989+ it to access the Remote Resource, otherwise it is to be taken as an
990+ identifier `<id>`, in which case the receiver MUST make a HTTP
991+ PROPFIND request to : ` https://<sender-host><sender-ocm-path>/<id>`
992+ in order to access to the Remote Resource. The receiver MUST pass
993+ an `Authorization : bearer` header with either the short-lived bearer
994+ token obtained in step 3.1., if applicable, or the
995+ ` protocol.webdav.sharedSecret` value.
996+ 5. Otherwise, if `protocol.name` is `webdav` the receiver SHOULD inspect
997+ the `protocol.options` property : if `protocol.options.sharedSecret`
998+ is defined, then the receiver SHOULD make a HTTP PROPFIND request to
999+ ` https://<sharedSecret>:@<sender-host><sender-ocm-path>` . Note that
1000+ this access method, based on Basic Auth, is _deprecated_ and may be
1001+ removed in a future release of the Protocol. If a secret cannot be
1002+ identified (e.g. because `protocol.options` is undefined), then
1003+ the receiver SHOULD discard the share as invalid.
9951004
9961005In all cases, in case the Shared Resource is a folder and the Receiving
9971006Server accesses a Resource within that shared folder, it SHOULD append
9981007its relative path to that URL. In other words, the Sending Server
9991008SHOULD support requests to URLs such as
10001009` https://<sender-host><sender-ocm-path>/path/to/resource.txt` .
10011010
1002- Additionally, if `protocol.<protocolname>.requirements` includes
1003- ` mfa-enforced` , the Receiving Server MUST ensure that the Receiving
1004- Party has been authenticated with MFA, or prompt the consumer in order
1005- to elevate their session, if applicable.
1006-
10071011
10081012# Code Flow
10091013
@@ -1017,7 +1021,7 @@ No user interaction or redirect is involved. [RFC6749]
10171021# # Token Request
10181022
10191023To obtain an access token, the Receiving Server MUST send an HTTP POST
1020- request to the Sending Server’s tokenEndPoint as discovered in the
1024+ request to the Sending Server’s { tokenEndPoint} as discovered in the
10211025OCM provider metadata, following section 4.4.2 of [RFC6749]. Here
10221026follows an example of such POST request :
10231027
@@ -1043,7 +1047,7 @@ code=my_secret_code
10431047The request MUST be signed using an HTTP Message Signature
10441048[RFC9421]. The `client_id` identifies the Receiving Server and MUST be
10451049set to its fully qualified domain name. The `code` parameter carries
1046- the authorization code that was issued by the Sending Server in the
1050+ the authorization secret that was issued by the Sending Server in the
10471051Share Creation Notification. It is allowed to send the additional
10481052parameters defined in [RFC6749] for the `authorization_code` grant type,
10491053but they MUST be ignored.
@@ -1067,7 +1071,7 @@ structure visible to the Receiving Server. The token authorizes the
10671071Receiving Server to access the shared resource using the appropriate
10681072transport protocol (e.g., WebDAV). The `expires_in` value indicates
10691073the token lifetime in seconds. No `refresh_token` is issued, instead
1070- the same request to the tokenEndPoint MUST be repeated before the
1074+ the same request to the { tokenEndPoint} MUST be repeated before the
10711075` access_token` has expired, to recieve a new `access_token` that can
10721076then be used in the same manner.
10731077
0 commit comments