nvonahsen / jitsi-token-moderation-plugin

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

Not reading moderator from JWT body #4

Closed mynameisbrendan closed 4 years ago

mynameisbrendan commented 4 years ago

Hi,

This module looks like exactly what I need, I just cannot get it to decode my token. I am fairly sure I have done the token correct (sample below).

Other than the required modules in the start of the plugin, are there other jitsi settings or required modules for this to work? I have a clean install with JWT installed as per the instructions here - https://github.com/christiancuri/Docs/blob/master/Jitsi%20Meet%20Installation.md

_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJteWRvbWFpbm5hbWUiLCJpc3MiOiJBUFBJRCIsInN1YiI6Im15c2VydmVyZnFkbiIsInJvb20iOiIqIiwibW9kZXJhdG9yIjoidHJ1ZSJ9.vJTRfORV3EXEhSFCEq7mnJpUNmYFNAIBl7gwB9tb3k

My config looks like:

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

Thanks!

ibrainventures commented 4 years ago

hi @mynameisbrendan

your boolean has quotation marks:

{ "aud": "mydomainname", "iss": "APPID", "sub": "myserverfqdn", "room": "*", "moderator": "true" }

try it without:

e.g. "moderator": false,

i have the same setup (also from christiancuri) here running and it works fine on the stable and unstable edition on ubuntu 19.10 and 18.04

mynameisbrendan commented 4 years ago

Thanks @ibrainventures!

I can confirm that is working now. The JWT.io interface will not accept the identifier without quote marks but I had not tested taking them off the value.