Token authentication

Hello, I am new to jitsi and I need some help in troubleshooting the configuration. My Jitsi is running on ubuntu 18.04 and after a system update the token authentcation doen’t work anymore. I double checked all configuration files (at least those mentioned in the jitsi documentation) and they all are the same as they were at the time of the system update.

The message I receive when I start a video call with token authentication is “Authentication failure”. I double checked the token using jwt.io and it looks to be okay.

Can somebody help me on this matter?
Thank you

Hello,

what is the result of /http-bind request on the client side ? (in Chrome => CTRL+SHIFT+I => Network tab)

Thanks for the quick reply.

  1. Request URL:

https://video.servizienti.it/http-bind?room=test00&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOiIxNTg1OTMwODM2IiwiaXNzIjoiYXBwR3J1cHBvQVMiLCJhdWQiOiJqaXRzaSIsInN1YiI6InZpZGVvLnNlcnZpemllbnRpLml0Iiwicm9vbSI6InRlc3QwMCIsImNvbnRleHQiOnsidXNlciI6eyJuYW1lIjoiRmxhdmlvIEJpenphcnJpIn19fQ.4mVNus0h630TUPO6JzpMVeyr24fMNcRQ84B2t_C5_I8

  1. Request Method:

POST

  1. Status Code:

200

  1. Remote Address:

93.145.28.51:443

  1. Referrer Policy:

no-referrer-when-downgrade

response headers

  1. ontent-length:

625

  1. content-type:

text/xml; charset=utf-8

  1. date:

Mon, 06 Jul 2020 07:47:30 GMT

  1. server:

nginx/1.14.0 (Ubuntu)

  1. status:

200

  1. strict-transport-security:

max-age=31536000

Is there any possible relation to the liblua version? Originally jitsi was installed with liblua50-dev now prosody is using

Lua environment

Lua version: Lua 5.1

what is your prosody version ?
command : sudo prosodyctl about

Prosody trunk nightly build 747 (2017-02-19, 428d4abee723)

Prosody directories

Data directory: /var/lib/prosody
Config directory: /etc/prosody
Source directory: /usr/lib/prosody
Plugin directories:
/usr/share/jitsi-meet/prosody-plugins/
/usr/lib/prosody/modules/

Lua environment

Lua version: Lua 5.1

Lua module search paths:
/usr/lib/prosody/?.lua
/usr/local/share/lua/5.1/?.lua
/usr/local/share/lua/5.1/?/init.lua
/usr/local/lib/lua/5.1/?.lua
/usr/local/lib/lua/5.1/?/init.lua
/usr/share/lua/5.1/?.lua
/usr/share/lua/5.1/?/init.lua
/root/.luarocks/share/lua/5.1/?.lua
/root/.luarocks/share/lua/5.1/?/init.lua

Lua C module search paths:
/usr/lib/prosody/?.so
/usr/local/lib/lua/5.1/?.so
/usr/lib/x86_64-linux-gnu/lua/5.1/?.so
/usr/lib/lua/5.1/?.so
/usr/local/lib/lua/5.1/loadall.so
/root/.luarocks/lib/lua/5.1/?.so

LuaRocks: Installed (2.4.2)

Lua module versions

lfs: LuaFileSystem 1.7.0
libevent: 2.1.8-stable
luaevent: 0.4.4
lxp: LuaExpat 1.3.0
socket: LuaSocket 3.0-rc1
ssl: 0.6

Upgrade to Prosody 0.11.5
and follow these steps : Here's how you should install jitsi-meet-tokens on debian 10

So, am I supposed to go with: apt-get install prosody and then reinstall jitsi-meet-tokens ?

yes

So I arrived at the endo of the process, indeed in the very final step I had this error … any suggestion?

root@video:/# apt install jitsi-meet-tokens
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
jitsi-meet-tokens : Depends: prosody-trunk (>= 1nightly747) but it is not installable or
prosody-0.11 but it is not installable or
prosody (>= 0.11.2)
E: Unable to correct problems, you have held broken packages.

… It looks that after install prosody the version is still 0.10 …

You have to install it from prosody repo https://prosody.im/download/package_repository

I finally installed prosody 0.11.5 indeed now I get these errors in the log file

Jul 06 14:08:56 general info Shutting down…
Jul 06 14:08:56 general info Shutdown status: Cleaning up
Jul 06 14:08:56 general info Shutdown complete
Jul 06 14:15:47 startup info Hello and welcome to Prosody version 0.11.5
Jul 06 14:15:47 startup info Prosody is using the select backend for connection handling
Jul 06 14:15:47 modulemanager error Error initializing module ‘auth_token’ on ‘video.servizienti.it’: /usr/lib/proso
dy/util/startup.lua:199: module ‘luajwtjitsi’ not found:Failed loading module luajwtjitsi in LuaRocks rock luajwtjitsi 1
.3-7
no field package.preload[‘luajwtjitsi’]
no file ‘/usr/lib/prosody/luajwtjitsi.lua’
no file ‘/usr/local/share/lua/5.2/luajwtjitsi.lua’
no file ‘/usr/local/share/lua/5.2/luajwtjitsi/init.lua’
no file ‘/usr/local/lib/lua/5.2/luajwtjitsi.lua’
no file ‘/usr/local/lib/lua/5.2/luajwtjitsi/init.lua’
no file ‘/usr/share/lua/5.2/luajwtjitsi.lua’
no file ‘/usr/share/lua/5.2/luajwtjitsi/init.lua’
no file ‘/var/lib/prosody/.luarocks/share/lua/5.2/luajwtjitsi.lua’
no file ‘/var/lib/prosody/.luarocks/share/lua/5.2/luajwtjitsi/init.lua’
no file ‘/usr/lib/prosody/luajwtjitsi.so’
no file ‘/usr/local/lib/lua/5.2/luajwtjitsi.so’
no file ‘/usr/lib/x86_64-linux-gnu/lua/5.2/luajwtjitsi.so’
no file ‘/usr/lib/lua/5.2/luajwtjitsi.so’
no file ‘/usr/local/lib/lua/5.2/loadall.so’
no file ‘/var/lib/prosody/.luarocks/lib/lua/5.2/luajwtjitsi.so’
stack traceback:
[C]: in function ‘_real_require’
/usr/lib/prosody/util/startup.lua:199: in function ‘require’
/usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:7: in main chunk
(…tail calls…)
/usr/share/jitsi-meet/prosody-plugins/mod_auth_token.lua:8: in main chunk
[C]: in function ‘xpcall’
/usr/lib/prosody/core/modulemanager.lua:183: in function ‘do_load_module’
/usr/lib/prosody/core/modulemanager.lua:261: in function ‘load’
/usr/lib/prosody/core/usermanager.lua:67: in function ‘?’
/usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75>
(…tail calls…)
/usr/lib/prosody/core/hostmanager.lua:108: in function ‘activate’
/usr/lib/prosody/core/modulemanager.lua:183: in function ‘do_load_module’
/usr/lib/prosody/core/modulemanager.lua:261: in function ‘load’
/usr/lib/prosody/core/usermanager.lua:67: in function ‘?’
/usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75>
(…tail calls…)
/usr/lib/prosody/core/hostmanager.lua:108: in function ‘activate’
/usr/lib/prosody/core/hostmanager.lua:58: in function ‘?’
/usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75>
(…tail calls…)
/usr/lib/prosody/util/startup.lua:391: in function ‘prepare_to_start’
/usr/lib/prosody/util/startup.lua:613: in function ‘f’
/usr/lib/prosody/util/async.lua:139: in function ‘func’
/usr/lib/prosody/util/async.lua:127: in function </usr/lib/prosody/util/async.lua:125>
Jul 06 14:15:47 portmanager info Activated service ‘c2s’ on [::]:5222, []:5222
Jul 06 14:15:47 portmanager info Activated service ‘legacy_ssl’ on no ports
Jul 06 14:15:47 portmanager info Activated service ‘http’ on [::]:5280, [
]:5280
Jul 06 14:15:47 portmanager error Error binding encrypted port for https: No certificate present in SSL/TLS config
uration for https port 5281
Jul 06 14:15:47 portmanager error Error binding encrypted port for https: No certificate present in SSL/TLS config
uration for https port 5281
Jul 06 14:15:47 portmanager info Activated service ‘https’ on no ports
Jul 06 14:15:47 mod_posix info Prosody is about to detach from the console, disabling further console output
Jul 06 14:15:47 mod_posix info Successfully daemonized to PID 2384
Jul 06 14:15:47 mod_posix error Couldn’t write pidfile at /var/run/prosody/prosody.pid; /var/run/prosody/prosody
.pid: No such file or directory
Jul 06 14:15:47 startup info Shutting down: Couldn’t write pidfile
Jul 06 14:15:47 portmanager info Activated service ‘s2s’ on [::]:5269, :5269
Jul 06 14:15:47 portmanager info Activated service ‘component’ on [::1]:5347, [127.0.0.1]:5347
Jul 06 14:15:48 modulemanager error Error initializing module ‘token_verification’ on ‘conference.video.servizienti.
it’: /usr/lib/prosody/util/startup.lua:199: module ‘luajwtjitsi’ not found:Failed loading module luajwtjitsi in LuaRocks
rock luajwtjitsi 1.3-7
no field package.preload[‘luajwtjitsi’]
no file ‘/usr/lib/prosody/luajwtjitsi.lua’
no file ‘/usr/local/share/lua/5.2/luajwtjitsi.lua’
no file ‘/usr/local/share/lua/5.2/luajwtjitsi/init.lua’
no file ‘/usr/local/lib/lua/5.2/luajwtjitsi.lua’
no file ‘/usr/local/lib/lua/5.2/luajwtjitsi/init.lua’
no file ‘/usr/share/lua/5.2/luajwtjitsi.lua’
no file ‘/usr/share/lua/5.2/luajwtjitsi/init.lua’
no file ‘/var/lib/prosody/.luarocks/share/lua/5.2/luajwtjitsi.lua’
no file ‘/var/lib/prosody/.luarocks/share/lua/5.2/luajwtjitsi/init.lua’
no file ‘/usr/lib/prosody/luajwtjitsi.so’
no file ‘/usr/local/lib/lua/5.2/luajwtjitsi.so’
no file ‘/usr/lib/x86_64-linux-gnu/lua/5.2/luajwtjitsi.so’
no file ‘/usr/lib/lua/5.2/luajwtjitsi.so’
no file ‘/usr/local/lib/lua/5.2/loadall.so’
no file ‘/var/lib/prosody/.luarocks/lib/lua/5.2/luajwtjitsi.so’
stack traceback:
[C]: in function ‘_real_require’
/usr/lib/prosody/util/startup.lua:199: in function ‘require’
/usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:7: in main chunk
(…tail calls…)
…re/jitsi-meet/prosody-plugins/mod_token_verification.lua:24: in main chunk
[C]: in function ‘xpcall’
/usr/lib/prosody/core/modulemanager.lua:183: in function ‘do_load_module’
/usr/lib/prosody/core/modulemanager.lua:261: in function ‘load’
/usr/lib/prosody/core/modulemanager.lua:83: in function ‘?’
/usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75>
(…tail calls…)
/usr/lib/prosody/core/hostmanager.lua:108: in function ‘activate’
/usr/lib/prosody/core/hostmanager.lua:58: in function ‘?’
/usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75>
(…tail calls…)
/usr/lib/prosody/util/startup.lua:391: in function ‘prepare_to_start’
/usr/lib/prosody/util/startup.lua:613: in function ‘f’
/usr/lib/prosody/util/async.lua:139: in function ‘func’

I think this prosody plugin is really shit