nvonahsen / jitsi-token-moderation-plugin

Lua plugin for jitsi which determines whether users are moderator or not based on token contents
MIT License
166 stars 96 forks source link

muc_lobby_rooms disabled when jitsi-token-moderation enabled #15

Open nafem opened 4 years ago

nafem commented 4 years ago

It is not possible to enable both muc_lobby_rooms and jitsi-token-moderation within the same config. The config below disables muc_lobby_rooms unless I disable jitsi-token-moderation.

The use case is that moderators should be able to authenticate and be assigned as moderator using a token. Non moderators should still require a token to access but may be required to request access while in the Lobby to prevent them from automatically joining an existing call.

`
VirtualHost "fqd.com" -- enabled = false -- Remove this line to enable this host authentication = "token" app_id="xxx" app_secret="xxx" allow_empty_token=false

modules_enabled = { "bosh"; "pubsub"; "ping"; -- Enable mod_ping "speakerstats"; "turncredentials"; "conference_duration"; "muc_lobby_rooms"; }

Component "conference.fqd.com" "muc" storage = "memory" modules_enabled = { "muc_meeting_id"; "muc_domain_mapper"; "token_verification"; "token_moderation"; } admins = { "focus@auth.fqd.com" } muc_room_locking = false muc_room_default_public_jids = true

`

Is there a way to enable both muc_lobby_rooms and jitsi-token-moderation?

bryanasdev000 commented 4 years ago

Is there a way to enable both muc_lobby_rooms and jitsi-token-moderation?

At first, no, this functionality is newer than the current code. I'll take a look at what can be done.

djb4ai commented 4 years ago

@nafem doing exactly that, did you find a workaround?

@bryanasdev000 Any idea how to make sure that a user is unique, ie the token is used just once. Can put a check ion email id. Noobie here.

nafem commented 4 years ago

@adhibhuta I haven't found a workaround yet, currently we are disabling the lobby because token authorisation is more important.

A bit off topic but regarding single use tokens, I am generating a token for each user based on the room they are trying to access and the level of authority they have. This plugin then provides moderator status based on the topic they present at that time.

nilsreichardt commented 3 years ago

Any updates?

bryanasdev000 commented 3 years ago

Any updates?

Not yet I did not have time to mess with that, for now I am deploying without the muc_lobby_rooms option.

PRs are welcome too :D

nilsreichardt commented 3 years ago

I don't know what I changed, but I can use the lobby feature + jitsi-token-moderation (browser and app) πŸ€”πŸ˜…

Freddie-m commented 3 years ago

I don't know what I changed, but I can use the lobby feature + jitsi-token-moderation (browser and app) πŸ€”πŸ˜…

@nilsreichardt Can you share your prosody lua config, pls?

nilsreichardt commented 3 years ago

@fremzy Yes, of course :) https://pastebin.com/r5yCNJP7 But I only changed disableProfile, defaultLanguage and p2p