Skip to content

Commit cdcd667

Browse files
glpatcernmickenordin
authored andcommitted
Addressed comments and completed some descriptions
1 parent 5469abf commit cdcd667

3 files changed

Lines changed: 63 additions & 39 deletions

File tree

IETF-OCM-MLS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ added user.
736736
{
737737
"notificationType": "MLS_WELCOME",
738738
"senderDomain": "othercloud.example.org",
739-
"resourceType": "federation",
739+
"shareType": "federation",
740740
"notification": {
741741
"federation": {
742742
"mlsGroupId": "<base64url MLS group ID>",
@@ -780,7 +780,7 @@ act on it.
780780
{
781781
"notificationType": "MLS_PROPOSAL",
782782
"senderDomain": "cloud.example.org",
783-
"resourceType": "federation",
783+
"shareType": "federation",
784784
"notification": {
785785
"federation": {
786786
"mlsGroupId": "<base64url MLS group ID>",
@@ -812,7 +812,7 @@ data, per [RFC9420] Section 15.2.
812812
{
813813
"notificationType": "MLS_COMMIT",
814814
"senderDomain": "cloud.example.org",
815-
"resourceType": "federation",
815+
"shareType": "federation",
816816
"notification": {
817817
"federation": {
818818
"mlsGroupId": "<base64url MLS group ID>",
@@ -864,7 +864,7 @@ epoch ([RFC9420] Section 15).
864864
{
865865
"notificationType": "MLS_APPLICATION",
866866
"senderDomain": "cloud.example.org",
867-
"resourceType": "federation",
867+
"shareType": "federation",
868868
"notification": {
869869
"federation": {
870870
"mlsGroupId": "<base64url MLS group ID>",
@@ -909,7 +909,7 @@ by the KeyPackage endpoint.
909909
{
910910
"notificationType": "MLS_REJOIN",
911911
"senderDomain": "othercloud.example.org",
912-
"resourceType": "federation",
912+
"shareType": "federation",
913913
"notification": {
914914
"federation": {
915915
"mlsGroupId": "<base64url MLS group ID>",
@@ -1574,8 +1574,8 @@ Each notification MAY include the optional `encryption` field:
15741574
~~~ json
15751575
{
15761576
"shareWith": "research-group@receiver.example.org",
1577-
"shareType": "federation",
15781577
"resourceType": "file",
1578+
"shareType": "federation",
15791579
"sender": "alice@cloud.example.org",
15801580
"owner": "alice@cloud.example.org",
15811581
"providerId": "7c084226-d9a1-11e6-bf26-cec0c932ce01",

IETF-OCM.md

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,20 +1342,27 @@ request:
13421342
* REQUIRED notificationType (string) - it MUST be one of the
13431343
registered values listed in the "OCM Notification Types"
13441344
registry (see [IANA Considerations](#iana-considerations)).
1345-
* REQUIRED senderDomain (string) - ...
1346-
* REQUIRED resourceType (string) - ...
1345+
* REQUIRED senderDomain (string) - the FQDN of the sender. A Receiving
1346+
Server SHOULD use this information to verify the HTTP message
1347+
signature on the request, and it SHOULD also use it to validate the
1348+
underlying share or resource the notification is about.
1349+
* OPTIONAL resourceType (string) - the type of the resource this
1350+
notification is about (e.g., `file`).
1351+
* OPTIONAL shareType (string) - the type of recipient this notification
1352+
is about (e.g., `user`).
13471353
* OPTIONAL providerId (string) - the identifier assigned by the
13481354
Sending Server to the underlying share, if applicable. This
13491355
field is _deprecated_ and SHOULD NOT be used.
13501356
* OPTIONAL notification (object) - optional additional parameters,
13511357
depending on the notification and the resource type.
13521358

1353-
Multiple Notification types are defined for different purposes, and
1354-
additional types MAY be defined by implementers and registered in the
1355-
"OCM Notification Types" IANA Registry. For each notification type,
1356-
a specific format is defined for the optional notification object.
1357-
In the sections below the base Notification types are detailed along
1358-
with their specific payload.
1359+
A Notification payload MUST include either the `resourceType` or the
1360+
`shareType`, or both when relevant. Multiple Notification types are
1361+
defined for different purposes, and additional types MAY be defined
1362+
by implementers and registered in the "OCM Notification Types" IANA
1363+
Registry. For each notification type, a specific format MAY be defined
1364+
for the optional notification object. In the sections below, the base
1365+
Notification types are detailed along with their specific payload.
13591366

13601367
## Share Acceptance and Updating
13611368

@@ -1364,9 +1371,10 @@ the recipient accepted or declined a share, in response to a Share
13641371
Creation Notification. Similarly, it MAY be sent by a provider to let
13651372
the recipient know that the provider updated or removed a given share,
13661373
such that the recipient MAY clean it up from its database. In all such
1367-
cases, the `resourceType` is expected to match the `resourceType` of
1368-
the underlying share (e.g., `file`), and the `notificationType` MUST be
1369-
one of:
1374+
cases, the `resourceType` MUST match the `resourceType` of the
1375+
underlying share (e.g., `file`), the `shareType` MAY be omitted but if
1376+
present it MUST match the `shareType` of the underlying share, and the
1377+
`notificationType` MUST be one of:
13701378
- "SHARE_ACCEPTED", to inform about the acceptance of a share.
13711379
- "SHARE_DECLINED", to inform that a share was not accepted.
13721380
- "SHARE_UNSHARED", to inform the Receiving Server that the share
@@ -1387,9 +1395,12 @@ Further, the `notification` object MUST include the following fields:
13871395
the `permissions` values specified in the `webdav` protocol of a
13881396
[Share Creation Notification](#share-creation-notification).
13891397

1390-
Note that the Sending Server MAY at any time revoke access to a
1391-
Resource (effectively undoing or deleting the Share) without notifying
1392-
the Receiving Server.
1398+
The same notifications identically apply to resources of type `folder`.
1399+
For other resources with a different `resourceType` attribute, a
1400+
Sending Server MAY implement the same notifications, provided that
1401+
they get registered in the related IANA Registry. Note that the
1402+
Sending Server MAY at any time revoke access to a Resource (effectively
1403+
undoing or deleting the Share) without notifying the Receiving Server.
13931404

13941405
## Resharing and Request to Share
13951406

@@ -1403,8 +1414,11 @@ the third party: in this case, all necessary exchanges and access
14031414
requests MUST take place between the third party and the Sending
14041415
Server, without further including the Receiving Server in the process.
14051416

1406-
For a "REQUEST_RESHARE", the `notification` object MUST include the
1407-
following fields:
1417+
For a "REQUEST_RESHARE" notification, the `resourceType` MUST match the
1418+
`resourceType` of the original share (e.g., `file`, `folder`, ...), the
1419+
`shareType` MAY be omitted but if present it MUST match the `shareType`
1420+
of the original share, and the the `notification` object MUST include
1421+
the following fields:
14081422
* OPTIONAL message (string) - an optional human-readable message that
14091423
describes the request.
14101424
* REQUIRED file (object) - an object containing the details of the
@@ -1428,8 +1442,10 @@ to the Sending Server.
14281442
Similarly, the `"REQUEST_SHARE"` notification type MAY be used by a
14291443
given Recipient OCM Server, to ask a remote OCM Server to share and
14301444
grant access to a Resource, previously made known to the Recipient
1431-
Server out of band. In this case, the `notification` object MUST
1432-
include the following fields:
1445+
Server out of band. In this case, the `resourceType` MUST match the
1446+
`resourceType` of the Resource in question (e.g., `file`, `folder`,
1447+
...), the `shareType` MUST be omitted, and the `notification` object
1448+
MUST include the following fields:
14331449

14341450
* OPTIONAL message (string) - an optional human-readable message that
14351451
describes the request.
@@ -1460,6 +1476,7 @@ even informing the `owner`: in this case, it MUST respond to the
14601476
`"REQUEST_SHARE"` notification with an appropriate HTTP response type
14611477
such as HTTP 404.
14621478

1479+
14631480
## Recipient Removal
14641481

14651482
A notification MAY be sent to inform a target OCM Server that a share
@@ -1471,9 +1488,10 @@ The recipient of such notification MAY reciprocally remove that
14711488
recipient from the list of trusted users, along with any related
14721489
shares.
14731490

1474-
For these cases, a notification payload MUST be formed such that the
1475-
`resourceType` is set to the affected shareType being removed, such as
1476-
`user` or `group`, and the `notificationType` MUST be one of:
1491+
For these cases, a notification payload is to be formed such that the
1492+
`resourceType` MUST be omitted, the `shareType` is set to the affected
1493+
shareType being removed, such as `user` or `group`, and the
1494+
`notificationType` MUST be one of:
14771495
- "USER_REMOVED", to inform about a single user that was removed or
14781496
marked as not trusted.
14791497
- "GROUP_REMOVED", to inform about a removed group.

spec.yaml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -907,9 +907,7 @@ components:
907907
type: object
908908
required:
909909
- notificationType
910-
- resourceType
911910
- senderDomain
912-
- notification
913911
properties:
914912
notificationType:
915913
type: string
@@ -919,18 +917,25 @@ components:
919917
Any value registered in the OCM IANA Registry for notification types
920918
MAY be used here. Implementers MAY define additional custom types,
921919
provided that they are registered in the OCM IANA Registry.
922-
resourceType:
923-
type: string
924-
description: >
925-
Resource type or share type, according to the OCM IANA Registry
926-
for resource types and share types. E.g. file, folder, user, calendar,
927-
contact, etc. Implementers MAY define additional custom types, provided
928-
that they are registered in the respective OCM IANA Registry.
929920
senderDomain:
930921
type: string
931922
description: >
932923
The FQDN of the sending OCM server, in order for the recipient
933924
to validate its key material when verifying the HTTP Signature.
925+
resourceType:
926+
type: string
927+
description: >
928+
Resource type, according to the OCM IANA Registry for resource types.
929+
E.g. file, folder, calendar, contact, etc. Implementers MAY define
930+
additional custom types, provided that they are registered in the
931+
respective OCM IANA Registry.
932+
shareType:
933+
type: string
934+
description: >
935+
Share type, according to the OCM IANA Registry for share types.
936+
E.g. user, group, federation, etc. Implementers MAY define
937+
additional custom types, provided that they are registered in the
938+
respective OCM IANA Registry.
934939
providerId:
935940
type: string
936941
description: >
@@ -966,22 +971,23 @@ components:
966971
shareWasAccepted:
967972
notificationType: SHARE_ACCEPTED
968973
resourceType: file
969-
senderDomain: sender.org
974+
shareType: user
975+
senderDomain: sender.example.org
970976
notification:
971977
message: Recipient accepted the share
972978
file:
973979
providerId: 7c084226-d9a1-11e6-bf26-cec0c932ce01
974980
userWasRemoved:
975981
notificationType: USER_REMOVED
976-
resourceType: user
982+
shareType: user
977983
senderDomain: alice.example.org
978984
notification:
979985
message: User is not a trusted contact any longer
980986
user:
981987
userId: alice@alice.example.org
982988
mlsWelcome:
983989
notificationType: MLS_WELCOME
984-
resourceType: federation
990+
shareType: federation
985991
senderDomain: cloud.example.org
986992
notification:
987993
federation:

0 commit comments

Comments
 (0)