RFC 9425: JSON Meta Application Protocol (JMAP) for Quotas
- R. Cordier, Ed.
Abstract
This document specifies a data model for handling quotas on accounts with a server using the JSON Meta Application Protocol (JMAP).¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://
1. Introduction
The JSON Meta Application Protocol (JMAP) [RFC8620] is a generic protocol for synchronizing data, such as mails, calendars, or contacts between a client and a server. It is optimized for mobile and web environments and aims to provide a consistent interface to different data types.¶
This specification defines a data model for handling quotas over JMAP, allowing a user to obtain details about a certain quota.¶
This specification does not address quota administration, which should be handled by other means.¶
1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Type signatures, examples, and property descriptions in this document follow the conventions established in Section 1.1 of [RFC8620]. Data types defined in the core specification are also used in this document.¶
1.2. Terminology
This document reuses the terminology from the core JMAP specification established in Section 1.6 of [RFC8620].¶
The term "Quota" (when capitalized) is used to refer to the data type defined in Section 4 and instance of that data type.¶
2. Addition to the Capabilities Object
The capabilities object is returned as part of the JMAP Session object; see [RFC8620], Section 2.¶
This document defines one additional capability URI.¶
2.1. urn:ietf:params:jmap:quota
This represents support for the Quota data type and associated API methods. Servers supporting this specification MUST add a property called "urn
The value of this property is an empty object in both the JMAP Session capabilities property and an account's account
3. Sub-types of the Quota Data Type
There are two fields within the Quota data type, which have an enumerated set of possible values. These are:¶
3.1. Scope
The Scope data type is used to represent the entities the quota applies to. It is defined as a "String" with values from the following set:¶
3.2. ResourceType
The ResourceType data type is used to act as a unit of measure for the quota usage. It is defined as a "String" with values from the following set:¶
4. Quota
The Quota is an object that displays the limit set to an account usage. It then shows as well the current usage in regard to that limit.¶
4.1. Properties of the Quota Object
The Quota object MUST contain the following fields:¶
The Quota object MAY contain the following fields:¶
The following JMAP methods are supported.¶
4.2. Quota/get
Standard "/get" method as described in [RFC8620], Section 5.1. The id's argument may be "null" to fetch all quotas of the account at once, as demonstrated in Section 5.1.¶
4.3. Quota/changes
Standard "/changes" method as described in [RFC8620], Section 5.2, but with one extra argument in the response:¶
Since "used" frequently changes, but other properties are generally only
changed rarely, the server can help the client optimize data transfer by
keeping track of changes to quota usage separate from other state changes. The
updated
Servers MAY decide to add other properties to the list that they judge to be changing frequently.¶
This method's usage is demonstrated in Section 5.2.¶
4.4. Quota/query
This is a standard "/query" method as described in [RFC8620], Section 5.5.¶
A FilterCondition object has the following properties, any of which may be included or omitted:¶
A Quota object matches the FilterCondition if, and only if, all the given conditions match. If zero properties are specified, it is automatically true for all objects.¶
The following Quota properties MUST be supported for sorting:¶
4.5. Quota/queryChanges
This is a standard "/queryChanges" method as described in [RFC8620], Section 5.6.¶
6. Push
Servers MUST support the JMAP push mechanisms, as specified in [RFC8620], Section 7, to allow clients to receive notifications when the state changes for the Quota type defined in this specification.¶
7. IANA Considerations
7.1. JMAP Capability Registration for "quota"
IANA has registered the "quota" JMAP Capability as follows:¶
8. Security Considerations
All security considerations of JMAP [RFC8620] apply to this specification.¶
Implementors should be careful to make sure the implementation of the extension specified in this document does not violate the site's security policy. The resource usage of other users is likely to be considered confidential information and should not be divulged to unauthorized persons.¶
As for any resource shared across users (for example, a quota with the "domain" or "global" scope), a user that can consume the resource can affect the resources available to the other users. For example, a user could spam themselves with events and make the shared resource hit the limit and unusable for others (implementors could mitigate that with some rate-limiting implementation on the server).¶
Also, revealing domain and global quota counts to all users may cause privacy leakage of other sensitive data, or at least the existence of other sensitive data. For example, some users are part of a private list belonging to the server, so they shouldn't know how many users are in there. However, by comparing the quota count before and after sending a message to the list, it could reveal the number of people of the list, as the domain or global quota count would go up by the number of people subscribed. In order to limit those attacks, quotas with "domain" or "global" scope SHOULD only be visible to server administrators and not to general users.¶
9. Normative References
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC3629]
-
Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, DOI 10
.17487 , , <https:///RFC3629 www >..rfc -editor .org /info /rfc3629 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC8620]
-
Jenkins, N. and C. Newman, "The JSON Meta Application Protocol (JMAP)", RFC 8620, DOI 10
.17487 , , <https:///RFC8620 www >..rfc -editor .org /info /rfc8620 - [RFC9007]
-
Ouazana, R., Ed., "Handling Message Disposition Notification with the JSON Meta Application Protocol (JMAP)", RFC 9007, DOI 10
.17487 , , <https:///RFC9007 www >..rfc -editor .org /info /rfc9007 - [RFC9110]
-
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10
.17487 , , <https:///RFC9110 www >..rfc -editor .org /info /rfc9110
Acknowledgements
Thank you to Michael Bailly, who co-wrote the first draft version of this document, before deciding to turn to other matters.¶
Thank you to Benoit Tellier for his constant help and support on writing this document.¶
Thank you to Raphael Ouazana for sharing his own experience on how to write an RFC after finalizing his own document: [RFC9007].¶
Thank you to Bron Gondwana, Neil Jenkins, Alexey Melnikov, Joris Baum, and the people from the IETF JMAP working group in general, who helped with extensive discussions, reviews, and feedback.¶
Thank you to the people in the IETF organization, who took the time to read, understand, comment, and give great feedback in the last rounds.¶