This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the \"Internet Official Protocol Standards\" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.Abstract
Authorization is a key function in presence systems. Authorization policies, also known as authorization rules, specify what presence information can be given to which watchers, and when. This
specification defines an Extensible Markup Language (XML) document format for expressing presence authorization rules. Such a document can be manipulated by clients using the XML Configuration Access Protocol (XCAP), although other techniques are permitted.Table of Contents
1. Introduction ....................................................2 2. Terminology .....................................................3 3. Structure of Presence Authorization Documents ...................3 3.1. Conditions .................................................4 3.1.1. Identity ............................................4 3.1.1.1. Acceptable Forms of Authentication .........4 3.1.1.2. Computing a URI for the Watcher ............5 3.1.2. Sphere ..............................................6 3.2. Actions ....................................................7 3.2.1. Subscription Handling ...............................7 3.3. Transformations ............................................9 3.3.1. Providing Access to Data Component Elements .........9 3.3.1.1. Device Information .........................9 3.3.1.2. Person Information ........................10 3.3.1.3. Service Information .......................11 3.3.2. Providing Access to Presence Attributes ............12 3.3.2.1. Provide Activities ........................12 3.3.2.2. Provide Class .............................12 3.3.2.3. Provide DeviceID ..........................13 3.3.2.4. Provide Mood ..............................13 3.3.2.5. Provide Place-is ..........................13
Rosenberg Standards Track [Page 1]
RFC 5025 Presence Authorization December 2007 3.3.2.6. Provide Place-type ........................13 3.3.2.7. Provide Privacy ...........................13 3.3.2.8. Provide Relationship ......................14 3.3.2.9. Provide Sphere ............................14 3.3.2.10. Provide Status-Icon ......................14 3.3.2.11. Provide Time-Offset ......................14 3.3.2.12. Provide User-Input .......................14 3.3.2.13. Provide Note .............................15 3.3.2.14. Provide Unknown Attribute ................15 3.3.2.15. Provide All Attributes ...................16 4. When to Apply the Authorization Policies .......................17 5. Implementation Requirements ....................................17 6. Example Document ...............................................18 7. XML Schema .....................................................19 8. Schema Extensibility ...........................................21 9. XCAP Usage .....................................................22 9.1. Application Unique ID .....................................22 9.2. XML Schema ................................................22 9.3. Default Namespace .........................................22 9.4. MIME Type .................................................22 9.5. Validation Constraints ....................................22 9.6. Data Semantics ............................................22 9.7. Naming Conventions ........................................23 9.8. Resource Interdependencies ................................23 9.9. Authorization Policies ....................................23 10. Security Considerations .......................................23 11. IANA Considerations ...........................................24 11.1. XCAP Application Usage ID ................................24 11.2. URN Sub-Namespace Registration ...........................25 11.3. XML Schema Registrations .................................25 12. Acknowledgements ..............................................26 13. References ....................................................26 13.1. Normative References .....................................26 13.2. Informative References ...................................271. Introduction
The Session Initiation Protocol (SIP) for Instant Messaging and
Presence (SIMPLE) specifications allow a user, called a watcher, to subscribe to another user, called a presentity [17], in order to
learn their presence information [18]. This subscription is handled by a presence agent. However, presence information is sensitive, and a presence agent needs authorization from the presentity prior to handing out presence information. As such, a presence authorization document format is needed. This specification defines a format for such a document, called a presence authorization document.
Rosenberg Standards Track [Page 2]
RFC 5025 Presence Authorization December 2007 [8] specifies a framework for representing authorization policies, and is applicable to systems such as geo-location and presence. This framework is used as the basis for presence authorization documents. In the framework, an authorization policy is a set of rules. Each rule contains conditions, actions, and transformations. The
conditions specify under what conditions the rule is to be applied to presence server processing. The actions element tells the server what actions to take. The transformations element indicates how the presence data is to be manipulated before being presented to that watcher, and as such, defines a privacy filtering operation. [8] identifies a small number of specific conditions common to presence and location services, and leaves it to other specifications, such as this one, to fill in usage specific details.
A presence authorization document can be manipulated by clients using several means. One such mechanism is the XML Configuration Access Protocol (XCAP) [2]. This specification defines the details
necessary for using XCAP to manage presence authorization documents.2. Terminology
In this document, the key words \"MUST\
\"SHALL\ and \"OPTIONAL\" are to be interpreted as described in RFC 2119 [1] and indicate requirement levels for compliant implementations.3. Structure of Presence Authorization Documents
A presence authorization document is an XML document, formatted according to the schema defined in [8]. Presence authorization documents inherit the MIME type of common policy documents,
application/auth-policy+xml. As described in [8], this document is composed of rules that contain three parts - conditions, actions, and transformations. Each action or transformation, which is also called a permission, has the property of being a positive grant of
information to the watcher. As a result, there is a well-defined mechanism for combining actions and transformations obtained from several sources. This mechanism is privacy safe, since the lack of any action or transformation can only result in less information being presented to a watcher.
This section defines the new conditions, actions, and transformations defined by this specification.
Rosenberg Standards Track [Page 3]
RFC 5025 Presence Authorization December 20073.1. Conditions3.1.1. Identity
Although the o Define the procedure for representing the identity of the WR (Watcher/Requestor) as a URI or Internationalized Resource Identifier (IRI) [13]. This sub-section defines those details for systems based on [18]. It does so in general terms, so that the recommendations defined here apply to existing and future authentication mechanisms in SIP.3.1.1.1. Acceptable Forms of Authentication When used with SIP, a request is considered authenticated if one of the following is true: The watcher proves its identity to the server through a form of cryptographic authentication, including authentication based on a shared secret or a certificate, and that authentication yields an identity for the watcher. The request comes from a sender that is asserting the identity of the watcher, and: 1. the assertion includes a claim that the asserting party used a form of cryptographic authentication (as defined above) to determine the identity of the watcher, and 2. the server trusts that assertion, and 3. the assertion provides an identity in the form of a URI. Based on this definition, examples of valid authentication techniques include SIP [5], digest authentication [4], cryptographically verified identity assertions (RFC 4474 [15]), and identity assertions made in closed network environments (RFC 3325 [16]). However, the anonymous authentication described on page 194 of RFC 3261 [5] is not considered a valid mechanism for authentication Rosenberg Standards Track [Page 4] RFC 5025 Presence Authorization December 2007 because it does not produce an identity for the watcher. However, an anonymous From header field, when used in conjunction with RFC 4474 [15], is considered an acceptable mechanism for authentication, since it still implies that the asserting node performed authentication that produced the identity of the watcher.3.1.1.2. Computing a URI for the Watcher Computing the URI for the watcher depends on whether the identity is being ascertained through authentication or through an asserted identity. If an identity assertion is being utilized, the asserted identity itself (which is in the form of a URI for acceptable forms of identity assertion) is utilized as the URI. If the identity assertion mechanism asserts multiple URIs for the watcher, then each of them is used for the comparisons outlined in [8], and if any of them match a If an identity is being determined directly by a cryptographic authentication, that authentication must produce a URI, or must produce some form of identifier that can be linked, through provisioning, to a URI that is bound to that identifier. For example, in the case of SIP Digest authentication, the authentication process produces a username scoped within a realm. That username and realm are bound to an Address of Record (AOR) through provisioning, and the resulting AOR is used as the watcher URI. Consider the following \"user record\" in a database: SIP AOR: sip:alice@example.com digest username: ali digest password: f779ajvvh8a6s6 digest realm: example.com If the presence server receives a SUBSCRIBE request, challenges it with the realm set to \"example.com\ contains an Authorization header field with a username of \"ali\" and a digest response generated with the password \"f779ajvvh8a6s6\ identity used in matching operations is \"sip:alice@example.com\". In SIP systems, it is possible for a user to have aliases - that is, there are multiple SIP AORs \"assigned\" to a single user. In terms of this specification, there is no relationship between those aliases. Each would look like a different user. This will be the consequence for systems where the watcher is in a different domain than the presentity. However, even if the watcher and presentity are in the Rosenberg Standards Track [Page 5] RFC 5025 Presence Authorization December 2007 same domain, and the presence server knows that there are aliases for the watcher, these aliases are not mapped to each other or used in any way. SIP also allows for anonymous requests. If a request is anonymous because the watcher utilized an authentication mechanism that does not provide an identity to the presence server (such as the SIP digest \"anonymous\" username), the request is considered unauthenticated (as discussed above) and will match only an empty It is important to note that SIP frequently uses both SIP URI and tel URI [12] as identifiers, and to make matters more confusing, a SIP URI can contain a phone number in its user part, in the same format used in a tel URI. A WR identity that is a SIP URI with a phone number will NOT match the The To compute the value of component [10], and all of those containing the element have the same value for it, which is the value used for the inconsistent values, its value is considered undefined in terms of presence policy processing. Care must be taken in using dynamically, a state change can cause a subscription to be suddenly terminated. The watcher has no way to know, aside from polling, when their subscription would be reinstated as the value of Rosenberg Standards Track [Page 6] RFC 5025 Presence Authorization December 2007 changes. For this reason, 3.2.1. Subscription Handling The permission, if correlations exist between permissions, they must be merged into a single variable. That is what is done here. The block: This action tells the server to reject the subscription, placing it in the \"terminated\" state. It has the value of zero, and it represents the default value. No value of the confirm: This action tells the server to place the subscription in the \"pending\" state, and await input from the presentity to determine how to proceed. It has a value of ten. polite-block: This action tells the server to place the subscription into the \"active\" state, and to produce a presence document that indicates that the presentity is unavailable. A reasonable document would exclude device and person information elements, and include only a single service whose basic status is set to closed [3]. This action has a value of twenty. allow: This action tells the server to place the subscription into the \"active\" state. This action has a value of thirty. NOTE WELL: Placing a value of block for this element does not guarantee that a subscription is denied! If any matching rule has any other value for this element, the subscription will receive treatment based on the maximum of those other values. This is based on the combining rules defined in [8]. Rosenberg Standards Track [Page 7] RFC 5025 Presence Authorization December 2007 Future specifications that wish to define new types of actions MUST define an entirely new action (separate from defined by a future specification; in that case, since each action is always a positive grant of information, the resulting action is the least restrictive one across both elements. The exact behavior of a presence server upon a change in the sub- handling value can be described by utilizing the subscription processing state machine in Figure 1 of RFC 3857 [6]. If the causes a \"rejected\" event to be generated into the subscription state machine for all affected subscriptions. This will cause the state machine to move into the \"terminated\" state, resulting in the transmission of a NOTIFY to the watcher with a Subscription-State header field with value \"terminated\" and a reason of \"rejected\" [7], which terminates their subscription. If a new subscription arrives later on, and the value of If the Unfortunately, the state machine in RFC 3857 does not define an event corresponding to an authorization decision of \"pending\". If the subscription is in the \"active\" state, it moves back into the \"pending\" state. This causes a NOTIFY to be sent, updating the Subscription-State [7] to \"pending\". No reason is included in the Subscription-State header field (none are defined to handle this case). No further documents are sent to this watcher. There is no change in state if the subscription is in the \"pending\ or \"terminated\" states. If a new subscription arrives later on, and the value of SUBSCRIBE is generated, followed by a NOTIFY with Subscription-State of \"pending\". No presence document is included in that NOTIFY. If the subscriptions. If the subscription was in the \"pending\" state, the state machine will move to the \"active\" state, resulting in the transmission of a NOTIFY with a Subscription-State header field of \"active\ Rosenberg Standards Track [Page 8] RFC 5025 Presence Authorization December 2007 If the subscription was in the \"waiting\" state, it will move into the \"terminated\" state. If a new subscription arrives later on, and the value of \"polite-block\" or \"allow\ \"subscribe, policy=accept\" branch from the \"init\" state, and a 200 OK response to the SUBSCRIBE is generated, followed by a NOTIFY with Subscription-State of \"active\" with a presence document in the body of the NOTIFY.3.3. Transformations The transformations defined here are used to drive the behavior of the privacy filtering operation. Each transformation defines the visibility a watcher is granted to a particular component of the presence document. One group of transformations grants visibility to person, device, and service data elements based on identifying information for those elements. Another group of transformations provides access to particular data elements in the presence document.3.3.1. Providing Access to Data Component Elements The transformations in this section provide access to person, device, and service data component elements. Once access has been granted to such an element, access to specific presence attributes for that element is controlled by the permissions defined in Section 3.3.2.3.3.1.1. Device Information The occurrence-id) and value (value of the class, value of the deviceID, or value of the occurrence-id). For example, consider the following Rosenberg Standards Track [Page 9] RFC 5025 Presence Authorization December 2007 This set has two members. This is combined with a The result of the set combination (using the union operation) is a set with three elements: The Permission is granted to see a particular device occurrence if one of the device identifiers in the set identifies that device occurrence. If a device occurrence is included in the presence document. In addition, a device occurrence is included in the presence document if the The occurrence. This specification defines two types of elements in the set - occurrence-id). The Rosenberg Standards Track [Page 10] RFC 5025 Presence Authorization December 2007 special value combination is done identically to the occurrence matches the value of the 3.3.1.3. Service Information The Like identifies a service by its service URI scheme. Each member of the set is identified by its type (class, occurrence-id, service-uri, or service-uri-scheme) and value (value of the class, value of the occurrence-id, value of the service-uri, or value of the service- uri-scheme). The occurrence. If a occurrence is included in the presence document. If a matches the value of the Rosenberg Standards Track [Page 11] RFC 5025 Presence Authorization December 2007 sensitive equality, the service occurrence is included in the presence document. If a presence document. In addition, a service occurrence is included in the presence document if the 3.3.2. Providing Access to Presence Attributes The permissions of Section 3.3.1 provide coarse-grained access to presence data by allowing or blocking specific services or devices, and allowing or blocking person information. Once person, device, or service information is included in the document, the permissions in this section define which presence attributes are reported there. Certain information is always reported. In particular, the This permission controls access to the This permission controls access to the Rosenberg Standards Track [Page 12] RFC 5025 Presence Authorization December 20073.3.2.3. Provide DeviceID This permission controls access to the providing this permission is This permission controls access to the This permission controls access to the This permission controls access to the This permission controls access to the Rosenberg Standards Track [Page 13] RFC 5025 Presence Authorization December 20073.3.2.8. Provide Relationship This permission controls access to the This permission controls access to the watcher. If FALSE, this presence attribute is removed if present.3.3.2.10. Provide Status-Icon This permission controls access to the This permission controls access to the 3.3.2.12. Provide User-Input This permission controls access to the false: This value indicates that the Rosenberg Standards Track [Page 14] RFC 5025 Presence Authorization December 2007 bare: This value indicates that the thresholds: This value indicates that the This permission controls access to the Boolean type. If its value is TRUE, then any This permission has no bearing on any 3.3.2.14. Provide Unknown Attribute It is important that systems be allowed to include proprietary or new presence information and that users be able to set permissions for that information, without requiring an upgrade of the presence server and authorization system. For this reason, the (supplied as mandatory attributes of the Rosenberg Standards Track [Page 15] RFC 5025 Presence Authorization December 2007 child elements of the Presence Information Data Format (PIDF) Another consequence of this definition is that the interpretation of the presence server be upgraded. For example, consider a server that, prior to the upgrade, had an authorization document that used 3.3.2.15. Provide All Attributes This permission grants access to all presence attributes in all of the person, device, and tuple elements that are present in the document (the ones present in the document are determined by the permissions). It is effectively a macro that expands into a set of provide-activities, provide-class, provide-deviceID, provide-mood, provide-place-is, provide-place-type, provide-privacy, provide- relationship, provide-sphere, provide-status-icon, provide-time- offset, provide-user-input, provide-note, and provide-unknown- attribute permissions such that each presence attribute in the document has a permission for it. This implies that, so long as an entire person, service, or device occurrence is provided, every single presence attribute, including ones not known to the server and/or defined in future presence document extensions, is granted to the watcher. Rosenberg Standards Track [Page 16] RFC 5025 Presence Authorization December 20074. When to Apply the Authorization Policies This specification does not mandate at what point in the processing of presence data the privacy filtering aspects of the authorization policy are applied. However, they must be applied such that the final presence document sent to the watcher is compliant to the privacy policy described in the authorization documents that apply to the user (there can be more than one; the rules for combining them are described in [8]). More concretely, if the presence document sent to a watcher is D, and the privacy filtering operation applied do a presence document x is F(x), then D MUST have the property that D = F(D). In other words, further applications of the privacy filtering operation would not result in any further changes of the presence document, making further application of the filtering operation a no-op. A corollary of this is that F(F(D)) = D for all D. The subscription processing aspects of the document get applied by the server when it decides to accept or reject the subscription.5. Implementation Requirements The rules defined by the document in this specification form a \"contract\" of sorts between a client that creates this document and the server that executes the policies it contains. Consequently, presence servers implementing this specification MUST support all of the conditions, actions, and transformations defined in this specification. If servers were to implement a subset of these, clients would need a mechanism to discover which subset is supported. No such mechanism is defined. It is RECOMMENDED that clients support all of the actions, transformations, and conditions defined in this specification. If a client supports a subset, it is possible that a user might manipulate their authorization rules from a different client, supporting a different subset, and store those results on the server. When the user goes back to the first client and views their presence authorization rules there, the client may not be able to properly render or manipulate the document retrieved from the server, since it may contain conditions, actions, or transformations not supported by the client. The only reason that this normative requirement is not a MUST is that there are valid conditions in which a user manipulates their presence authorization rules from a single client, in which case this problem does not occur. This specification makes no normative recommendations on the mechanism used to transport presence authorization documents from Rosenberg Standards Track [Page 17] RFC 5025 Presence Authorization December 2007 clients to their servers. Although Section 9 defines how to utilize XCAP, XCAP is not normatively required by this specification.6. Example Document The following presence authorization document specifies permissions for the user \"user@example.com\". The watcher is allowed to access presence information (the ’allow’ value for \"idle-threshold\" and \"since\" attributes in the