RFC 6721

The Atom "deleted-entry" Element

πŸ“… published September 2012, from ietf

The Atom "deleted-entry" Element πŸŽ€

Okay bestie, paperwork first πŸ’… This is RFC 6721, written by J. Snell and published in September 2012. It's on the Standards Track πŸ”₯ with ISSN 2070-1721. The header doesn't list any RFCs it obsoletes or updates, so nothing else to juggle there ✨

Abstract ✨

So this spec gives Atom publishers a way to say "hey, this entry is gone" 🫢 Atom is the Atom Syndication Format, and this adds mechanisms that publishers of Atom Feed and Entry documents can use to explicitly identify Atom entries that have been removed.

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 5741.

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6721.

Copyright (c) 2012 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 (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents πŸ—‚οΈ

1. Introduction ....................................................2
2. Notational Conventions ..........................................2
3. The at:deleted-entry Element ....................................2
4. Deleted Entry Document ..........................................5
5. Digital Signatures ..............................................6
6. Encryption ......................................................7
7. Security Considerations .........................................7
8. IANA Considerations .............................................8
9. Acknowledgements ................................................9
10. Normative References ...........................................9

1. Introduction ✨

Atom [RFC4287] is an XML-based document format for lists of related information called "feeds" πŸ“° Feeds are made of items called "entries", and each one can carry an extensible set of attached metadata. The main thing Atom is built for is syndicating Web content, like weblogs and news headlines, out to Web sites and straight to user agents.

Here's the problem 😭 In base Atom, if an entry gets removed from a feed after a consumer already grabbed and processed it (maybe it got stashed in a local cache or shown on screen), there's no way to tell that it was removed. This spec fixes that by giving publishers a way to explicitly flag removed entries, so consumers can update things like their document cache and user interfaces accordingly πŸ¦‹

2. Notational Conventions πŸ“

These are the big keywords that carry real weight here: "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL". They're to be interpreted as described in [RFC2119] πŸ”‘

This specification uses XML Namespaces [W3C.REC-xml-names-19990114] to uniquely identify XML element names. It uses the following namespace prefix for the indicated namespace URI:

"at": "http://purl.org/atompub/tombstones/1.0"

3. The at:deleted-entry Element πŸͺ¦

The at:deleted-entry element represents an Atom Entry that has been removed. This is the star of the show 🌟

deletedEntry =
  element at:deleted-entry {
    atomCommonAttributes,
    attribute ref { atomUri },
    attribute when { atomDateConstruct },
    ( element at:by { atomPersonConstruct }?
    & element at:comment { atomTextConstruct }?
    & element atom:link { atomLink }*
    & element atom:source { atomSource }?
    & anyElement* )
 }

Okay, the rules for the basics πŸ’… An at:deleted-entry element MUST contain a "ref" attribute, and its value has to specify the value of the atom:id of the entry that was removed.

It also MUST contain a "when" attribute. That value is an [RFC3339] "date-time" saying the exact instant the entry was removed. Use an uppercase "T" to separate the date and time, and an uppercase "Z" MUST be present whenever there's no numeric time zone offset. Be precise, bestie ⏰

Now the optional bits πŸŽ€ An at:deleted-entry element MAY contain one at:by element to identify the entity that removed the entry. The at:by element is an Atom Person Construct, as defined by Section 3.2 of [RFC4287].

It MAY also contain one at:comment element, whose value gives extra, language-sensitive info about the deletion. The atom:comment element is an Atom Text Construct, as defined by Section 3.1 of [RFC4287].

It MAY contain any number of atom:link elements, as specified by Section 4.2.7 of [RFC4287] πŸ”—

And it MAY contain one atom:source element, as defined by Section 4.2.11 of [RFC4287]. This one is lowkey iconic πŸ‘‘ Within an at:deleted-entry, the atom:source element lets you aggregate at:deleted-entry elements from different feeds while still keeping track of which source Feed each one came from. If an at:deleted-entry shows up in a Feed document other than its source feed, OR if an at:deleted-entry that has a source Feed document is used in the context of a Deleted Entry Document, then it MUST contain an atom:source element. No skipping that one πŸ™…β€β™€οΈ

Here's the feed-level rule. An Atom feed MAY contain any number of at:deleted-entry elements, but it MUST NOT contain more than one with the same combination of ref and when attribute values. No duplicate tombstones, periodt πŸ’€

Here's what it looks like in action 🧚

<feed xmlns="http://www.w3.org/2005/Atom"
      xmlns:at="http://purl.org/atompub/tombstones/1.0">
   ...
   <!-- Minimal deleted-entry -->
   <at:deleted-entry
     ref="tag:example.org,2005:/entries/1"
     when="2005-11-29T12:11:12Z"/>

   <!-- Extended deleted-entry -->
   <at:deleted-entry
     ref="tag:example.org,2005:/entries/2"
     when="2005-11-29T12:11:12Z">
     <at:by>
       <name>John Doe</name>
       <email>jdoe@example.org</email>
     </at:by>
     <at:comment>Removed comment spam</at:comment>
   </at:deleted-entry>
   ...
</feed>

Now the tricky part, the when-versus-updated drama 🍿 An Atom feed MAY contain atom:entry elements and at:deleted-entry elements that share the same atom:id value. This means either the entry was published to the feed and then removed later, OR a previously removed entry got republished after an earlier deletion. To figure out which one happened, the Processor compares the at:deleted-entry element's when attribute to the atom:updated value of the matching atom:entry element:

  • If the when attribute is equal to or more recent than the atom:updated value, the atom:entry is assumed to have been published and then subsequently removed. Processors SHOULD ignore the older atom:entry element.
  • If the when attribute is older than the atom:updated value, the atom:entry is assumed to have been republished to the feed following a prior removal. Processors SHOULD ignore the older at:deleted-entry element.
Publishers, listen up 🚨 The at:deleted-entry element is advisory only, which means Atom Processors may ignore it. Having an at:deleted-entry element does NOT guarantee the atom:entry it points to is no longer available. Picture this: an entry got published in a feed, an aggregator processed that feed yesterday, and today the entry is deleted and a matching at:deleted-entry gets added as the signal. There's no guarantee that aggregator will even look at the at:deleted-entry during its next run 😬

Elements and attributes from any XML vocabulary MAY be used within an at:deleted-entry element. Processors that run into that extra markup MUST NOT stop processing or signal an error. The Processor might even handle the foreign markup properly and do so. When unknown markup shows up as a child of at:deleted-entry, Processors MAY skip the markup and any textual content, but they MUST NOT change their behavior because that markup is there πŸ™ˆ

This spec lets you use Internationalized Resource Identifiers (IRIs) [RFC3987] in exactly the same way Section 2 of [RFC4287] does 🌈

Any element defined by this specification MAY have an xml:base attribute [W3C.REC-xmlbase-20010627]. When xml:base is used, it does the job described in Section 5.1.1 of [RFC3986], setting the base URI (or IRI) for resolving any relative references inside its effective scope.

And any element defined here MAY have an xml:lang attribute. Its content tells you the natural language for that element and its descendants. The rules for xml:lang content and how to interpret it are in XML 1.0 [W3C.REC-xml-20040204], Section 2.12 πŸ‡¬πŸ‡§

4. Deleted Entry Document πŸ“„

A "Deleted Entry Document" represents exactly one at:deleted-entry element outside the context of an Atom feed. Its root is the at:deleted-entry element. Think of it as a solo tombstone πŸͺ¦

namespace at = "http://purl.org/atompub/tombstones/1.0"
start = at:deleted-entry

Deleted Entry Documents are specified in terms of the XML Information Set, serialized as XML 1.0 [W3C.REC-xml-20040204], and identified with the "application/atomdeleted+xml" media type. Deleted Entry Documents MUST be well-formed XML. This specification doesn't define a DTD for them, so it doesn't require them to be valid (in the sense used by XML) πŸ’–

5. Digital Signatures ✨

okay bestie, the at:deleted-entry element MAY have an Enveloped Signature πŸ–‹οΈ, as described by XML-Signature and Syntax Processing [W3C.REC-xmldsig-core-20020212].

Processors MUST NOT reject an at:deleted-entry just because it has a signature they can't verify πŸ™…β€β™€οΈ. They MUST continue processing, and they MAY let the user know the signature didn't validate πŸ’Œ.

In other words, the presence of a Signature element in the namespace "http://www.w3.org/2000/09/xmldsig#" as a child of the document element MUST NOT make a Processor fail, just because it's there πŸŽ€. Like, it's literally just sitting there, so chill.

Section 6.5.1 of [W3C.REC-xmldsig-core-20020212] requires support for Canonical XML [W3C.REC-xml-c14n-20010315]. Ngl, a lot of implementers skip it 😭, because signed XML documents enclosed in other XML documents end up with their signatures broken πŸ’”. So Processors that verify signed at:deleted-entry elements MUST be able to canonicalize with the exclusive XML canonicalization method identified by the URI "http://www.w3.org/2001/10/xml-exc-c14n#", as specified in Exclusive XML Canonicalization [W3C.REC-xml-exc-c14n-20020718]. The exc one is the main character here πŸ‘‘.

Intermediaries such as aggregators may need to add an atom:source element to an at:deleted-entry that doesn't have its own atom:source element 🧚. If that entry is signed, the addition breaks the signature πŸ’€. So a publisher of individually signed at:deleted-entry's should strongly consider adding an atom:source element to those elements before signing them πŸ“. Implementers should also be aware of the issues around using markup in the "xml:" namespace, since it interacts with canonicalization πŸ™ˆ.

Section 4.4.2 of [W3C.REC-xmldsig-core-20020212] requires support for Digital Signature Algorithm (DSA) signatures and recommends support for RSA signatures. But RSA is way more popular in the market than DSA, so Atom Processors that verify signed Atom Documents MUST be able to verify RSA signatures. They do not need to be able to verify DSA signatures 🌸. Also, due to security issues that can pop up if the keying material for the message authentication code (MAC) isn't handled properly, Atom Documents SHOULD NOT use MACs for signatures 🚫.


6. Encryption πŸ”

The root of a Deleted Entry Document (the at:deleted-entry element) MAY be encrypted using the mechanisms described by XML Encryption Syntax and Processing [W3C.REC-xmlenc-core-20021210] πŸ¦‹.

Section 5.1 of [W3C.REC-xmlenc-core-20021210] requires support of TripleDES, AES-128, and AES-256. Processors that decrypt Deleted Entry Documents MUST be able to decrypt with AES-128 in Cipher Block Chaining (CBC) mode πŸ’œ.

Encryption based on [W3C.REC-xmlenc-core-20021210] does NOT ensure integrity of the original document, so be careful 🚨. There are known cryptographic attacks where someone who can't decrypt a message can still change bits so that part or all of the decrypted message still makes sense, but means something totally different 😱. So Processors that decrypt Deleted Entry Documents SHOULD check the integrity of the decrypted document by verifying the hash in the signature (if any) in the document, or by verifying a hash of the document within the document (if any) πŸ”.

When a Deleted Entry Document is going to be both signed and encrypted, it's generally a good idea to sign the document first and then encrypt the signed document ✨. This gives integrity to the base document while encrypting all the information, including the identity of the entity that signed the document 🫢. Note that if MACs are used for authentication, the order MUST be that the document is signed and then encrypted, and not the other way around πŸ™…β€β™€οΈ. Further, if MACs are used along with a symmetric encryption algorithm, the same key SHOULD NOT be used in the generation of the MAC and the encryption πŸ”‘.


7. Security Considerations πŸ›‘οΈ

As specified in [RFC4287], Atom Processors should be aware of the potential for spoofing attacks, where an attacker publishes atom:entry or atom:deleted-entry elements using the same atom:id values as entries from other Atom feeds πŸ‘€. An attacker may try to trick an application into believing that a given entry has either been removed from or added to a feed. To mitigate this, Atom Processors are advised to ignore at:deleted-entry elements that reference entries that have not previously appeared within the containing Feed document, and should take steps to verify the origin of the Atom feed before considering the entries to be removed 🚩.

The at:deleted-entry element can be encrypted and signed using [W3C.REC-xmlenc-core-20021210] and [W3C.REC-xmldsig-core-20020212], respectively, and it's subject to the security considerations implied by their use πŸ”’.

Digital signatures provide authentication and message integrity with proof of origin πŸ–ŠοΈ. Encryption provides data confidentiality 🀐.

An application that supports digitally signed atom:entry and at:deleted-entry elements should be aware of the potential issues that could arise if an at:deleted-entry element that indicates the deletion of an atom:entry element has been signed using a different key than the one used to sign the atom:entry, or if an unsigned at:deleted-entry is used to indicate the deletion of a signed atom:entry 😱. Either case can potentially indicate a form of spoofing attack. Processors must take steps to verify the validity of the at:deleted-entry element πŸ’….

8. IANA Considerations πŸ“‹

A Deleted Entry Document, when serialized as XML 1.0, can be identified with the following media type 🧾:

   Type name: application

   Subtype name: atomdeleted+xml

   Required parameters: None

   Optional parameters: "charset": This parameter has semantics
   identical to the charset parameter of the "application/xml" media
   type as specified in [RFC3023].

   Encoding considerations: Identical to those of "application/xml"
   as described in [RFC3023], Section 3.2.

   Security considerations: As defined in this specification.  In
   addition, as this media type uses the "+xml" convention, it shares
   the same security considerations as described in [RFC3023],
   Section 10.

   Interoperability considerations: There are no known
   interoperability issues.

   Published specification: This specification.

   Applications that use this media type: Undefined.  As an extension
   to the Atom Syndication Format ([RFC4287]), this specification may
   be used within any application that uses the Atom Format.

   Additional information:

      Magic number(s): As specified for "application/xml" in
      [RFC3023], Section 3.2

      File extension(s): .atomdeleted

      Macintosh file type code(s): TEXT

   Person & email address to contact for further information: James M
   Snell <jasnell@us.ibm.com>

   Intended usage: COMMON

   Restrictions on usage: None.

   Author: James M Snell <jasnell@us.ibm.com>

   Change controller: IESG

9. Acknowledgements 🫢

The author gratefully acknowledges the feedback from the members of the Atom Publishing Format and Protocol working group during the development of this specification πŸ’–.


10. Normative References πŸ“š

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC3023]  Murata, M., St. Laurent, S., and D. Kohn, "XML Media
              Types", RFC 3023, January 2001.

   [RFC3339]  Klyne, G., Ed. and C. Newman, "Date and Time on the
              Internet: Timestamps", RFC 3339, July 2002.

   [RFC3986]  Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
              Resource Identifier (URI): Generic Syntax", STD 66,
              RFC 3986, January 2005.

   [RFC3987]  Duerst, M. and M. Suignard, "Internationalized Resource
              Identifiers (IRIs)", RFC 3987, January 2005.

   [RFC4287]  Nottingham, M., Ed. and R. Sayre, Ed., "The Atom
              Syndication Format", RFC 4287, December 2005.

   [W3C.REC-xml-20040204]
              Yergeau, F., Maler, E., Sperberg-McQueen, C., Paoli, J.,
              and T. Bray, "Extensible Markup Language (XML) 1.0 (Third
              Edition)", World Wide Web Consortium FirstEdition REC-xml-
              20040204, February 2004,
              <http://www.w3.org/TR/2004/REC-xml-20040204>.

   [W3C.REC-xml-c14n-20010315]
              Boyer, J., "Canonical XML Version 1.0", World Wide Web
              Consortium Recommendation REC-xml-c14n-20010315,
              March 2001,
              <http://www.w3.org/TR/2001/REC-xml-c14n-20010315>.

   [W3C.REC-xml-exc-c14n-20020718]
              Reagle, J., 3rd, D., and J. Boyer, "Exclusive XML
              Canonicalization Version 1.0", World Wide Web Consortium
              Recommendation REC-xml-exc-c14n-20020718, July 2002,
              <http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718>.

   [W3C.REC-xml-names-19990114]
              Hollander, D., Bray, T., and A. Layman, "Namespaces in
              XML", World Wide Web Consortium FirstEdition REC-xml-
              names-19990114, January 1999,
              <http://www.w3.org/TR/1999/REC-xml-names-19990114>.

   [W3C.REC-xmlbase-20010627]
              Marsh, J., "XML Base", World Wide Web Consortium
              FirstEdition REC-xmlbase-20010627, June 2001,
              <http://www.w3.org/TR/2001/REC-xmlbase-20010627>.

   [W3C.REC-xmldsig-core-20020212]
              Solo, D., Reagle, J., and D. Eastlake, "XML-Signature
              Syntax and Processing", World Wide Web Consortium
              FirstEdition REC-xmldsig-core-20020212, February 2002,
              <http://www.w3.org/TR/2002/REC-xmldsig-core-20020212>.

   [W3C.REC-xmlenc-core-20021210]
              Eastlake, D. and J. Reagle, "XML Encryption Syntax and
              Processing", World Wide Web Consortium Recommendation REC-
              xmlenc-core-20021210, December 2002,
              <http://www.w3.org/TR/2002/REC-xmlenc-core-20021210>.

Author's Address πŸ’Œ

   James M Snell

   EMail: jasnell@us.ibm.com
   URI:   http://ibm.com
πŸ“¦ where this page comes from