rfc-5874

An Extensible Markup Language (XML) Document Format for Indicating a Change in XML Configuration Access Protocol (XCAP) Resources

J. Rosenberg, J. Urpalainen
date2010-05 streamIETF arearai wgsimple statusPROPOSED STANDARD pages24 canonicalhttps://www.rfc-editor.org/rfc/rfc5874 doi10.17487/RFC5874
This specification defines a document format that can be used to indicate that a change has occurred in a document managed by the Extensible Markup Language (XML) Configuration Access Protocol (XCAP). This format reports which document has changed and its former and new entity tags. It can report the differences between versions of the document, using an XML patch format. It can report existing element and attribute content when versions of an XCAP server document change. XCAP diff documents can be delivered to diff clients using a number of means, including a Session Initiation Protocol (SIP) event package. [STANDARDS-TRACK]

Extracted elements (28)

design-rationale §1

Content indirection (RFC 4483) was considered but rejected as the basis for change notifications because it uses a MIME Content-ID rather than an HTTP entity tag, making it impossible for clients to determine whether a reported change was caused by their own prior operation or by another concurrent XCAP client. The XCAP diff format exposes previous- and new-ETags explicitly to address this.

sip, realtime

design-rationale §3

Requiring multiple <document> elements for the same document to be applicable in document order (rather than requiring clients to sort them) is a deliberate simplification to reduce implementation complexity in diff clients.

sip, realtime

design-rationale §1

XML canonical form with comments (W3C C14N) is specified as the basis for determining logical equivalence when patching locally cached XCAP documents, because XML documents that are application-equivalent may differ in physical representation.

sip, realtime

interoperability-note §3

Patch operation elements <add>, <replace>, and <remove> reuse the corresponding types defined in RFC 5261. Namespace resolving rules for these elements follow Section 4.2.1 of RFC 5261.

sip, realtime

interoperability-note §3

The 'sel' attribute of <element> and <attribute> elements uses XCAP Node Selector conventions (Section 6.4 of RFC 4825) including namespace prefix resolution rules; without a namespace prefix in an element selector, the XCAP Default Document Namespace MUST be applied.

sip, realtime

normative-requirement §6 MUST

A diff client MUST apply a resource state change only if entity tag values match with octet-by-octet equivalence per the state table. If inconsistencies or errors are noticed, the diff client SHOULD tear down the session.

sip, realtime

normative-requirement §6 MUST

A diff notifier MAY skip intermediate document versions (e.g., for rapidly changing resources) but MUST always report changes consistently so the diff client can correctly update the latest state (content and ETag) of locally cached resources.

sip, realtime

normative-requirement §3 MUST

All namespace declarations needed by a located XML element MUST exist within the xcap-diff document. Namespace prefixes of QNames remain as in the source XCAP document.

sip, realtime

normative-requirement §6 MUST

Diff notifiers MUST obey XCAP authorization rules by following read privilege rules when notifying authenticated diff clients of changes. Transport SHOULD be secured by encryption.

sip, realtime, security

normative-requirement §3 MUST

If the change being reported is removal of a document, only the 'previous-etag' attribute MUST be included and the 'new-etag' attribute MUST NOT be present in the <document> element.

sip, realtime

normative-requirement §3 MUST

Multiple <document> elements referencing the same document MUST be applicable in the document order given; patches MUST be applied in that order, eliminating any need for clients to sort them.

sip, realtime

normative-requirement §6 MUST

State changes of an XCAP document MUST be delivered reliably from diff notifier to diff client in chronological order. If an XCAP diff delivery is lost, the diff session MUST be torn down.

sip, realtime

normative-requirement §3 MUST

The XCAP Node Selector in the 'sel' attribute of <element> MUST always locate a unique node. When the located element content cannot be presented (e.g., payload too large), the <element> element MUST NOT have any child nodes.

sip, realtime

normative-requirement §3 MUST

Unknown extension elements or attributes in places where the XML schema allows them MUST be ignored by the diff client, enabling forward-compatible extensibility.

sip, realtime

normative-requirement §7 SHOULD

When the XCAP diff format is transported via the SIP event package, end-to-end S/MIME SHOULD be used. If unavailable, TLS between elements is RECOMMENDED for hop-by-hop authentication and encryption.

sip, tls, security, realtime

normative-requirement §6 MUST

When using an unreliable transport with retransmissions, the application protocol MUST ensure that duplicate XCAP diff deliveries are dropped.

sip, realtime

normative-requirement §3 MUST

XCAP diff documents MUST be well-formed XML and SHOULD be valid per the schema. They MUST be based on XML 1.0 and MUST be encoded using UTF-8.

sip, realtime

protocol-element §3

The <attribute> element reports the existing value of an XCAP document attribute. It has a mandatory 'sel' attribute (percent-encoded relative URI) and an optional boolean 'exists' attribute; its text node child carries the attribute value.

sip, realtime

protocol-element §3

The <body-not-changed> element inside a <document> element indicates that only the ETag changed but document content is semantically unchanged. It is mutually exclusive with patch operation elements (<add>, <replace>, <remove>).

sip, realtime

protocol-element §3

The <document> element reports changes to a specific XCAP document. It has one mandatory attribute 'sel' (relative path reference from xcap-root) and two optional attributes 'new-etag' and 'previous-etag' (strings) representing the entity tags after and before the change respectively.

sip, realtime

protocol-element §3

The <element> element reports the existing content of an XCAP document element. It has a mandatory 'sel' attribute (percent-encoded relative URI) and an optional boolean 'exists' attribute; absence of 'exists' implies the element is present, and its child is the located XML element.

sip, realtime

protocol-element §3

The root element <xcap-diff> carries a mandatory 'xcap-root' attribute (anyURI) identifying the XCAP root URI for all changed documents reported in the document. A single XCAP diff document can only represent changes within one XCAP root.

sip, realtime

registry §8.1

Registers the 'application/xcap-diff+xml' MIME type for XCAP diff documents. The optional charset parameter and encoding considerations follow application/xml (RFC 3023). File extension is '.xdf'.

registry, sip

registry §8.2

Registers the XML namespace URN 'urn:ietf:params:xml:ns:xcap-diff' per RFC 3688 for identifying XCAP diff documents and their elements.

registry, sip

registry §8.3

Registers the XML schema URI 'urn:ietf:params:xml:schema:xcap-diff' per RFC 3688; the schema content is the normative XML Schema defined in Section 4 of this document.

registry, sip

security-consideration §7

Very frequent XCAP document updates and/or many diff clients per subscribed resource create a Denial-of-Service attack surface on servers processing XCAP diff documents. Efficient patch processing and throttling are recommended mitigations.

security, sip

security-consideration §7

XCAP diff documents convey document content changes; if the underlying XCAP document requires confidentiality, integrity, or authentication, the same requirements apply to the diff format and its transport. Confidential XCAP documents are typically protected by TLS per RFC 4825.

security, tls, sip

wire-format §3

The <document> element state table encodes five distinct resource-change semantics via presence/absence of 'previous-etag', 'new-etag', and patch children: (a) patch included, (b) patch omitted/external retrieval, (c) ETag-only change via <body-not-changed>, (d) resource created, (e) resource removed (only 'previous-etag' present).

sip, realtime