Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for jitsi-token-moderation-plugin #17563

Closed
ankar84 opened this issue May 7, 2020 · 12 comments · May be fixed by #20388
Closed

Add support for jitsi-token-moderation-plugin #17563

ankar84 opened this issue May 7, 2020 · 12 comments · May be fixed by #20388
Labels
stat: triaged Issue reviewed and properly tagged

Comments

@ankar84
Copy link

ankar84 commented May 7, 2020

Jitsi integration in Rocket.Chat with JWT authorization works very good!
But we need that only first user in call (actually user who creates the room) is granted moderator rights.
But with JWT authorization enabled in Jitsi all JWT authenticated users gets moderator permissions.
There is a nice jitsi-token-moderation-plugin lua module that can help.
All we need is first user who start the call use URL with moderator:true encrypted in JWT token and channel blue button Click to Join should open regular URL with JWT token without moderator in it.

@alonelion1987 Roman, can it be done?
@geekgonecrazy Aaron, can you take a look?

PS I also opened issue in Jitsi, but RC implementation could be more elegant, IMHO.

@geekgonecrazy
Copy link
Contributor

geekgonecrazy commented May 8, 2020

Yup if you wanted to do this properly take a look at the code that generates the jwt. Then if user has a role of owner/moderator of channel or admin could add that property in.

PRs certainly welcome!

@alonelion1987
Copy link
Contributor

Hi, I don’t know if this topic will help you? I have been asking a question about the moderator here for a long time:

https://community.jitsi.org/t/how-to-make-a-single-moderator/15332

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stat: stale Stale issues will be automatically closed if no activity label Aug 14, 2020
@ankar84
Copy link
Author

ankar84 commented Aug 14, 2020

Please don't close that issue.
Maybe someone from community will make a pr for that.

@geekgonecrazy geekgonecrazy removed the stat: stale Stale issues will be automatically closed if no activity label Aug 15, 2020
@geekgonecrazy
Copy link
Contributor

Maybe this could be made more generic to do mapping of role and such to token. Something customizable enough to fit multiple cases. Especially since this particular solution proposed isn’t the only way you could do it

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stat: stale Stale issues will be automatically closed if no activity label Oct 14, 2020
@ankar84
Copy link
Author

ankar84 commented Oct 14, 2020

Please don't close that issue.
Maybe someone from community will make a pr for that.

@github-actions github-actions bot removed the stat: stale Stale issues will be automatically closed if no activity label Oct 14, 2020
@geekgonecrazy geekgonecrazy added stat: triaged Issue reviewed and properly tagged Triaged labels Oct 16, 2020
@laliluna
Copy link

@ankar84, @alonelion1987 Having only the first user be the moderator can be configured on the Jitsi side. Have a look in the prosody configuration. There are modules loaded from a plugin directory and one module is "muc_allowners". In that case, you don't want this.

The lua plugins allows to configure rooms based on the token information. This is how usernames and the like and even the avatar is fetched. jitsi-token-moderation-plugin uses a flag, but to allow more flexible handling it would be better to include the user roles as well. This allows to configure the jitsi room very flexible.

I will have a look at the related code, to see if a pull request is easy to do.

@laliluna
Copy link

@geekgonecrazy a patch adding the field looks trivial. Is adding roles and the isModerator flag acceptable as default behaviour, or does this need to be configured.

@ankar84
Copy link
Author

ankar84 commented Feb 1, 2021

Having only the first user be the moderator can be configured on the Jitsi side. Have a look in the prosody configuration. There are modules loaded from a plugin directory and one module is "muc_allowners". In that case, you don't want this.

It's not quite true for secure domain (when using JWT tokens for authentications).
I just test it (removed muc_allowners from folder, restart prosody and jicofo and nothing changed).

So, a little enhancements are needed in RC to support jitsi-token-moderation-plugin

@ankar84
Copy link
Author

ankar84 commented May 5, 2021

I think with new Jitsi version 2.0.5765 (21-04-15) that feature implemented from Jitsi side.
I asked a question here but now all what I see is that only first call participant gets moderator role without any changes in Rocket Chat codebase.
I wait for Jitsi team answer, and if I'm right, I will close that issue.

@ankar84
Copy link
Author

ankar84 commented May 7, 2021

Solved that issue on Jitsi side with enable-auto-owner = true in conference section of jicofo.conf config.

@ankar84 ankar84 closed this as completed May 7, 2021
@tassoevan tassoevan removed the Triaged label Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: triaged Issue reviewed and properly tagged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants