How jitsi meet know that conference need authentication in secure domain

I am trying to edit jitsi meet project , so I am reading javascript code to understand it.

I need help to know how jitsi meet know that secure domain is enabled to display authentication dialog. I found that AuthHandler.requestAuth call the authentication dialog.

Please help me how jitsi meet know that conference need authentication.

I think that Jitsi-meet reads the domain in the config.js file, and is checking with Prosody if the domain is authenticated or not (it’s in the config file under /etc/prosidy/cinf.available). There are most probably in lib-jitsi-meet Xmpp calls to get this information.

When you try to connect anonymously by the xmpp protocol you receive an error about not being authenticated and the auth dialog is shown.

@damencho OK good, but where exactly in code?

@damencho I found in project two files that contains code about starting connection:

jitsi-meet/connection.js and jitsi-meet/react/features/base/connection/actions.native.js

JitsiMeetJS.JitsiConnection

Please help me to know which file is used here and where exactly the dialog is called. Because I need to do some changes before displaying dialog.

The login the dialogs for web and native:


Thank you, but I need the code where jitsi knows that should display the dialog.
I don’t need the code of dialog.

Search for JitsiConnectionErrors.PASSWORD_REQUIRED those places.

1 Like

I need to allow some users only to join a room. Can you help me to solve this problem ?

I think you have to use JWT or prosody authentication.
For prosody auth method:
after secure domain config,You can remove annoymous from config.js.Each meeting connection force to pass authetication.You can register userd based on meeting name and share it to all users .so all users will connect single user and password.

Hello @Aakash_Senjaliya ,
Suppose I have 3 users: user1, user2 and user3.
I want to allow for user1 and user2 only to access the meeting ‘room1’ for example.
So my question is how can I allow only selected users to access my room?

Hello @kar_mac,

Check JWT as @Aakash_Senjaliya said. There is an option to limit the user to a specific room.

Hello, can you tell me how ? I don’t have any idea about that.

Hello @emrah,
Can you help me configure jitsi meet with token authentication prosody plugin ?

Could you share what is your environment, what you tried and what are the problems

I installed jitsi meet manually (self hosted) on a virtual machine (ubuntu).
Now I read the guide about tokens but it is not clear for me.
First question how can I install the module and enable it ?

Prosody configuration:

VirtualHost “jitsi.karmac.com
authentication = “internal_plain”
ssl = {
key = “/var/lib/prosody/jitsi.karmac.com.key”;
certificate = “/var/lib/prosody/jitsi.karmac.com.crt”;
}
modules_enabled = {
“bosh”;
“pubsub”;
}
c2s_require_encryption = false
admins = { “admin@jitsi.karmac.com” }

VirtualHost “auth.jitsi.karmac.com
authentication = “internal_hashed”
ssl = {
key = “/var/lib/prosody/auth.jitsi.karmac.com.key”;
certificate = “/var/lib/prosody/auth.jitsi.karmac.com.crt”;
}
admins = { “focus@auth.jitsi.karmac.com” }

VirtualHost “hidden.jitsi.karmac.com
authentication = “internal_plain”
ssl = {
key = “/var/lib/prosody/jitsi.karmac.com.key”;
certificate = “/var/lib/prosody/jitsi.karmac.com.crt”;
}
modules_enabled = {
“bosh”;
“pubsub”;
}
c2s_require_encryption = false

Component “conference.jitsi.karmac.com” “muc”
restrict_room_creation = true
admins = { “admin@jitsi.karmac.com” }
Component “jitsi-videobridge.jitsi.karmac.com
component_secret = “xxxxx”
Component “focus.jitsi.karmac.com
component_secret = “xxxxx”

I install jitsi-meet-tokens as described in How I’m installing jitsi-meet-tokens now but this is for Debian Buster and a bit different than the Ubuntu install.

The jitsi-meet-tokens package makes all necessary changes and no need to change the configuration file manually.

Your prosody version should be newer than 11.0

I installed it successfully using apt get jitsi-meet-tokens
Now how can I make room1 accessible by user1 and user2 only ?

I change configuration in prosody config file to:

VirtualHost “jitsi.karmac.com
authentication = “token”
ssl = {
key = “/var/lib/prosody/jitsi.karmac.com.key”;
certificate = “/var/lib/prosody/jitsi.karmac.com.crt”;
}
modules_enabled = {
“bosh”;
“pubsub”;
}
c2s_require_encryption = false
admins = { “admin@jitsi.karmac.com” }
app_id=“karmac”
app_secret=“xxxxx”
allow_empty_token = false;

Component “conference.jitsi.karmac.com” “muc”
restrict_room_creation = true
admins = { “admin@jitsi.karmac.com” }
modules_enabled = {
“token_verification”;
}

But application does not show me a dialog to authenticate before join meetin. what is the problem ?