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

Jitsi Token Moderation Code Does Not Fire #8

Open
selvadt opened this issue May 21, 2020 · 8 comments
Open

Jitsi Token Moderation Code Does Not Fire #8

selvadt opened this issue May 21, 2020 · 8 comments

Comments

@selvadt
Copy link

selvadt commented May 21, 2020

I successfully got the code to work after installing missing LUA libraries. I notice that doing some tracing of the code, "room.set_affiliation" works fine but both "room.handle_normal_presence" and "room.handle_first_presence" do not get executed at all causing "setupAffiliation" not to be executed.

This is how my JWT looks like:
{
"context": {
"user": {
"avatar": "123",
"name": "Jane Doe",
"id": "dsfsdfsd"
}
},
"sub":"dsfsdf",
"room":"testo",
"moderator": true
}

Please help. Thank you.

@rajapulau
Copy link

me too. I check the log because origin.auth_token is nil. Does anyone know how to fix it? or I missing something to configuration to load this module?

@rajapulau
Copy link

hi @nvonahsen do you have any idea to how get origin.auth_token ? I'm stuck 5 days to get auth_token

Regards

@bryanasdev000
Copy link
Collaborator

bryanasdev000 commented Jun 16, 2020

Hi @selvadt and @rajapulau !

I've installed using a fork of luajwt (https://github.com/ASolomatin/luajwt/tree/replace_luacrypto) and its working flawless for me. There is a a thread in jitsi forum that specify step-by-step how to deploy, if I find it I will edit thit post.

The origin.auth_token comes from the event object that hook sends.

It is important to remember that for this plugin to work correctly the verification of the token has to be occurring.

I am messing a bit with this code, with another objective (log presence of the user), maybe it helps understand the "flow" of the things in Prosody. You can check it here https://github.com/bryanasdev000/jitsi-logging-plugin/blob/dev/mod_presence_logger.lua

@rajapulau
Copy link

Hi @bryanasdev000

I have try load https://github.com/bryanasdev000/jitsi-logging-plugin/blob/dev/mod_presence_logger.lua
to check my token. But the results is
Presence logger - No token available in session: budianak@conference.meetstage.mydomain.com/92e77935 for user: lpdbyc6pchtk0zdk@meetstage.mydomain.com/sh9Qr7B

Is there I missing some step something to get the token?

@bryanasdev000
Copy link
Collaborator

Hi @bryanasdev000

I have try load https://github.com/bryanasdev000/jitsi-logging-plugin/blob/dev/mod_presence_logger.lua
to check my token. But the results is
Presence logger - No token available in session: budianak@conference.meetstage.mydomain.com/92e77935 for user: lpdbyc6pchtk0zdk@meetstage.mydomain.com/sh9Qr7B

Is there I missing some step something to get the token?

There's a great chance your JWT authentication is not working as intended. Its important to note that I dont have a guest session inside my Jitsi, all rooms are JWT authenticated, maybe this is a problem for you.

Anyway, read and check if you Jitsi its configured correctly.

Jitsi Secure Domain and Jitsi Tokens should bring a light.

@Boby
Copy link

Boby commented Sep 4, 2020

+1 its not working for my end

@TimHeckel
Copy link
Contributor

TimHeckel commented Sep 8, 2020

FWIW, I was able to get this working -- step-by-step for a Ubuntu 18.02 is below -- the trick is to use the custom luajwt package that @bryanasdev000 mentions above. I've incorporated that luarocks install in the gist below:

https://gist.github.com/TimHeckel/8ae568083b136aad0f2474b3c86cb162

@jamesctl
Copy link

+1 its not working for my end

me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants