Jwt authentication bug

Hello Damian,

First i would like to thank you and all the team for your great support during these busy days; you are trying to give a hand to all people who is mostly trying to prepare their solutions especially for children’s online education…Thanks!

Here is what i did so far, tried to install prosody first with below steps:

1  sudo apt-get -y update
2  wget https://packages.prosody.im/debian/pool/main/p/prosody-0.11/prosody-0.11_1nightly81-1~bionic_amd64.deb
3  dpkg -i prosody-0.11_1nightly81-1~bionic_amd64.deb
6  sudo apt-get -y install lua5.2
7  apt --fix-broken install
8  prosodyctl about
9  sudo apt-get install luarocks

11 sudo apt-get install libssl1.0-dev
12 sudo luarocks install luacrypto (given errors)
13 sudo apt-get -y update
14 apt-get -y install nginx
15 wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
16 sudo sh -c “echo ‘deb https://download.jitsi.org unstable/’ > /etc/apt/sources.list.d/jitsi-unstable.list”
21 sudo apt-get -y update
22 sudo apt-get -y install jitsi-meet
25 /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh
26 sudo apt-get install jitsi-meet-tokens
27 vi /etc/prosody/conf.d/mydomain.cfg.lua
28 vi /etc/prosody/prosody.cfg.lua
30 systemctl restart prosody
31 tail -f /var/log/prosody/prosody.log
32 tail -f /var/log/prosody/prosody.err

And

  • the app_id and app_secret which i have entered during jitsi-meet-tokens install pop-up are not overwritten in conf.d/

  • i have edited token, appid , app secret, token verification and c2s_require_encryption = false as i explained in previous post…

my logs say that:

/home/ubuntu# tail -f /var/log/prosody/prosody.err
/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>

prosody.log
No available SASL mechanisms, verify that the configured authentication module is working

what am i missing?
Many thanks

Try getting more error logs, they are truncated ^

What about the order of installation? Is it correct order? Any missing config or package?

server is not opening mic and cam; a dark blue screen and with

2020-03-20T15:52:01.986Z [modules/xmpp/strophe.util.js] <Object.i.Strophe.log>: Strophe: Server did not yet offer a supported authentication mechanism. Sending a blank poll request.
o @ Logger.js:154
i.Strophe.log @ strophe.util.js:77
warn @ strophe.umd.js:1382
_no_auth_received @ strophe.umd.js:4823
_connect_cb @ strophe.umd.js:3245
_onRequestStateChange @ strophe.umd.js:5012

in console msg…

prosody logs doesn’t give much more then i have shared…

There should be more info …

Another aproach, result is same…

1  sudo nano /etc/apt/sources.list.d/prosody.list
2  wget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -
3  sudo apt update
4  sudo apt install prosody
5  prosodyctl about
6  wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
7  sudo sh -c "echo 'deb https://download.jitsi.org unstable/' > /etc/apt/sources.list.d/jitsi-unstable.list"
8  apt-get -y install nginx
9  sudo apt-get -y update

10 sudo apt-get -y install jitsi-meet
11 /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh
12 prosodyctl about
13 reboot
14 sudo apt-get install jitsi-meet-tokens
15 vi /etc/prosody/prosody.cfg.lua
16 vi /etc/prosody/conf.d/mydomain.cfg.lua
17 tail -f /var/log/prosody/prosody.log
18 tail -f /var/log/prosody/prosody.err

I know you can not help everyone one by one, but is it possible for you to follow these steps and see why tokens is not configured even after jitsi-meet-tokens package… It doesn’t write the appid appsecret values anywhere even i enter them in the pop-up during install…

I have Prosody 0.11.4 , Lua 5.2 , LuaRocks: Installed (2.4.2), libssl-dev is already the newest version (1.1.1-1ubuntu2.1~18.04.5)., jitsi-meet-prosody is already the newest version (1.0.3901-1).

only log is
No available SASL mechanisms, verify that the configured authentication module is working

In a jwt configured server, if a room is opened without token, it just asks for username password; but here the conference window is just stuck

any help will be much appreciated as i have to get this setup with muc and jwt working till monday

as far as i see
By default, all mechanisms are enabled and the priorities
* OAUTHBEARER - 60
* SCRAM-SHA1 - 50
* DIGEST-MD5 - 40
* PLAIN - 30
* ANONYMOUS - 20
* EXTERNAL - 10
can it be something related with this in latest unstable build and prosody 0.11 ?

“Server did not yet offer a supported authentication mechanism. Sending a blank poll request.” error generally points to c2s_require_encryption = false but it is already false

Hi Omesta,

Please find the step given below.

Take a Fresh server

Update server

apt update -y

Install Apache

apt install apache2

Install Prosody


echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list && wget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -


sudo apt-get update

sudo apt-get install prosody

Install JItsi

apt-get update

apt-get install jitsi-meet

Possible errors and fixes:

luarocks install luacrypto

Zash: src/lcrypto.c:30:10: fatal error: lua.h: No such file or directory

#include “lua.h”

^~~~~~~

compilation terminated.

Fix:

sudo apt-get install liblua5.2-dev


error loading module 'cjson’

Fix:

luarocks install basexx


error loading module 'auth_token’

Fix:

luarocks remove lua-cjson --force

luarocks install lua-cjson 2.1.0-1

Hi febi,

thanks for your suggestions, actually this is a good script to install suitable prosody version

echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list && wget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -

and also i have followed your instructions to fix packages; however it seems that my problem is with jitsi-meet-tokens more than missing packages;

and if i manually edit anonymous to token and mae other changes like token verification, c2s_require_encryption = false, it doesn’t enable mic/cam and room is not opened

It doesn’t seem to be compatible with either prosody11 or unstable build

HI,
i follow below steps but not working

 UBUNTU 18.04 

Jitsi meet quick install

    wget https://packages.prosody.im/debian/pool/main/p/prosody-trunk/prosody-trunk_1nightly747-1~xenial_amd64.deb
    dpkg -i prosody-trunk_1nightly747-1~xenial_amd64.deb

then

sudo apt-get install libssl1.0-dev

and then

sudo apt-get install luarocks

sudo luarocks install luacrypto

and then finally
sudo apt-get install jitsi-meet-tokens

my_jitsi_app_id
my_jitsi_app_secret

vi /etc/prosody/prosody.cfg.lua 

Include "conf.d/*.cfg.lua"

c2s_require_encryption=false
```--------------------------------------


May 07 12:08:24 mod_bosh	error	Traceback[bosh]: /usr/lib/prosody/modules/mod_posix.lua:123: bad argument #3 to 'format' (string expected, got nil)
stack traceback:
	[C]: in function 'format'
	/usr/lib/prosody/modules/mod_posix.lua:123: in function '?'
	/usr/lib/prosody/util/logger.lua:46: in function </usr/lib/prosody/util/logger.lua:44>
	(tail call): ?
	(tail call): ?
	...jitsi-meet/prosody-plugins/mod_muc_domain_mapper.lua:90: in function '?'
	/usr/lib/prosody/util/filters.lua:24: in function 'filter'
	/usr/lib/prosody/modules/mod_bosh.lua:342: in function 'send'
	/usr/lib/prosody/modules/mod_saslauth.lua:295: in function '?'
	/usr/lib/prosody/util/events.lua:78: in function </usr/lib/prosody/util/events.lua:74>
	(tail call): ?
	/usr/lib/prosody/core/stanza_router.lua:149: in function 'dispatch_stanza'
	/usr/lib/prosody/modules/mod_bosh.lua:322: in function 'func'
	/usr/lib/prosody/util/async.lua:90: in function </usr/lib/prosody/util/async.lua:88>
stack traceback:
	(tail call): ?
	/usr/lib/prosody/util/async.lua:163: in function 'run'
	/usr/lib/prosody/modules/mod_bosh.lua:454: in function 'cb_handlestanza'
	/usr/lib/prosody/util/xmppstream.lua:184: in function </usr/lib/prosody/util/xmppstream.lua:164>
	[C]: in function 'parse'
	/usr/lib/prosody/util/xmppstream.lua:271: in function 'feed'
	/usr/lib/prosody/modules/mod_bosh.lua:150: in function '?'
	/usr/lib/prosody/util/events.lua:78: in function </usr/lib/prosody/util/events.lua:74>
	(tail call): ?
	/usr/lib/prosody/net/http/server.lua:239: in function </usr/lib/prosody/net/http/server.lua:180>
	...
	/usr/lib/prosody/net/http/server.lua:112: in function 'process_next'
	/usr/lib/prosody/net/http/server.lua:128: in function 'success_cb'
	/usr/lib/prosody/net/http/parser.lua:177: in function 'feed'
	/usr/lib/prosody/net/http/server.lua:159: in function </usr/lib/prosody/net/http/server.lua:158>
	(tail call): ?
	/usr/lib/prosody/net/server_select.lua:920: in function </usr/lib/prosody/net/server_select.lua:895>
	[C]: in function 'xpcall'
	/usr/lib/prosody/../../bin/prosody:396: in function 'loop'
	/usr/lib/prosody/../../bin/prosody:427: in main chunk
	[C]: ?

Hi omesta

Did you find the solution, i have the same problem with token-verification-plugin, i followed this url but it dosnt worked:

https://github.com/christiancuri/Docs/blob/master/Jitsi%20Meet%20Installation.md

thank u

my main problem was, even i install jitsi-meet-tokens, i didn’t see my app_id and app_secret in prosody…
I think there were problem in /usr/share/jitsi-meet/prosody-plugins/mod_auth_token.lua
missing _global parameter in hook; i think it is already fixed…

please try these steps; it finally worked for me…there may be a better order of steps or unneccessary steps but anyway it works if you follow this… if not, please send me a message about your prosody config

sudo apt-get install jitsi-meet-tokens
luarocks install luacrypto
sudo apt-get install liblua5.2-dev
luarocks install luacrypto
sudo apt-get install libssl1.0-dev
luarocks install luacrypto
luarocks install basexx
sudo apt-get install jitsi-meet-tokens
systemctl restart prosody
luarocks remove lua-cjson --force
luarocks install lua-cjson 2.1.0-1
systemctl restart prosody
systemctl restart jitsi-videobridge2
systemctl restart jicofo