No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0127.xml 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Common Alerting Protocol (CAP) Over XMPP</title>
  10. <abstract>This document specifies a method for sending Common Alerting Protocol (CAP) data over XMPP.</abstract>
  11. &LEGALNOTICE;
  12. <number>0127</number>
  13. <status>Active</status>
  14. <type>Informational</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>Common Alerting Protocol</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>None</shortname>
  23. &stpeter;
  24. <author>
  25. <firstname>Boyd</firstname>
  26. <surname>Fletcher</surname>
  27. <email>Boyd.Fletcher@je.jfcom.mil</email>
  28. <jid>bfletcher@jabber.com</jid>
  29. </author>
  30. <revision>
  31. <version>1.0</version>
  32. <date>2004-12-09</date>
  33. <initials>psa</initials>
  34. <remark>Per a vote of the Jabber Council, advanced status to Active.</remark>
  35. </revision>
  36. <revision>
  37. <version>0.2</version>
  38. <date>2004-11-09</date>
  39. <initials>psa</initials>
  40. <remark>Added references to XEP-0033 and XEP-0131.</remark>
  41. </revision>
  42. <revision>
  43. <version>0.1</version>
  44. <date>2004-02-23</date>
  45. <initials>psa</initials>
  46. <remark>Initial version.</remark>
  47. </revision>
  48. </header>
  49. <section1 topic='Introduction'>
  50. <p>The &oasiscap; (CAP) is an open format for alerts and notifications, defined by &OASIS;. CAP was developed to address the call, published in a (U.S.) National Science and Technology Council report, for "a standard method ... to collect and relay instantaneously and automatically all types of hazard warnings and reports". Given that the Extensible Messaging and Presence Protocol (see &xmppcore;) provides a near-real-time transport mechanism for structured information, and that CAP is defined as an XML data format, it makes sense to define a way to transport CAP information over XMPP. Such a method is defined herein.</p>
  51. </section1>
  52. <section1 topic='Terminology'>
  53. <p>The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in &rfc2119;.</p>
  54. </section1>
  55. <section1 topic='Protocol'>
  56. <p>Because the alerts and notifications structured via CAP require a "push" medium, they SHOULD be sent via the XML &MESSAGE; stanza defined in <cite>XMPP Core</cite>. The message could be sent using either of the following methods:</p>
  57. <ol>
  58. <li>Directly from the sender to a single recipient, a list of recipients (using &xep0033;), or a &xep0045; room</li>
  59. <li>Published to a list of subscribers via &xep0060;</li>
  60. </ol>
  61. <p>Both methods are described below.</p>
  62. <section2 topic='Direct Messages'>
  63. <p>In the case of direct messages, the message stanza SHOULD have no 'type' attribute, but MAY have any defined type that is appropriate to the communications context (e.g., "groupchat" in a text conference). The &lt;alert/&gt; element SHOULD be the only child element of the message stanza, but other elements MAY be included as necessary (e.g., a &lt;body/&gt; child in the 'jabber:client' namespace providing a natural-language description of the alert). The 'id' attribute of the &MESSAGE; stanza MAY be set to the value of the CAP &lt;identifier/&gt; element.</p>
  64. <p>The following example shows Example A.2 from the CAP specification sent as a direct message.</p>
  65. <example caption='An Alert Sent as a Message'><![CDATA[
  66. <message from='KSTO@NWS.NOAA.GOV'
  67. to='weatherbot@jabber.org'
  68. id='KSTO1055887203'>
  69. <alert xmlns='http://www.incident.com/cap/1.0'>
  70. <identifier>KSTO1055887203</identifier>
  71. <sender>KSTO@NWS.NOAA.GOV</sender>
  72. <sent>2003-06-17T14:57:00-07:00</sent>
  73. <status>Actual</status>
  74. <msgType>Alert</msgType>
  75. <scope>Public</scope>
  76. <info>
  77. <category>Met</category>
  78. <event>SEVERE THUNDERSTORM</event>
  79. <urgency>Severe</urgency>
  80. <certainty>Likely</certainty>
  81. <eventCode>same=SVR</eventCode>
  82. <senderName>NATIONAL WEATHER SERVICE SACRAMENTO</senderName>
  83. <headline>SEVERE THUNDERSTORM WARNING</headline>
  84. <description>
  85. AT 254 PM PDT... NATIONAL WEATHER SERVICE DOPPLER RADAR
  86. INDICATED A SEVERE THUNDERSTORM OVER SOUTH CENTRAL ALPINE
  87. COUNTY... OR ABOUT 18 MILES SOUTHEAST OF KIRKWOOD...
  88. MOVING SOUTHWEST AT 5 MPH. HAIL... INTENSE RAIN AND STRONG
  89. DAMAGING WINDS ARE LIKELY WITH THIS STORM
  90. </description>
  91. <instruction>
  92. TAKE COVER IN A SUBSTANTIAL SHELTER UNTIL THE STORM PASSES
  93. </instruction>
  94. <contact>BARUFFALDI/JUSKIE</contact>
  95. <area>
  96. <areaDesc>
  97. EXTREME NORTH CENTRAL TUOLUMNE COUNTY IN CALIFORNIA,
  98. EXTREME NORTHEASTERN CALAVERAS COUNTY IN CALIFORNIA,
  99. SOUTHWESTERN ALPINE COUNTY IN CALIFORNIA
  100. </areaDesc>
  101. <polygon>
  102. 38.47,-120.14 38.34,-119.95 38.52,-119.74
  103. 38.62,-119.89 38.47,-120.14
  104. </polygon>
  105. <geocode>fips6=006109</geocode>
  106. <geocode>fips6=006109</geocode>
  107. <geocode>fips6=006103</geocode>
  108. </area>
  109. </info>
  110. </alert>
  111. </message>
  112. ]]></example>
  113. </section2>
  114. <section2 topic='PubSub'>
  115. <p>The publish-subscribe protocol defined in XEP-0060 provides a way to send information to a number of subscribers, and to control the list of subscribers.</p>
  116. <p>The following example shows Example A.2 from the CAP specification published to a pubsub node.</p>
  117. <example caption='An Alert Published to a PubSub Node'><![CDATA[
  118. <iq type='set'
  119. from='KSTO@NWS.NOAA.GOV'
  120. to='pubsub.jabber.org'
  121. id='someID'>
  122. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  123. <publish node='NOAA-ALERTS'>
  124. <item id='KSTO1055887203'>
  125. <alert xmlns='http://www.incident.com/cap/1.0'>
  126. <identifier>KSTO1055887203</identifier>
  127. <sender>KSTO@NWS.NOAA.GOV</sender>
  128. <sent>2003-06-17T14:57:00-07:00</sent>
  129. <status>Actual</status>
  130. <msgType>Alert</msgType>
  131. <scope>Public</scope>
  132. <info>
  133. <category>Met</category>
  134. <event>SEVERE THUNDERSTORM</event>
  135. <urgency>Severe</urgency>
  136. <certainty>Likely</certainty>
  137. <eventCode>same=SVR</eventCode>
  138. <senderName>NATIONAL WEATHER SERVICE SACRAMENTO</senderName>
  139. <headline>SEVERE THUNDERSTORM WARNING</headline>
  140. <description>
  141. AT 254 PM PDT... NATIONAL WEATHER SERVICE DOPPLER RADAR
  142. INDICATED A SEVERE THUNDERSTORM OVER SOUTH CENTRAL ALPINE
  143. COUNTY... OR ABOUT 18 MILES SOUTHEAST OF KIRKWOOD...
  144. MOVING SOUTHWEST AT 5 MPH. HAIL... INTENSE RAIN AND STRONG
  145. DAMAGING WINDS ARE LIKELY WITH THIS STORM
  146. </description>
  147. <instruction>
  148. TAKE COVER IN A SUBSTANTIAL SHELTER UNTIL THE STORM PASSES
  149. </instruction>
  150. <contact>BARUFFALDI/JUSKIE</contact>
  151. <area>
  152. <areaDesc>
  153. EXTREME NORTH CENTRAL TUOLUMNE COUNTY IN CALIFORNIA,
  154. EXTREME NORTHEASTERN CALAVERAS COUNTY IN CALIFORNIA,
  155. SOUTHWESTERN ALPINE COUNTY IN CALIFORNIA
  156. </areaDesc>
  157. <polygon>
  158. 38.47,-120.14 38.34,-119.95 38.52,-119.74
  159. 38.62,-119.89 38.47,-120.14
  160. </polygon>
  161. <geocode>fips6=006109</geocode>
  162. <geocode>fips6=006109</geocode>
  163. <geocode>fips6=006103</geocode>
  164. </area>
  165. </info>
  166. </alert>
  167. </item>
  168. </publish>
  169. </pubsub>
  170. </iq>
  171. ]]></example>
  172. <p>If the pubsub node is configured to deliver payloads, the information is then sent to all subscribers.</p>
  173. <example caption='An Alert Sent as a PubSub Payload'><![CDATA[
  174. <message from='pubsub.jabber.org'
  175. to='weatherbot@jabber.org'>
  176. <event xmlns="http://jabber.org/protocol/pubsub#event">
  177. <items node="NOAA-ALERTS">
  178. <alert xmlns='http://www.incident.com/cap/1.0'>
  179. <identifier>KSTO1055887203</identifier>
  180. <sender>KSTO@NWS.NOAA.GOV</sender>
  181. <sent>2003-06-17T14:57:00-07:00</sent>
  182. <status>Actual</status>
  183. <msgType>Alert</msgType>
  184. <scope>Public</scope>
  185. <info>
  186. <category>Met</category>
  187. <event>SEVERE THUNDERSTORM</event>
  188. <urgency>Severe</urgency>
  189. <certainty>Likely</certainty>
  190. <eventCode>same=SVR</eventCode>
  191. <senderName>NATIONAL WEATHER SERVICE SACRAMENTO</senderName>
  192. <headline>SEVERE THUNDERSTORM WARNING</headline>
  193. <description>
  194. AT 254 PM PDT... NATIONAL WEATHER SERVICE DOPPLER RADAR
  195. INDICATED A SEVERE THUNDERSTORM OVER SOUTH CENTRAL ALPINE
  196. COUNTY... OR ABOUT 18 MILES SOUTHEAST OF KIRKWOOD...
  197. MOVING SOUTHWEST AT 5 MPH. HAIL... INTENSE RAIN AND STRONG
  198. DAMAGING WINDS ARE LIKELY WITH THIS STORM
  199. </description>
  200. <instruction>
  201. TAKE COVER IN A SUBSTANTIAL SHELTER UNTIL THE STORM PASSES
  202. </instruction>
  203. <contact>BARUFFALDI/JUSKIE</contact>
  204. <area>
  205. <areaDesc>
  206. EXTREME NORTH CENTRAL TUOLUMNE COUNTY IN CALIFORNIA,
  207. EXTREME NORTHEASTERN CALAVERAS COUNTY IN CALIFORNIA,
  208. SOUTHWESTERN ALPINE COUNTY IN CALIFORNIA
  209. </areaDesc>
  210. <polygon>
  211. 38.47,-120.14 38.34,-119.95 38.52,-119.74
  212. 38.62,-119.89 38.47,-120.14
  213. </polygon>
  214. <geocode>fips6=006109</geocode>
  215. <geocode>fips6=006109</geocode>
  216. <geocode>fips6=006103</geocode>
  217. </area>
  218. </info>
  219. </alert>
  220. </items>
  221. </event>
  222. </message>
  223. .
  224. .
  225. .
  226. ]]></example>
  227. </section2>
  228. </section1>
  229. <section1 topic='Security Considerations'>
  230. <p>Security considerations for CAP are defined in <strong>Common Alerting Protocol, v. 1.0</strong>; security considerations for XMPP are defined in <strong>RFC 3920: XMPP Core</strong>; security considerations for the XMPP publish-subscribe extension are defined in <cite>XEP-0060: Publish Subscribe</cite>.</p>
  231. <p>Furthermore, it may be appropriate to include the "Classification", "Distribute", and/or "Store" headers specified in &xep0131; in order to safeguard CAP data.</p>
  232. </section1>
  233. <section1 topic='IANA Considerations'>
  234. <p>This document requires no interaction with &IANA;.</p>
  235. </section1>
  236. <section1 topic='XMPP Registrar Considerations'>
  237. <p>No namespaces or parameters need to be registered with the &REGISTRAR; as a result of this document.</p>
  238. </section1>
  239. <section1 topic='XML Schema'>
  240. <p>The CAP information format is defined by an XML schema. The reader is referred to the CAP specification for the relevant schema definition.</p>
  241. </section1>
  242. </xep>