1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 08:45:04 -05:00

Merge branches 'merge/xep-0364', 'merge/xep-0387', 'merge/xep-0413' and 'merge/xep-0414'

This commit is contained in:
Jonas Schäfer 2019-08-20 18:19:30 +02:00
6 changed files with 59 additions and 24 deletions

View File

@ -921,6 +921,7 @@ And by opposing end them?
<section2 topic='Discover Nodes' anchor='entity-nodes'>
<p>If a service implements a hierarchy of nodes (by means of <link url='#collections'>Collection Nodes</link>), it MUST also enable entities to discover the nodes in that hierarchy by means of the <strong>Service Discovery</strong> protocol, subject to the recommendations in <cite>XEP-0030</cite> regarding large result sets (for which &xep0055; or some other protocol SHOULD be used). The following examples show the use of service discovery in discovering the nodes available at a hierarchical pubsub service.</p>
<p>Note: Node hierarchies and collection nodes are OPTIONAL. For details, refer to the <link url='#impl-semantics'>NodeID Semantics</link> and <link url='#collections'>Collection Nodes</link> sections of this document.</p>
<p>The service SHOULD return a full list of the public nodes it hosts (i.e., not return any nodes that don't contain the "http://jabber.org/protocol/pubsub#public" feature or that have the feature set to false).</p>
<p>In the first example, an entity sends a service discovery items ("disco#items") request to the root node (i.e., the service itself), which is a <link url='#collections'>Collection Node</link>:</p>
<example caption='Entity asks service for all first-level nodes'><![CDATA[
<iq type='get'
@ -1067,6 +1068,9 @@ And by opposing end them?
<field var='pubsub#contact' label='People to contact with questions' type='jid-multi'>
<value>bard@shakespeare.lit</value>
</field>
<field var='pubsub#public' label='Make node publicly searchable' type='boolean'>
<value>1</value>
</field>
<field var='pubsub#access_model' label='Access model' type='list-single'>
<value>open</value>
</field>
@ -5230,6 +5234,12 @@ And by opposing end them?
<td>RECOMMENDED</td>
<td><link url='#auto-subscribe'>Auto-Subscribe</link></td>
</tr>
<tr>
<td>public</td>
<td>Public searching for a node is supported.</td>
<td>OPTIONAL</td>
<td><link url='#entity-nodes'>Discover Nodes</link></td>
</tr>
<tr>
<td>publish</td>
<td>Publishing items is supported.</td>
@ -6116,6 +6126,11 @@ xmpp:pubsub.shakespeare.lit?pubsub;action=retrieve;node=princely_musings;item=ae
<desc>Implicit presence-based subscriptions are supported.</desc>
<doc>XEP-0060</doc>
</var>
<var>
<name>http://jabber.org/protocol/pubsub#public</name>
<desc>Public searching for a node is supported.</desc>
<doc>XEP-0060</doc>
</var>
<var>
<name>http://jabber.org/protocol/pubsub#publish</name>
<desc>Publishing items is supported.</desc>
@ -6938,6 +6953,7 @@ xmpp:pubsub.shakespeare.lit?pubsub;action=retrieve;node=princely_musings
<xs:enumeration value='persistent-items'/>
<xs:enumeration value='presence-notifications'/>
<xs:enumeration value='presence-subscribe'/>
<xs:enumeration value='public'/>
<xs:enumeration value='publish'/>
<xs:enumeration value='publish-options'/>
<xs:enumeration value='publish-only-affiliation'/>

View File

@ -25,6 +25,12 @@
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
&sam;
<revision>
<version>0.3.2</version>
<date>2019-08-20</date>
<initials>jublah</initials>
<remark>Fix broken link to Daniels article</remark>
</revision>
<revision>
<version>0.3.1</version>
<date>2018-11-03</date>
@ -311,7 +317,7 @@ xmpp:feste@allfools.lit?otr-fingerprint=AEA4D503298797D4A4FC823BC1D24524B4C54338
article
</link>
<note>
Daniel Gultsch (Retreived on 2015-07-29). "Observations on Imlementing
Daniel Gultsch (Retreived on 2015-07-29). "Observations on Implementing
XMPP"
&lt;<link url='https://github.com/siacs/Conversations/blob/development/docs/observations.md'>
https://github.com/siacs/Conversations/blob/development/docs/observations.md

View File

@ -18,7 +18,7 @@
</abstract>
&LEGALNOTICE;
<number>0387</number>
<status>Draft</status>
<status>Obsolete</status>
<lastcall>2017-12-21</lastcall>
<lastcall>2017-11-15</lastcall>
<type>Standards Track</type>
@ -52,7 +52,9 @@
<supersedes>
<spec>XEP-0375</spec>
</supersedes>
<supersededby/>
<supersededby>
<spec>XEP-0412</spec>
</supersededby>
<shortname>CS2018</shortname>
&sam;
&jonaswielicki;

View File

@ -49,7 +49,7 @@
<spec>XEP-0368</spec>
</dependencies>
<supersedes>
<spec>XEP-0378</spec>
<spec>XEP-0387</spec>
</supersedes>
<supersededby/>
<shortname>CS2019</shortname>

View File

@ -28,6 +28,12 @@
<email>goffi@goffi.org</email>
<jid>goffi@jabber.fr</jid>
</author>
<revision>
<version>0.1.1</version>
<date>2019-08-20</date>
<initials>edhelas</initials>
<remark><p>Editorial language fixes</p></remark>
</revision>
<revision>
<version>0.1.0</version>
<date>2019-02-04</date>
@ -43,28 +49,28 @@
</header>
<section1 topic='Introduction' anchor='intro'>
<p>&xep0060; §6.5.7 allows to retrieve the "most recent items" and &xep0313; state in §3.1 that archives are ordered in "chrnological order". While this order is straighforward in general use cases, it is sometimes desirable to use a different order, for instance while using &xep0277;: a spell mistake correction should not bring an old blog post to the top of retrieved items.</p>
<p>&xep0060; §6.5.7 allows to retrieve the "most recent items" and &xep0313; state in §3.1 that archives are ordered in "chronological order". While this order is straighforward in general use cases, it is sometimes desirable to use a different order, for instance while using &xep0277;: a spelling mistake correction should not bring an old blog post to the top of retrieved items.</p>
<p>This specification allows to explicitly change business logic to retrieve the items in a different order, in a similar way as the "ORDER BY" clause in SQL.</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<ul>
<li>an entity should be able to retrieve items by date of creation or by date of last modification (see below for definitions)</li>
<li>the specification should be extensible to allow new ordering</li>
<li>in case of conflict, a 2nd, 3rd, etc. level of ordering should be possible</li>
<li>in case of conflicts, a 2nd, 3rd, etc. level of ordering should be possible</li>
</ul>
</section1>
<section1 topic='Glossary' anchor='glossary'>
<p>In XEP-0060, there is no such thing as "updated item". This XEP changes the business logic as follow:</p>
<ul>
<li><strong>Date of creation</strong> — date when the item has been published <strong>ONLY if the item has a new id</strong> (i.e. an id which was not already present in the node at the time of publication). If an item re-use an existing id, it overwrites the original item <strong>and the date of creation stay the date of creation of the original item</strong></li>
<li><strong>Date of creation</strong> — date when the item has been published <strong>ONLY if the item has a new id</strong> (i.e. an id which was not already present in the node at the time of publication). If an item reuses an existing id, it overwrites the original item <strong>and the date of creation stays the date of creation of the original item</strong>.</li>
<li><strong>Date of modification</strong> — date when the item has been overwritten by a new item of the same id. If the item has never been overwritten, it is equal to the date of creation defined above.</li>
</ul>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<section2 topic='Retrieve Items By Date of Creation' anchor='creation'>
<p>Juliet wants to retrieve plays of his favorite writer, William Shakespeare. She wants to retrieve the 3 most recent ones by date of creation.</p>
<p>To do so, her client do a regular Pubsub request, but add the &lt;order&gt; element as a children of the &lt;pubsub&gt; element with a namespace of <em>"urn:xmpp:order-by:0"</em> and with a 'by' attribute equal to "creation".</p>
<p>Juliet wants to retrieve plays of her favorite writer, William Shakespeare. She wants to retrieve the 3 most recent ones by date of creation.</p>
<p>To do so, her client do a regular Pubsub request, but adds the &lt;order&gt; element as a children of the &lt;pubsub&gt; element with the <em>"urn:xmpp:order-by:0"</em> namespace and with a 'by' attribute equal to "creation".</p>
<example caption='Retrieving items ordered by date of creation'><![CDATA[
<iq type='get'
from='juliet@capulet.lit/balcony'
@ -76,7 +82,7 @@
</pubsub>
</iq>
]]></example>
<p>Pubsub service then returns the 3 plays created the most recently, first one being the most recent</p>
<p>The Pubsub service then returns the 3 most recently created plays, first one being the most recent.</p>
<example caption='Service returns all items'><![CDATA[
<iq type='result'
from='pubsub.shakespeare.lit'
@ -105,7 +111,7 @@
]]></example>
</section2>
<section2 topic='Retrieve Items By Date of Modification' anchor='modification'>
<p>Juliet realize that there is a spelling mistake, it's "Winter's Tale" and not "Wintter's Tale". She fixes it by overwritting the item:</p>
<p>Juliet realizes that there is a spelling mistake, it's "Winter's Tale" and not "Wintter's Tale". She fixes it by overwritting the item:</p>
<example caption='Juliet Overwritte the Item to Fix It'><![CDATA[
<iq type='set'
from='juliet@capulet.lit/balcony'
@ -122,7 +128,7 @@
</pubsub>
</iq>
]]></example>
<p>To check that everything is alright, she request again the last 3 items, but this time by date of modification. To do so, he client proceed the same way as for date of creation, except that it uses the value "modification" for the 'by' attribute</p>
<p>To check that everything is alright, she requests again the last 3 items, but this time by date of modification. To do so, the client proceeds the same way as for date of creation, except that it uses the value "modification" for the 'by' attribute.</p>
<example caption='Retrieving items ordered by date of modification'><![CDATA[
<iq type='get'
from='juliet@capulet.lit/balcony'
@ -134,7 +140,7 @@
</pubsub>
</iq>
]]></example>
<p>Pubsub service returns again the 3 plays but the "Winter Tales" item has been overwritten recently, while the 2 others have never been overwritten, so it returns the items in the following order, with most recently modified item on top:</p>
<p>The Pubsub service returns again the 3 plays but the "Winter Tales" item has been overwritten recently, while the 2 others have never been overwritten, so it returns the items in the following order, with the most recently modified item on top:</p>
<example caption='Service returns all items'><![CDATA[
<iq type='result'
from='pubsub.shakespeare.lit'
@ -171,19 +177,19 @@
</query>
</iq>
]]></example>
<p>This way, filters can be used with specific ordering</p>
<p>This way, filters can be used with a specific ordering.</p>
</section2>
<section2 topic='Reversing the Order' anchor='reverse'>
<p>The ordering can be reversed by using the mechanisms already provided by &xep0059;</p>
<p>The ordering can be reversed by using the mechanisms already provided by &xep0059;.</p>
</section2>
<section2 topic='Extending this Specification' anchor='extending'>
<p>This specification can be extended by further XEPs, proposing other kind of ordering in the 'by' attribute (e.g. ordering by filename for a file sharing service). But this is beyond the scope of this XEPs, and a client should not assume that other ordering than "creation" and "modification" are available without negociation.</p>
<p>In a similar way, the semantic described here could be re-used in other use cases as for Pubsub or MAM, but this would need to be detailed in a separate specification.</p>
<p>This specification can be extended by further XEPs, proposing other kind of ordering in the 'by' attribute (e.g. ordering by filename for a file sharing service). But this is beyond the scope of this XEP, and a client should not assume that other ordering than "creation" and "modification" are available without negociation.</p>
<p>In a similar way, the semantic described here could be reused in other use cases as for Pubsub or MAM, but this would need to be detailed in a separate specification.</p>
</section2>
</section1>
<section1 topic='Discovering Support' anchor='disco'>
<p>If a server supports the "order by" protocol, it MUST report that fact by including a service discovery feature of "urn:xmpp:order-by:0" &NSNOTE; in response to a &xep0030; information request:</p>
<p>If a server supports the "order by" protocol, it MUST advertize it including the "urn:xmpp:order-by:0" discovery feature &NSNOTE; in response to a &xep0030; information request:</p>
<example caption="Service Discovery information request"><![CDATA[
<iq from='example.org'
id='disco1'
@ -198,21 +204,21 @@
to='example.org'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='urn:xmpp:order-by:0'/>
...
</query>
</iq>
]]></example>
</section1>
<section1 topic='Business Rules' anchor='rules'>
<p>Several ordering elements may be used, this allow to solve next levels of ordering in case of conflicts. In this case, the first ordering (i.e. the top most &lt;order&gt; element) is the main one, the the second &lt;order&gt; element is used in case of conflict, then the next one if a new conflict happen and so on.</p>
<p>In case of conflict, if no new &lt;order&gt; element is specified, the item order is not guarented and is up to the implementation</p>
<p>Several ordering elements may be used, this allows to solve next levels of ordering in case of conflicts. In this case, the first ordering (i.e. the top most &lt;order&gt; element) is the main one, the second &lt;order&gt; element is used in case of conflicts, then the next one if a new conflict happens and so on.</p>
<p>In case of conflicts, if no new &lt;order&gt; element is specified, the item order is not guaranted and is up to the implementation.</p>
</section1>
<section1 topic='Implementation Notes' anchor='impl'>
<p>For implementations based on SQL databases, the "ORDER BY" clause can be used to easily implement this specification. Other kind of databases should have similar mechanisms</p>
<p>For implementations based on SQL databases, the "ORDER BY" clause can be used to easily implement this specification. Other kind of databases should have similar mechanisms.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>

View File

@ -20,6 +20,12 @@
<supersededby/>
<shortname>hashrecs</shortname>
&jonaswielicki;
<revision>
<version>0.3.0</version>
<date>2019-08-19</date>
<initials>jsc</initials>
<remark>Remove dangling reference to analysis of hash function use in existing XMPP extensions. It can still be found in XEP-0300, version 0.5 (&lt;https://xmpp.org/extensions/attic/xep-0300-0.5.html#existing&gt;). Thanks to Dennis Baurichter for pointing this out.</remark>
</revision>
<revision>
<version>0.2.0</version>
<date>2019-04-28</date>
@ -82,7 +88,6 @@
<section2 topic='SHA-1' anchor='hashes-sha1'>
<p>The SHA-1 algorithm was developed by the U.S. National Security Agency and first published in 1995 to fix problems with SHA-0. The SHA-1 algorithm is currently the most widely-deployed hash function. As described in &rfc4270; in 2005, attacks have been found against the collision resistance property of SHA-1. &rfc6194; notes that as of 2011 no published results indicate improvement upon those attacks. In addition, RFC 6194 notes that "[t]here are no known pre-image or second pre-image attacks that are specific to the full round SHA-1 algorithm". Furthermore, there is no indication that attacks on SHA-1 can be extended to HMAC-SHA-1. Nevertheless, the U.S. National Institute of Standards and Technology (NIST) has recommended that SHA-1 not be used for generating digital signatures after December 31, 2010.</p>
<p>In fall 2015 the SHA-1 collision cost has been estimated between 75K$ to 120K$ <note>The SHAppening: freestart collisions for SHA-1 &lt;<link url='https://sites.google.com/site/itstheshappening/'>https://sites.google.com/site/itstheshappening/</link>&gt;.</note>.</p>
<p>The SHA-1 algorithm is used in a number of XMPP protocols. See <link url='#existing'>Analysis of Existing XMPP Extensions</link> for details.</p>
</section2>
<section2 topic='SHA-2' anchor='hashes-sha2'>
<p>The SHA-2 family of algorithms (SHA-224, SHA-256, SHA-384, and SHA-512) was developed by the U.S. National Security Agency and first published in 2001. Because SHA-2 is somewhat similar to SHA-1, it is thought that the security flaws with SHA-1 described above could be extended to SHA-2 (although no such attacks have yet been found on the full-round SHA-2 algorithms).</p>