From 07808f0b3d173f3463c54f4fe0d875b161911a0e Mon Sep 17 00:00:00 2001 From: Neil Jenkins Date: Wed, 10 Apr 2024 17:48:35 +1000 Subject: [PATCH] sharing: Address GEN-ART review comments --- rfc/src/sharing.xml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/rfc/src/sharing.xml b/rfc/src/sharing.xml index 37e073e..432662d 100644 --- a/rfc/src/sharing.xml +++ b/rfc/src/sharing.xml @@ -25,7 +25,7 @@ sharing -This document specifies a data model for sharing data between users using JMAP. Future documents can reference this one when defining data types to support a consistent model of sharing. +This document specifies a data model for sharing data between users using JMAP. Future documents can reference this document when defining data types to support a consistent model of sharing. @@ -53,9 +53,9 @@
Subscriptions -Permissions determine whether a user may access data, but not whether they want to. Some shared data is of equal importance as the user's own, while other data is just there should the user wish to explicitly go find it. Clients will often want to differentiate the two; for example, a company may share mailing list archives for all departments with all employees, but a user may only generally be interested in the few they belong to. They would have permission to access many mailboxes, but can subscribe to just the ones they care about. The client would provide separate interfaces for reading mail in subscribed mailboxes and browsing all mailboxes they have permission to access in order to manage their subscriptions. +Permissions determine whether a user may access data, but not whether they want to. Some shared data is of equal importance as the user's own, while other data is just there should the user wish to explicitly go find it. Clients will often want to differentiate the two. For example, a company may share mailing list archives for all departments with all employees, but a user may only generally be interested in the few they belong to. They would have permission to access many mailboxes, but can subscribe to just the ones they care about. The client would provide separate interfaces for reading mail in subscribed mailboxes and browsing all mailboxes they have permission to access in order to manage their subscriptions. The JMAP Session object (see ) typically includes an object in the accounts property for every account that the user has access to. Collaborative systems may share data between a very large number of Principals, most of which the user does not care about day-to-day. The Session object MUST only include Accounts where either the user is subscribed to at least one record (see ) in the account, or the account belongs to the user. StateChange events for changes to data SHOULD only be sent for data the user has subscribed to and MUST NOT be sent for any account where the user is not subscribed to any records in the account, except where that account belongs to the user. -The server MAY reject the user's attempt to subscribe to some resources even if they have permission to access them, e.g., a calendar representing a location. +The server MAY reject the user's attempt to subscribe to some resources even if they have permission to access them (e.g., a calendar representing a location). A user can query the set of Principals they have access to with "Principal/query" (see ). The Principal object will contain an Account object for all accounts where the user has permission to access data for that principal, even if they are not yet subscribed.
@@ -63,7 +63,7 @@ The capabilities object is returned as part of the JMAP Session object; see . This document defines two additional capability URIs.
urn:ietf:params:jmap:principals -Represents support for the Principal and ShareNotification data types and associated API methods. +The urn:ietf:params:jmap:principals capability represents support for the Principal and ShareNotification data types and associated API methods. The value of this property in the JMAP Session capabilities property is an empty object. The value of this property in an account’s accountCapabilities property is an object that MUST contain the following information on server capabilities and permissions for that account: @@ -74,8 +74,8 @@
urn:ietf:params:jmap:principals:owner -This URI is solely used as a key in an account’s accountCapabilities property; it does not appear in the JMAP Session capabilities. Support is implied by the urn:ietf:params:jmap:principals session capability. -If present, the account (and data therein) is owned by a principal. Some accounts may not be owned by a principal (e.g., the account that contains the data for the principals themselves), in which case this property is omitted. +The URI urn:ietf:params:jmap:principals:owner is solely used as a key in an account’s accountCapabilities property. It does not appear in the JMAP Session capabilities — support is indicated by the urn:ietf:params:jmap:principals URI being present in the session capabilities. +If urn:ietf:params:jmap:principals:owner is a key in an account’s accountCapabilities, that account (and data therein) is owned by a principal. Some accounts may not be owned by a principal (e.g., the account that contains the data for the principals themselves), in which case this property is omitted. The value of this property is an object with the following properties:
Principals -A Principal represents an individual, group, location (e.g., a room), resource (e.g., a projector) or other entity in a collaborative environment. Sharing in JMAP is generally configured by assigning rights to certain data within an account to other principals, for example a user may assign permission to read their calendar to a principal representing another user, or their team. +A Principal represents an individual, group, location (e.g., a room), resource (e.g., a projector) or other entity in a collaborative environment. Sharing in JMAP is generally configured by assigning rights to certain data within an account to other principals. For example, a user may assign permission to read their calendar to a principal representing another user or their team. In a shared environment such as a workplace, a user may have access to a large number of principals. -In most systems the user will have access to a single Account containing Principal objects, but they may have access to multiple if, for example, aggregating data from different places. +In most systems, the user will have access to a single Account containing Principal objects. In some situations, for example when aggregating data from different places, there may be multiple Accounts containing Principal objects. A Principal object has the following properties:
Principal/changes -This is a standard "/changes" method as described in . Note, implementations backed by an external directory may be unable to calculate changes, in which they will always return a "cannotCalculateChanges" error, as described in the core JMAP specification. +This is a standard "/changes" method as described in . Note: implementations backed by an external directory may be unable to calculate changes. In this case, they will always return a "cannotCalculateChanges" error as described in the core JMAP specification.
Principal/set This is a standard "/set" method as described in . -Managing principals is likely tied to a directory service or some other vendor-specific solution and may occur out-of-band, or via an additional capability defined elsewhere. Allowing direct user modification of properties has security considerations, as noted in . Servers MUST reject any change it doesn’t allow with a forbidden SetError. +Managing principals is likely tied to a directory service or some other vendor-specific solution. This management may occur out-of-band, or via an additional capability defined elsewhere. Allowing direct user modification of properties has security considerations, as noted in . Servers MUST reject any change it doesn’t allow with a forbidden SetError. Where a server does support changes via this API, it SHOULD allow an update to the "name", "description" and "timeZone" properties of the Principal with the same id as the "currentUserPrincipalId" in the Account capabilities. This allows the user to update their own details.
@@ -163,7 +163,7 @@ for this principal that the user has access to, or null if none.
Principal/queryChanges -This is a standard "/queryChanges" method as described in . Note, implementations backed by an external directory may be unable to calculate changes, in which they will always return a "cannotCalculateChanges" error, as described in the core JMAP specification. +This is a standard "/queryChanges" method as described in . Note: implementations backed by an external directory may be unable to calculate changes. In this case, they will always return a "cannotCalculateChanges" error as described in the core JMAP specification.
@@ -207,7 +207,7 @@ for this principal that the user has access to, or null if none.
  • newRights: String[Boolean]|null (immutable; server-set) The "myRights" property of the object for the user after the change.
  • name: String (immutable; server-set) -The name of the object at the time the notification was made. Determining the name will depend on the data type in question, for example it might be the "title" property of a CalendarEvent or the "name" of a Mailbox, and is implementation specific. The name is to show to users who have had their access rights to the object removed, so that they know what it is they can no longer access.
  • +The name of the object at the time the notification was made. Determining the name will depend on the data type in question. For example it might be the "title" property of a CalendarEvent or the "name" of a Mailbox. The name is to show to users who have had their access rights to the object removed, so that these users know what it is they can no longer access. @@ -259,11 +259,12 @@ for this principal that the user has access to, or null if none.
    Example @@ -288,7 +289,7 @@ for this principal that the user has access to, or null if none.
  • name: String A name for this list of todos.
  • isSubscribed: Boolean -Has the user indicated they wish to see this list? If false, clients should not display this todo list with the user's other lists, but should provide a means for users to see and subscribe to all lists that have been shared with them.
  • +True if the user has indicated they wish to see this list. If false, clients should not display this todo list with the user's other lists, but should provide a means for users to see and subscribe to all lists that have been shared with them.
  • myRights: TodoListRights The set of permissions the user currently has for this todo list.
  • shareWith: Id[TodoListRights]|null @@ -399,7 +400,7 @@ for this principal that the user has access to, or null if none.
  • Unnoticed sharing -Sharing data with another user allows someone to turn a transitory account compromise (e.g., brief access to an unlocked, logged in client) into a persistant compromise (by setting up sharing with a user controlled by the attacker). This can be mitigated by requiring further authorisation for configuring sharing, or sending notifications to the sharer via another channel whenever a new sharee is added. +Sharing data with another user allows someone to turn a transitory account compromise (e.g., brief access to an unlocked or logged-in client) into a persistent compromise (by setting up sharing with a user that is controlled by the attacker). This can be mitigated by requiring further authorisation for configuring sharing, or sending notifications to the sharer via another channel whenever a new sharee is added.
    Unauthorised principals