@@ -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,51 @@ 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 protocol
965+ 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 {tokenEndPoint},
980+ to exchange the `protocol.webdav.sharedSecret` token for a short-lived
981+ bearer token, and then use that bearer token to access the Resource
982+ (See the [Code Flow](#code-flow) section).
983+ 3.2. If it includes `must-use-mfa`, the Receiving Server MUST ensure that
984+ the Receiving Party has been authenticated with MFA, or prompt the
985+ consumer in order to elevate their session, if applicable.
986+ 4. The `protocol.webdav.uri` property MUST now be inspected : if it's a
987+ complete URI, the receiver MUST make a HTTP PROPFIND request against
988+ it to access the Remote Resource, otherwise it contains an identifier
989+ `<id>`, in which case the receiver MUST make a HTTP PROPFIND request to :
990+ ` https://<sender-host><sender-ocm-path>/<id>` in order to gain access
991+ to the Remote Resource. The receiver MUST pass an `Authorization : bearer`
992+ header with either the short-lived bearer token obtained in step 3.1.,
993+ if applicable, or the `protocol.webdav.sharedSecret` value.
994+ 5. Otherwise, if `protocol.name` is `webdav`, the receiver SHOULD inspect
995+ the `protocol.options` property : if `protocol.options.sharedSecret` is
996+ defined, then the receiver SHOULD make a HTTP PROPFIND request to
997+ ` https://<sharedSecret>:@<sender-host><sender-ocm-path>` . Note that
998+ this access method, based on Basic Auth, is _deprecated_ and may be
999+ removed in a future release of the Protocol. If a secret cannot be
1000+ identified (e.g. because `protocol.options` is undefined), then
1001+ the receiver SHOULD discard the share as invalid.
9951002
9961003In all cases, in case the Shared Resource is a folder and the Receiving
9971004Server accesses a Resource within that shared folder, it SHOULD append
9981005its relative path to that URL. In other words, the Sending Server
9991006SHOULD support requests to URLs such as
10001007` https://<sender-host><sender-ocm-path>/path/to/resource.txt` .
10011008
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-
10071009
10081010# Code Flow
10091011
@@ -1017,7 +1019,7 @@ No user interaction or redirect is involved. [RFC6749]
10171019# # Token Request
10181020
10191021To obtain an access token, the Receiving Server MUST send an HTTP POST
1020- request to the Sending Server’s tokenEndPoint as discovered in the
1022+ request to the Sending Server’s { tokenEndPoint} as discovered in the
10211023OCM provider metadata, following section 4.4.2 of [RFC6749]. Here
10221024follows an example of such POST request :
10231025
@@ -1043,7 +1045,7 @@ code=my_secret_code
10431045The request MUST be signed using an HTTP Message Signature
10441046[RFC9421]. The `client_id` identifies the Receiving Server and MUST be
10451047set to its fully qualified domain name. The `code` parameter carries
1046- the authorization code that was issued by the Sending Server in the
1048+ the authorization secret that was issued by the Sending Server in the
10471049Share Creation Notification. It is allowed to send the additional
10481050parameters defined in [RFC6749] for the `authorization_code` grant type,
10491051but they MUST be ignored.
@@ -1067,7 +1069,7 @@ structure visible to the Receiving Server. The token authorizes the
10671069Receiving Server to access the shared resource using the appropriate
10681070transport protocol (e.g., WebDAV). The `expires_in` value indicates
10691071the token lifetime in seconds. No `refresh_token` is issued, instead
1070- the same request to the tokenEndPoint MUST be repeated before the
1072+ the same request to the { tokenEndPoint} MUST be repeated before the
10711073` access_token` has expired, to recieve a new `access_token` that can
10721074then be used in the same manner.
10731075
0 commit comments