From ec3070d9b52e3bd936d538daaf44e79787eb3a3b Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 20 Feb 2023 12:18:40 +0100 Subject: [PATCH] XEP-STANZA-ID (359): Add security consideration and --- xep-0359.xml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/xep-0359.xml b/xep-0359.xml index c3f6e493..61c144f4 100644 --- a/xep-0359.xml +++ b/xep-0359.xml @@ -12,7 +12,7 @@ This specification describes unique and stable IDs for messages. &LEGALNOTICE; 0359 - Deferred + Experimental 2018-11-03 Standards Track Standards @@ -24,6 +24,12 @@ stanza-id &flow; + + 0.7.0 + 2023-02-20 + fs +

Add security consideration regarding spoofability and reference example

+
0.6.1 2020-11-03 @@ -166,6 +172,12 @@
  • The value of the 'by' attribute MUST be the XMPP address of the entity assigning the unique and stable stanza ID. For one-on-one messages the assigning entity is the account. In groupchats the assigning entity is the room. Note that XMPP addresses are normalized as defined in &rfc6122;.
  • + +

    The <referenced-stanza/> element can be used to reference another stanza. The <referenced-stanza/> element MUST be qualified by the 'urn:xmpp:sid:0' namespace and MUST have an 'id' attribute and SHOULD have a 'by' attribute. The values of the attributes are the values of the referenced stanza's <stanza-id/> element.

    + +]]> +

    An entity that follows the business rules, especially the rule on overriding the ID in elements where the by atttribute matches the 'by' attribute they would otherwise set, SHOULD announce the 'urn:xmpp:sid:0' namespace in its disco features allowing other entities to verify that those business rules are properly enforced.

    +

    The value of origin-id is spoofable and hence SHOULD not be used when referencing other stanzas. The value tuple of 'id' and 'by' of the stanza-id element is unspoofable iff all involved implementations follow the requirements of this specification.

    The value of the 'id' attribute should not provide any further information besides the opaque ID itself. Entities observing the value MUST NOT be able to infer any information from it, e.g. the size of the message archive. The value of 'id' MUST be considered a non-secret value.

    Before processing the stanza ID of a message and using it for deduplication purposes or for MAM catchup, the receiving entity SHOULD ensure that the stanza ID could not have been faked, by verifying that the entity referenced in the by attribute does annouce the 'urn:xmpp:sid:0' namespace in its disco features.

    @@ -241,9 +254,16 @@ + + + + + + + ]]> -

    Thanks to Thijs Alkemade and Georg Lukas for providing feedback.

    +

    Thanks to Thijs Alkemade, Georg Lukas, and Maxime Buquet for providing feedback.