nextcloud / jsxc.nextcloud

💬 Chat app for Nextcloud with XMPP, end-to-end encryption, video calls, file transfer & group chat
https://apps.nextcloud.com/apps/ojsxc
MIT License
47 stars 32 forks source link

Guest chat #78

Open MarcelWaldvogel opened 6 years ago

MarcelWaldvogel commented 6 years ago

When sharing documents using a link with users (e.g. sharing LOOL/Collabora online documents read/write), the guest has no possibility to use the chat. This is a request for an enhancement. (Maybe as part of OSSdev.)

Expected behavior

  1. The admin enables granting guest chat (see below), globally or to some groups
  2. The user shares a link and has the option to enable chat on this link; sends this link to guests
  3. This also creates a XMPP MUC room for that share, which would be a starting position for group discussions (and forking 1:1 discussions). The user who created the share would become a permanent member of the group (bookmarked as auto-join) with admin rights, so the user can maintain order
  4. Guests opening the link in their browsers will be presented with a MUC window (and hidden roster); have the option to change their nickname (and maybe open 1:1 chats)

Admin configuration

The admin enables guest chats (and has tokens enabled). On a new guest access, a new (temporary) JID of the form guest-${RANDOM}@${XMPP_DOMAIN} would be created.

This is easy to set up but would give the guest unrestricted access to the XMPP federation, unless the admin restricts this.

A possible ejabberd configuration might look as follows (untested):

acl:
  local_guest:
    user_regexp: "^guest-"
  …
access_rules:
  s2s:
    - deny: local_guest
    - allow
  …
s2s_access: s2s

Notes

This would also be useful for other JSXC-based apps.

poVoq commented 6 years ago

However it seems guest support in most XMPP servers restricts federation, so guests would not be able to chat with people using an XMPP account from another server.

MarcelWaldvogel commented 6 years ago

Which XMPP server, the one hosting the guest or a remote one? How does an XMPP server automagically know what a guest is? (That's what the local_guest rule is meant to tell the local XMPP server.)

poVoq commented 6 years ago

https://www.ejabberd.im/Anonymous-users-support

DanScharon commented 6 years ago

I'd definitely prefer a solution with a dedicated virtual xmpp domain with ephemeral throwaway/guest accounts as it leads to less clutter within your "real" domain. The ejabberd example that @poVoq posted looks good.

DanScharon commented 6 years ago

this would be an example configuration with prosody: https://prosody.im/doc/anonymous_logins

MarcelWaldvogel commented 6 years ago

That requires Multi-Domain support for JSXC ;)

I agree, it is cleaner.