features.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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-0384.html>`_)
  21. =============================================================================================
  22. .. note::
  23. Converse versions older than 8.0.0 do 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 `IndexedDB <https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API>`_
  33. or `localStorage <https://developer.mozilla.org/en-US/docs/Web/API/Storage/LocalStorage>`_
  34. database, depending on the value provided to :ref:`persistent-store`.
  35. If you've checked the "This is not a trusted device" checkbox when logging in,
  36. then `sessionStorage <https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage>`_
  37. is used instead of localStorage and all data is cleared when you log out.
  38. For this reason, OMEMO is disabled when you've indicated that you're using
  39. an untrusted device. You would in any case not be able to decrypt previously
  40. received OMEMO messages, due to the Signal Protocol's forward secrecy and the
  41. fact that you don't have a pre-existing session.
  42. Security considerations for browser-based crypto
  43. ------------------------------------------------
  44. Crypto apps deployed via regular web hosting can be described as relying on
  45. "host-based" security.
  46. Host-based security services require you to trust the host every time you access
  47. it, whereas with installable desktop software you trust the host when you
  48. download/install the software (and whenever it gets updated).
  49. The dynamic nature of "host-based" systems makes it impractical for security
  50. researchers to do security audits because the hosted code can change at any
  51. time.
  52. In such a setup you need to fully trust the host that serves you the JavaScript code.
  53. The host that serves the JavaScript code is not necessarily the same host that
  54. stores and procesess your chat messages. So using OMEMO can still protect your
  55. messages from snooping on the XMPP server where they're stored encrypted.
  56. In other words, you do have to trust the webserver that hosts Converse for you,
  57. but you don't necessarily have to trust the XMPP server (if it's on a different host),
  58. because it never gets hold of your private key.
  59. One way to improve this situation is to host Converse yourself, especially if
  60. you host it locally on your own machine. If you're not able to do that, then
  61. at least make sure you use a reputable host that serves files over HTTPS and
  62. that set `CSP <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy>`_
  63. headers.
  64. Due to these reasons, it's NOT a good idea to use encrypted messaging with a
  65. browser-based solution in life-threatening situations.
  66. Security can be increased by using an installable app (like `Converse Desktop <https://github.com/conversejs/converse-desktop>`_).
  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 over 30 languages. Translations can be added or
  96. updated on `Weblate <https://hosted.weblate.org/projects/conversejs/>`_.
  97. Translations are supplied in JSON format and are loaded on demand. Converse will expect to find the
  98. translations in the ``/dist/locales`` path of your site. This path can be
  99. changed via the :ref:`assets_path` configuration setting.
  100. Moderating chatrooms
  101. ====================
  102. Here are the different commands that may be used to moderate a chatroom:
  103. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  104. | Event Type | When is it triggered? | Example (substitue $nickname with an actual user's nickname) |
  105. +============+==============================================================================================+===============================================================+
  106. | **ban** | Ban a user from the chatroom. They will not be able to join again. | /ban $nickname |
  107. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  108. | **clear** | Clear the messages shown in the chatroom. | /clear |
  109. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  110. | **deop** | Make a moderator a normal occupant. | /deop $nickname [$reason] |
  111. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  112. | **help** | Show the list of available commands. | /help |
  113. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  114. | **kick** | Kick a user out of a room. They will be able to join again. | /kick $nickname [$reason] |
  115. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  116. | **me** | Speak in the 3rd person. | /me $message |
  117. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  118. | **mute** | Remove a user's ability to post messages to the room. They will still be able to observe. | /mute $nickname [$reason] |
  119. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  120. | **nick** | Change your nickname. | /nick $nickname |
  121. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  122. | **op** | Make a normal occupant a moderator. | /op $nickname [$reason] |
  123. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  124. | **topic** | Set the topic of the chatroom. | /topic ${topic text} |
  125. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  126. | **voice** | Allow a muted user to post messages to the room. | /voice $nickname [$reason] |
  127. +------------+----------------------------------------------------------------------------------------------+---------------------------------------------------------------+
  128. Passwordless login with client certificates
  129. ===========================================
  130. Converse supports the SASL-EXTERNAL authentication mechanism, which can be
  131. used together with x509 client certificates to enable passwordless login or
  132. even 2-factor authentication.
  133. For more info, `read this blog post <https://opkode.com/blog/strophe_converse_sasl_external/>`_.