From 6704d53cd049b2c6e07c77f6edce59003a61a682 Mon Sep 17 00:00:00 2001
From: stpeter
Date: Mon, 4 Oct 2010 14:38:11 -0600
Subject: [PATCH 01/14] initial version
---
xep-0287.xml | 316 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 316 insertions(+)
create mode 100644 xep-0287.xml
diff --git a/xep-0287.xml b/xep-0287.xml
new file mode 100644
index 00000000..2b8c31c4
--- /dev/null
+++ b/xep-0287.xml
@@ -0,0 +1,316 @@
+
+
+%ents;
+]>
+
+
+
+ Spim Markers and Reports
+ This document defines an XMPP protocol extension that enables XMPP entities to interact with spim filters by marking unsolicited or suspicious XMPP stanzas.
+ &LEGALNOTICE;
+ 0287
+ Experimental
+ Standards Track
+ Standards
+ Council
+
+ XMPP Core
+ XEP-0001
+ XEP-0030
+
+
+
+ NOT_YET_ASSIGNED
+
+ Evgeniy
+ Khramtsov
+ ekhramtsov@process-one.net
+ xram@jabber.ru
+
+
+ 0.1
+ 2010-10-04
+ psa
+
Initial published version.
+
+
+ 0.1
+ 2010-09-13
+ evk
+
Initial version.
+
+
+
+
There are various spim protection methods exist in XMPP: &xep0016;, &xep0158;, &xep0191;, &xep0268; and &xep0275;. But they may not be sufficient enough:
+
+
&xep0016; and &xep0191; define blocking mechanism only which is not always appropriate.
+
&xep0158; interacts badly with automated software such as gateways.
+
&xep0268; implies trusted network of servers.
+
&xep0275; concentrates on ranking only.
+
+ Service administrators might want to deploy server-based spim recognition software to fill in the gaps. However, every automated spim recognition suffers from false positives - situations where a stanza incorrectly qualified as spim. To avoid them, a spim filter doesn't block suspicious stanza, but marks it and sends to a client in a regular manner. A client software doesn't need to interrupt a user when processing such marked stanzas: for example, it may put them silently in "SPAM" folder, so a user can look through them at any time later. Furthermore, a spim filter may take user's experience into account. When a user receives an unsolicited stanza, he or she can mark it as spim. In this case a client software sends an automatic complaint to a server-based spim filter. This specification deals with both cases. Thus, in contrast to &xep0159;, it doesn't introduce any spim blocking techniques. Also, the various spim recognition procedures that may be employed by the server are beyond the scope of this document.
+
+
+
+
An implementation compliant with this document MUST support spim markers as described in Spim Marker use case. Support for spim reports, as described in Spim Report use case, is RECOMMENDED.
+
+
+
The following terms are used throughout this document:
+
+
Filtering Entity
An XMPP entity which performs spim recognitions, blocks or marks suspicious stanzas and accepts spim reports. Example: a server or an external component with built-in spim recognition module.
+
Receiving Entity
An XMPP entity which directly receives marked stanzas and sends spim reports. Example: a client or a conference (&xep0045;).
+
+
+
+
+
The filtering entity marks abusive stanza by adding <mark/> child element qualified by the 'urn:xmpp:spim-marker:0' namespace. The element MUST possess the 'filter' attribute whose value MUST be a full jid of the filtering entity. The <mark/> element MAY contain character data which SHOULD be a human-readable description of the reason to mark. The filtering entity MUST NOT add more than one <mark/> element and MUST delete all other <mark/> elements matching itself before adding a new one. The filtering entity MAY remove any <mark/> elements matching itself even if it doesn't add a new one.
+
+ Love pills - 75% OFF
+
+ Unsolicited advertising
+
+
+ ]]>
+
+ You won $1,000,000!
+ Visit http://www.abuser.com/
+
+ Blocked by too many DNSBLs
+
+
+
+ ]]>
+
Processing rules of marked stanzas taken by the receiving entity are beyond the scope of this document. One possible solution is to put such stanzas silently in so-called "SPAM" folder.
+
+
+
If the filtering entity wishes to receive abuse report for the stanza, it MUST add <report/> child element qualified by the 'urn:xmpp:spim-report:0' namespace and MUST possess the 'key' and the 'filter' attributes. A value of the 'key' attribute is arbitrary, but SHOULD have at least 128 bits of randomness. The 'key' attribute is needed to match the corresponding complaint (if any) with the sender. The value of the 'filter' attribute MUST be a full jid of the filtering entity. The filtering entity MUST NOT add more than one <report/> element and MUST delete all other <report/> elements matching itself before adding a new one. The filtering entity MAY remove any <report/> elements matching itself even if it doesn't add a new one.
+
+
+
+
+ ]]>
+
The receiving entity MAY complain by sending an IQ-set containing the <query/> child element qualified by the 'urn:xmpp:spim-report:0' namespace. A value of the 'filter' attribute MUST be copied in the 'to' attribute of the IQ-set stanza. The element MUST possess 'key' attribute copied from the original stanza.
+
The receiving entity MUST ignore any <report/> elements generated by untrusted filtering entities. If there are more than one <report/> element matching the same filtering entity, all of them MUST be ignored.
+
+
+
+
+
+
+
+ ]]>
+
The filtering entity MUST respond with an empty IQ-result stanza upon successful completion of the request:
+
+
+
+ ]]>
+
+
+
+
A filtering entity SHOULD only add <mark/> or <report/> elements and a receiving entity SHOULD only process those elements if the corresponding stanza envolves an interaction with a human user: subscription requests, messages, conference invites, voice calls, etc. For example, it doesn't make a lot of sense to mark &xep0232; stanzas.
+
To avoid obvious false positives and user confusions, a filtering entity SHOULD NOT add <mark/> or <report/> elements to a stanza and a receiving entity SHOULD ignore <mark/> and <report/> elements of a stanza if:
+
+
The receiving entity has the sender's subscription information of the type "both", "from" or "to".
+
The receiving entity has pending subscription to the sender, i.e. subscription of type "none" and ask='subscribe'.
+
The receiving entity has sent direct presence to the sender.
+
+
+
+
+
If an entity supports the spim markers, it MUST report that by including a service discovery feature of "urn:xmpp:spim-marker:0" in response to a &xep0030; information request. If an entity supports the spim reports, it MUST report that by including a service discovery feature of "urn:xmpp:spim-report:0" in response to a &xep0030; information request:
Care should be taken if a receiving entity chooses to generate a CAPTCHA challenge (&xep0158;) in response to a marked stanza. A spim recognition system rarely has more than 5-10% of false positives. Thus, producing CAPTCHA images or audio/video samples is likely a waste of system resources and also may overload the receiving entity at high rate of spim stanzas.
+
+
+
A rogue server may add fake <mark/> elements to compromise filtering entities: a user may decide to remove such entities from the trusted list because, for example, he or she thinks they produce too many false positives. To avoid such situation, a filtering entity MUST remove any <mark/> elements matching itself before adding new <mark/> element as described in Spim Marker use case. Also, a filtering entity MAY remove any <mark/> elements matching itself even if it doesn't add a new one.
+
+
+
An attacker may add fake <report/> element. For example, it may do that for checking an activity of the user. To avoid such situation, a receiving entity MUST send spim reports to the trusted filtering entities only as desribed in Spim Report use case.
+
+
+
+
An attacker may add thousands of fake <report/> elements matching the single trusted filtering entity in one stanza. A poorly written receiving entity may generate a complaint for all of them. As an effect, a distributed DoS attack on the filtering entity is performed if there are multiple receiving entities envolved. To avoid such situation, a receiving entity MUST ignore multiple <report/> elements matching the same filtering entity as desribed in Spim Report use case.
+
In its turn, a filtering entity MUST remove any <report/> elements matching itself before adding new <report/> element as described in Spim Report use case. Thus, it is guaranteed that the element will not be ignored by the receiving entity.
+
+
+
An attacker may gain an information about user's trusted filtering entities. In this case he or she may add the <report/> element per every such entity in one stanza. If there are too many filtering entities in the list, a user may generate enormous traffic when generating spim reports. Although this attack is not very effective, a client software MUST not generate spim reports without user's acknowledgement.
+
+
+
+
An attacker may try to mark an innocent user as a spimmer by producing several IQ-set stanzas qualified by "urn:xmpp:spim-report:0" containing different value of the 'key' attribute each (so-called "dictionary attack"). As a protection, sanity checks MUST be performed when processing such reports. For example, if a filtering entity doesn't store any information about a receiving entity, the value of the 'key' attribute SHOULD have at least 128 bits of randomness.
+
+
+
+
This document requires no interaction with &IANA;.
+
+
+
+
This specification defines the following XML namespaces:
+
+
urn:xmpp:spim-marker:0
+
urn:xmpp:spim-report:0
+
+
Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.
+
+
+
+
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ XEP-xxxx: http://www.xmpp.org/extensions/xep-xxxx.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]]>
+
+
+
+
+
+
+
+
+ The protocol documented by this schema is defined in
+ XEP-xxxx: http://www.xmpp.org/extensions/xep-xxxx.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]]>
+
+
+
+
Thanks to Sergei Golovan for the feedback.
+
+
From e4fa3ab3efe78c9f84243128ce2fb11f82979652 Mon Sep 17 00:00:00 2001
From: stpeter
Date: Mon, 4 Oct 2010 14:38:15 -0600
Subject: [PATCH 02/14] initial version
---
xep-0288.xml | 206 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 206 insertions(+)
create mode 100644 xep-0288.xml
diff --git a/xep-0288.xml b/xep-0288.xml
new file mode 100644
index 00000000..4e80b2cc
--- /dev/null
+++ b/xep-0288.xml
@@ -0,0 +1,206 @@
+
+
+%ents;
+]>
+
+
+
+ Bidirectional Server-to-Server Connections
+ This specification defines a protocol for using server-to-server connections in a bidirectional way such that stanzas are sent and received on the same TCP connection.
+ &LEGALNOTICE;
+ 0288
+ Experimental
+ Standards Track
+ Standards
+ Council
+
+ XMPP Core
+ XEP-0178
+ XEP-0220
+
+
+
+ NOT_YET_ASSIGNED
+
+ Philipp
+ Hancke
+ fippo@ve.symlynx.com
+
+
+ Dave
+ Cridland
+ dave.cridland@isode.com
+ dave.cridland@isode.com
+
+
+ 0.1
+ 2010-10-04
+ psa
+
Initial published version.
+
+
+ 0.0.2
+ 2010-09-13
+ dwd
+
+
belated run-over pre-publication
+
Added notes on authentication
+
+
+
+ 0.0.1
+ 2010-04-12
+ ph
+
initial version
+
+
+
+
&rfc3920; restricts server-to-server communication in such a way that a server has to use on TCP connection for XML stanzas sent from the server to the peer and another TCP connection (initiated by the peer) for stanzas from the peer to the server, for a total of two TCP connections. &rfc3920bis; allows two servers to send stanzas in a bidirectional way, but does not define methods for explicitly signalling the usage thereof. This is accomplished in this specification.
+
+
+
+
+
If a server supports bidirectional server-to-server streams, it should inform the connecting entity when returning stream features during the stream negotiation process (both before and after TLS negotiation). This is done by including a <bidi/> element qualified by the 'urn:xmpp:features:bidi' namespace.
+
+
+
+
+]]>
+
If the initiating entity chooses to use TLS, STARTTLS negotiation MUST be completed before enabling bidirectionality.
+
+
+
To enable bidirectional communication, the connecting server sends a <bidi/> element qualified by the 'urn:xmpp:bidi' namespace. This SHOULD be done before either SASL negotiation or &xep0220;.
+
+]]>
+
Note: Since there is no reply to the request, it is possible to pipeline it.
+
After enabling bidirectionality, the connecting server continues to authenticate via SASL or requests to send stanzas for a domain pair with Server Dialback. The receiving server MUST NOT send stanzas to the peer before it has authenticated via SASL, or the peer's identity has been verified via Server Dialback. Note that the receiving server MUST NOT attempt to verify a dialback key on the same connection where the corresponding request was issued.
+
Also note that the receiving server MUST only send stanzas for which it has been authenticated - in the case of TLS/SASL based authentication, this is the value of the stream's 'to' attribute, whereas in the case of &xep0220; this is the value of the 'to' attribute on any <db:result> element.
+
Finally, once bidirectionality is enabled, the receiving server MAY initiate &xep0220; authentications for other domains it hosts to any domain authenticated to be hosted by the connecting server.
+
+
+
+
This section shows two complete examples of bidirectional streams, the first example uses SASL EXTERNAL, the second uses Server Dialback.
In general, the XMPP <thread/> element is handled in a manner similar to the "References:" header field from email (see &rfc5322;) and netnews (see &rfc5536;). Detailed guidelines for particular XMPP message types are provided in the following sections.
+
In general, the XMPP <thread/> element is handled in a manner similar to the "References:" header field from email (see &rfc5322;) and netnews (see &rfc5536;), as well as the THREAD extension to IMAP (see &rfc5256;). Detailed guidelines for particular XMPP message types are provided in the following sections.
For <message/> stanzas of type "chat" exchanged between two entities, the value of the <thread/> element shall be considered equivalent to a unique identifier for the chat session or conversation thread. If an entity receives such a message with a new or unknown ThreadID, it SHOULD treat the message as part of a new chat session. A client MAY destroy the thread when it goes offline, but SHOULD NOT destroy the thread if a human user merely disengages from the chat session (e.g., by closing a window in a client interface).
If an entity receives an XMPP presence stanza of type "unavailable" from the other entity during a chat session, it SHOULD NOT destroy the thread; instead, it SHOULD assume that the other entity will still be able to continue the session (perhaps the other entity was temporarily disconnected by a network error or is persisting the state of the session until it reconnects and receives "offline" messages).
diff --git a/xep.ent b/xep.ent
index 67455a45..39f24c1c 100644
--- a/xep.ent
+++ b/xep.ent
@@ -579,6 +579,7 @@ THE SOFTWARE.
RFC 5178 RFC 5178: Generic Security Service Application Program Interface (GSS-API) Internationalization and Domain-Based Service Names and Name Type <http://tools.ietf.org/html/rfc5178>." >
RFC 5179 RFC 5179: Generic Security Service Application Program Interface (GSS-API) Domain-Based Service Names Mapping for the Kerberos V GSS Mechanism <http://tools.ietf.org/html/rfc5179>." >
RFC 5246 RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2 <http://tools.ietf.org/html/rfc5246>." >
+RFC 5256 RFC 5256: Internet Message Access Protocol - SORT and THREAD Extensions <http://tools.ietf.org/html/rfc5256>." >
RFC 5280 RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile <http://tools.ietf.org/html/rfc5280>." >
RFC 5322 RFC 5322: Internet Message Format <http://tools.ietf.org/html/rfc5322>." >
RFC 5359 RFC 5359: Session Initiation Protocol Service Examples <http://tools.ietf.org/html/rfc5359>." >
From dee8939277e0fb695fb23e0dcc98559cb9996d16 Mon Sep 17 00:00:00 2001
From: Tobias Markmann
Date: Wed, 6 Oct 2010 00:09:10 +0200
Subject: [PATCH 06/14] Fix use of definition lists.
---
xep-0286.xml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/xep-0286.xml b/xep-0286.xml
index 17658c5c..2a7f2618 100755
--- a/xep-0286.xml
+++ b/xep-0286.xml
@@ -113,27 +113,45 @@
As with anything, there are no hard and fast rules. If there were, they might look like these. First, for devices:
+
Transmit no data.
Transmitting costs significant power, and moreover raises the radio state. Not transmitting will allow it to maximize the time spent in the low-cost Idle state.
+
+
If you must transmit, then transmit only a small volume.
If there is only a small amount of data transmitted - less than 128 octets typically - the radio will only raise to FACH, which is significantly cheaper than DCH.
+
+
If you must transmit, then compress as hard as possible.
Since individual octets have an associate power - and often financial - cost, it's worth maximizing the compression algorithm, even if the volume of traffic will raise to DCH.
+
+
If you have transmit a lot, then do a lot
If the radio is raised to DCH anyway, then you may as well go fetch that avatar you were missing, since you're chewing through power anyway.
+
+
If you receive, then transmit
If your peer raises the radio state, you may as well use it.
+
And for servers, similar rules apply:
+
Send no data.
Sending data will cause the handset to be raised out of Idle. This immediately costs massively higher power.
+
+
If you must send, send tiny bits.
Sending small enough data maximizes the likelyhood that the devices radio will only be raised to FACH levels.
+
+
If you receive, then send anything you have.
Receiving data indicates that the radio is active - it'll stay active for some time, so sending data doesn't incur the overhead of raising the radio state, and won't increase power drain on the handset.
+
+
If you must send when not receiving, send plenty.
Sending data will raise the radio's state - unless you can tell this will only raise it to FACH, it's worth sending as much as possible.
+
Finally, protocol designers should aim to minimize any responses required from the handset, and ensure keepalive traffic, if any, fits inside FACH wherever possible.
From b4412526ef03a536642ce261d1d4bab0ea1c751b Mon Sep 17 00:00:00 2001
From: Tobias Markmann
Date: Wed, 6 Oct 2010 00:21:08 +0200
Subject: [PATCH 07/14] Improving table layout and general LaTeX compatibility.
(Thanks to Florian Zeitz)
---
xep2texml.xsl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/xep2texml.xsl b/xep2texml.xsl
index d2b7e044..1e068de2 100755
--- a/xep2texml.xsl
+++ b/xep2texml.xsl
@@ -99,6 +99,8 @@
\newcommand{\XEPNumber}[0]{}
\newcommand{\XEPVersion}[0]{}
+\newcolumntype{L}{>{\raggedright\arraybackslash}X}
+
\fancyhead[L,L]{\includegraphics[totalheight=10pt]{xmpp.pdf} \slshape \leftmark}
\fancyfoot[C,C]{\thepage}
@@ -225,7 +227,7 @@
-
+ \linewidthlXX & \\
From 2d3924c53f2ba7e90bf5bb30c0e46353b9532ad0 Mon Sep 17 00:00:00 2001
From: Tobias Markmann
Date: Fri, 8 Oct 2010 00:56:23 +0200
Subject: [PATCH 08/14] Create a XML file of the XEP table for bots.
---
gen.py | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++---
xepinfo.py | 9 ++++++++-
2 files changed, 63 insertions(+), 4 deletions(-)
diff --git a/gen.py b/gen.py
index 98a28849..c179121c 100755
--- a/gen.py
+++ b/gen.py
@@ -65,9 +65,12 @@ def executeCommand( cmd ):
error, desc = commands.getstatusoutput( cmd )
return error, desc + "\n" + "executed cmd: " + cmd
+## creates a HTML table (for the human reader) and XML table (for bots)
class XEPTable:
- def __init__(self, filename):
+ def __init__(self, filename, shortXMLfilename):
self.filename = filename
+ self.shortXMLfilename = shortXMLfilename
+
try:
self.tableFile = parse(filename)
except:
@@ -88,14 +91,26 @@ class XEPTable:
Date
''')
self.tableFile.getElementsByTagName("table")[0].appendChild(header.getElementsByTagName("tr")[0])
-
+
+ try:
+ self.botsFile = parse(shortXMLfilename)
+ except:
+ impl = getDOMImplementation()
+ self.tableFile = impl.createDocument(None, "xeps", None)
+
def save(self):
f = open(self.filename, "wb")
self.tableFile.getElementsByTagName("table")[0].normalize()
f.write(self.tableFile.toxml())
f.close()
+
+ f = open(self.shortXMLfilename, "wb")
+ self.tableFile.getElementsByTagName("xeps")[0].normalize()
+ f.write(self.tableFile.toxml())
+ f.close()
def setXEP(self, info):
+ ## set for HTML table
rows = self.tableFile.getElementsByTagName("tr")
xeprow = 0
for row in rows:
@@ -130,6 +145,43 @@ class XEPTable:
col = parseString("