Application user ID in Jitsi

Hi Jitsi Team,

What is the recommended approach to pass an application user ID through the Jitsi stack for associating streams, recordings etc. with parent application user accounts?

Some options:

  1. Using the application user ID as JID. Two approaches:
    a) Connecting to the application user store upon XMPP auth via a prosody auth module (modules.prosody.im/type_auth.html)
    b) Setting the JID for anonymous XMPP. This does not appear to be supported by Prosody (prosody.im/doc/anonymous_logins), but Jitsi Token auth is sending a user context (github.com/jitsi/lib-jitsi-meet/blob/master/doc/tokens.md#payload), so I’m wondering how this context is being used and whether it can be used to set the JID? cc @damencho

  2. Using anonymous auth in Prosody and passing the application user ID via a presence extension, such as the display name/nick. This approach would obviously not keep an XMPP user data history across prosody sessions.

Thanks for all the great OSS work!

Best,
Ben

We use jwt tokens for user association. The user id in the token through the context for example is propagated to jibri so in case of recordings jibri can upload the recording specific to that user that started it.
The user id in tokens is separate from the xmpp authentication and jids. You can also use xmpp authentication and jids can be unique and leave anonymous just for guests …

Thanks for your answer @damencho ! Can you point me to how Jibri accesses the user id from the token?

I’ve also discovered that a solution could be using nicks (different from display name):
connection.initJitsiConference(roomName, Object.assign({}, options, { useNicks:true, nick: someNick }))

The resource part/nick is available immediately in components (e.g. Jicofo) without listening to presence messages.

Not sure about that @bbaldino can help with that.

Jibri doesn’t do anything special here, so I haven’t touched this. It should just do whatever a normal jitsi meet client does I’d think?

@damencho
Is this https://github.com/jitsi/jitsi-meet/pull/2650/files the relevant PR?
It look like the JWT token is used to insert the user in presence stanzas.
Is this only happening if the poltergeist module is enabled? Where is that usually done, or should it happen automatically?

That one is specific to poltergeist. This module does it bu default https://github.com/jitsi/jitsi-meet/blob/master/resources/prosody-plugins/mod_presence_identity.lua