features.rst 10 KB

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