features.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. .. raw:: html
  2. <div id="banner"><a href="https://github.com/jcbrand/converse.js/blob/master/docs/source/features.rst">Edit me on GitHub</a></div>
  3. .. _`features`:
  4. ========
  5. Features
  6. ========
  7. File sharing (`XEP-0363 HTTP File Upload <https://xmpp.org/extensions/xep-0363.html>`_)
  8. =======================================================================================
  9. Converse supports file sharing by first uploading the file to a file server and
  10. then sending the file's URL to the recipient.
  11. The file server that is used is configured by the XMPP server admin, and is not
  12. something that Converse has any control over.
  13. Often when people report file sharing not working, it's because the file server
  14. is not configured to allow file uploads from other domains.
  15. The file server needs to be configured for `Cross-Origin resource sharing <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS>`_
  16. (known by the acronym CORS). Specifically, it needs to add a
  17. ``Access-Control-Allow-Origin`` header which includes the domain hosting
  18. Converse.
  19. .. _`feature-omemo`:
  20. End to end message encryption (`XEP-0384 OMEMO <https://xmpp.org/extensions/xep-0363.html>`_)
  21. =============================================================================================
  22. .. note::
  23. Converse.js (as of version 4.1.2) does NOT support encryption or decryption
  24. of uploaded files. Files will be uploaded WITHOUT ENCRYPTION, even when
  25. OMEMO is enabled.
  26. Converse supports OMEMO encryption based on the
  27. `Signal Protocol <https://github.com/signalapp/libsignal-protocol-javascript>`_.
  28. The Signal Protocol is session-oriented. Clients establish a session, which is
  29. then used for all subsequent encrypt/decrypt operations. There is no need to
  30. ever tear down a session once one has been established.
  31. This means that a session needs to be stored permanently after logging out.
  32. Converse stores this session information in the browser's `localStorage <https://developer.mozilla.org/en-US/docs/Web/API/Storage/LocalStorage>`_.
  33. If you've checked the "This is not a trusted device" checkbox when logging in,
  34. then `sessionStorage <https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage>`_
  35. is used instead of localStorage and all data is cleared when you log out.
  36. For this reason, OMEMO is disabled when you've indicated that you're using
  37. an untrusted device. You would in any case not be able to decrypt previously
  38. received OMEMO messages, due to the Signal Protocol's forward secrecy and the
  39. fact that you don't have a pre-existing session.
  40. Security considerations for browser-based crypto
  41. ------------------------------------------------
  42. Crypto apps deployed via regular web hosting can be described as relying on
  43. "host-based" security.
  44. Host-based security services require you to trust the host every time you access
  45. it, whereas with installable desktop software you trust the host when you
  46. download/install the software (and whenever it gets updated).
  47. The dynamic nature of "host-based" systems makes it impractical for security
  48. researchers to do security audits because the hosted code can change at any
  49. time.
  50. In such a setup you need to fully trust the host that serves you the JavaScript code.
  51. The host that serves the JavaScript code is not necessarily the same host that
  52. stores and procesess your chat messages. So using OMEMO can still protect your
  53. messages from snooping on the XMPP server where they're stored encrypted.
  54. In other words, you do have to trust the webserver that hosts Converse for you,
  55. but you don't necessarily have to trust the XMPP server (if it's on a different host),
  56. because it never gets hold of your private key.
  57. One way to improve this situation is to host Converse yourself, especially if
  58. you host it locally on your own machine. If you're not able to do that, then
  59. at least make sure you use a reputable host that serves files over HTTPS and
  60. that set `CSP <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy>`_
  61. headers.
  62. Due to these reasons, it's NOT a good idea to use encrypted messaging with a
  63. browser-based solution in life-threatening situations.
  64. Security can be increased by using an installable app (like one based on `Electron <https://electronjs.org/>`_)
  65. with a strict Content Security Policy.
  66. Look out for an Electron based version of Converse coming in the following months.
  67. For further reading on the challenges of web-based crypto, take a look at these
  68. articles:
  69. * `What's wrong with webcrypto? <https://tonyarcieri.com/whats-wrong-with-webcrypto>`_
  70. * `Heartbleed and JavaScript crypto <https://tankredhase.com/2014/04/13/heartbleed-and-javascript-crypto/>`_
  71. OMEMO in Multi-user chats (MUC)
  72. -------------------------------
  73. Converse supports OMEMO encryption in groupchats, but only if the groupchat is
  74. set to `members only` and `non-anonymous`. This is the same criteria used by
  75. the popular Android XMPP client `Conversations <https://conversations.im/>`_.
  76. If the groupchat is configured properly, you'll see the lock icon in the
  77. toolbar.
  78. Open chats via URL
  79. ==================
  80. From version 3.3.0, converse.js now has the ability to open chats (private or
  81. groupchat) based on the URL fragment.
  82. A room (aka groupchat) can be opened with a URL fragment such as `#converse/room?jid=room@domain`
  83. and a private chat with a URL fragment such as
  84. `#converse/chat?jid=user@domain`.
  85. Notifications
  86. =============
  87. From version 0.8.1 Converse can play a sound notification when you receive a
  88. message.
  89. For more info, refer to the :ref:`play-sounds` configuration setting.
  90. It can also show `desktop notification messages <https://developer.mozilla.org/en-US/docs/Web/API/notification>`_
  91. when the browser is not currently visible.
  92. For more info, refer to the :ref:`show-desktop-notifications` configuration setting.
  93. Multilingual Support
  94. ====================
  95. Converse is translated into multiple languages. Translations are supplied in
  96. JSON format and are loaded on demand. Converse will expect to find the
  97. translations in the ``/locales`` path of your site. This can be changed via the
  98. :ref:`locales-url` configuration setting.
  99. Moderating chatrooms
  100. ====================
  101. Here are the different commands that may be used to moderate a chatroom:
  102. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  103. | Event Type | When is it triggered? | Example (substitue $nickname with an actual user's nickname) |
  104. +============+==============================================================================================+===============================================================+
  105. | **ban** | Ban a user from the chatroom. They will not be able to join again. | /ban $nickname |
  106. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  107. | **clear** | Clear the messages shown in the chatroom. | /clear |
  108. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  109. | **deop** | Make a moderator a normal occupant. | /deop $nickname [$reason] |
  110. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  111. | **help** | Show the list of available commands. | /help |
  112. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  113. | **kick** | Kick a user out of a room. They will be able to join again. | /kick $nickname [$reason] |
  114. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  115. | **me** | Speak in the 3rd person. | /me $message |
  116. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  117. | **mute** | Remove a user's ability to post messages to the room. They will still be able to observe. | /mute $nickname [$reason] |
  118. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  119. | **nick** | Change your nickname. | /nick $nickname |
  120. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  121. | **op** | Make a normal occupant a moderator. | /op $nickname [$reason] |
  122. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  123. | **topic** | Set the topic of the chatroom. | /topic ${topic text} |
  124. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  125. | **voice** | Allow a muted user to post messages to the room. | /voice $nickname [$reason] |
  126. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  127. Passwordless login with client certificates
  128. ===========================================
  129. Converse supports the SASL-EXTERNAL authentication mechanism, which can be
  130. used together with x509 client certificates to enable passwordless login or
  131. even 2-factor authentication.
  132. For more info, `read this blog post <https://opkode.com/blog/strophe_converse_sasl_external/>`_.