%ents; ]>
Abuse Reporting This specification defines an XMPP protocol extension for reporting abusive traffic sent over an XMPP network. Note: This specification has been retracted in favor of XEP-0161, which now contains the content originally published in this specification. &LEGALNOTICE; 0236 Retracted Standards Track Standards Council XMPP Core XEP-0030 NOT YET ASSIGNED &stpeter; 0.2 2008-05-09 psa

Retracted in favor of XEP-0161, which now contains the content originally published in this specification.

0.1 2008-03-05 psa

Initial published version.

0.0.3 2008-02-29 psa

Added reason element containing machine-readable conditions and optional human-readable text; added note about forwarding of abuse reports.

0.0.2 2008-02-26 psa

Limited scope to reporting between two servers; more clearly defined what is abusive; changed protocol to use IQ request-response exchange; limited use of error condition to stream termination.

0.0.1 2008-02-19 psa

First draft.

Unfortunately, not all XMPP entities are well-behaved. Currently, if an XMPP entity (the "attacker") sends abusive stanzas to another XMPP entity (the "victim"), there is no way for the victim or the victim's server to inform the attacker's server that the attacker is generating abusive traffic. In practice, the victim's server may need to terminate the server-to-server connection (currently without explicitly informing the attacker's server about the reason for the termination) rather than continue to accept the abusive traffic.

This situation is far from desirable. Therefore, this specification defines three small XMPP protocol functions that can help to improve the reliability of server-to-server connections:

  1. A method by which the receiving server can send an abuse report to the sending server, including the JID(s) of the sender(s).
  2. An application-specific stanza error condition that can be combined with the standard ¬acceptable; stanza error condition to inform the sending server that a particular XMPP stanza is considered abusive.
  3. An application-specific stream error condition that can be combined with the standard &policy; stream error condition to inform the sending server about the reason for termination of an XML stream.

An abuse report MUST be sent in an IQ stanza of type "set" containing an <abuse/> element qualified by the 'urn:xmpp:tmp:abuse' namespace &NSNOTE;. The allowable children of the <abuse/> element are:

This specification intentionally does not define exactly what constitutes abuse, since "abuse is in the eye of the beholder". However, the following machine-readable conditions are defined as children of the <reason/> element.

Condition Definition
<gateway/> Attempting to inappropriately use a gateway on the receiving server (see &xep0100;)
<muc/> Attempting to take over or otherwise abuse &xep0045; rooms on the receiving server
<proxy/> Attempting to inappropriately use a &xep0065; proxy, TURN server, or other proxy on the receiving server
<pubsub/> Attempting to inappropriately use a &xep0060; service on the receiving server
<service/> Attempting to inappropriately use any other kind of service on the receiving server
<spam/> Sending spam (unsolicited bulk messages)
<stanza-too-big/> Sending extremely large stanzas
<too-many-recipients/> Sending messages that contain too many recipients (see &xep0033;)
<too-many-stanzas/> Sending an extremely large number of stanzas
<unacceptable-payload/> Sending messages that contain unacceptable payloads such as malicious executables
<unacceptable-text/> Sending messages that contain unacceptable human-readable text
<undefined-abuse/> The abuse condition is undefined (should be used with an application-specific condition)

Note: The foregoing list of conditions is not exhaustive. The list may be augmented or otherwise modified in a future version of this specification as a result of implementation and deployment experience.

If an XMPP server receives abusive stanzas over a server-to-server connection, the receiving server SHOULD send an abuse report to the sending server.

abuser@example.com/foo ]]>

Upon receiving the abuse report, the sending server MUST proceed as follows.

If the sending server does not understand the abuse reporting protocol, it MUST return a &unavailable; error to the receiving server.

]]>

If none of the JIDs contained in the abuse report exist at the sending server, the sending server MUST return an ¬found; error to the receiving server.

]]>

If the sending server accepts the abuse report for one or more JIDs, it MUST return an IQ stanza of type "result" to the receiving server.

]]>

This specification does not define how a sending server shall behave when it receives an abuse report. In general it is expected that the sending server (1) will notify the human administrators of the server in some implementation-specific or deployment-specific fashion, and (2) may use the abuse report in an automated fashion (e.g., as input to a rate-limiting algorithm, reputation system, or decision about temporarily suspending the privileges of the sending entity or entities). In addition, the sending server MAY the report to trusted parties such as third-party reporting services.

The receiving server MAY report that a particular stanza is considered abusive. The stanza error condition MUST be ¬acceptable; and the error stanza MUST include an application-specific error condition of <abuse/> qualified by the 'urn:xmpp:tmp:abuse' &NSNOTE;. The <abuse/> element MUST include one or more <jid/> elements whose XML character data specifies the JID(s) of the abusive sender(s).

[ ... some abusive payload here ... ] ]]> abuser@example.com/foo ]]>

If the sending entity continues to generate abusive stanzas via the sending server, the receiving server MAY close the stream between the receiving server and the sending server. The stream error condition MUST be &policy; and the stream error MUST include an application-specific error condition of <abuse/> qualified by the 'urn:xmpp:tmp:abuse'. The <abuse/> element MUST include one or more <jid/> elements whose XML character data specifies the JID(s) of the abusive sender(s).

abuser@example.com/foo ]]>

The receiving entity then SHOULD terminate the TCP connection between the receiving server and the sending server.

If a server supports the abuse reporting protocol, it MUST report that fact by including a service discovery feature of "urn:xmpp:tmp:abuse" &NSNOTE; in response to a &xep0030; information request:

]]> ... ... ]]>

It is possible for an abusive sender to launch a denial of service attack against legitimate users of the sending server by generating abusive traffic over the server-to-server connection (in fact such attacks have already been observed on XMPP networks). Although use of the abuse reporting protocol does not completely prevent such attacks, it may at least enable sending servers to react to abusive traffic in close to real time, thus helping to "heal" the network when denial of service attacks are launched.

If a malicious entity can inject information into the server-to-server connection, it can falsely send abuse reports to the sending server. Therefore the connection SHOULD be encrypted using Transport Layer Security as specified in &xmppcore;.

This document requires no interaction with &IANA;.

Until this specification advances to a status of Draft, its associated namespace shall be "urn:xmpp:tmp:abuse"; upon advancement of this specification, the ®ISTRAR; shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;.

The XMPP Registrar shall add <abuse/> to its registry of application-specific error conditions (see &APPERRORS;), where the element is qualified by the 'urn:xmpp:tmp:abuse' namespace &NSNOTE;.

The registry submission is as follows:

urn:xmpp:tmp:abuse abuse the sending entity has generated traffic that the receiving server considers abusive XEP-xxxx ]]>
]]>