Hi all,
I am trying to use a custom authorisation module in a docker setup. My goal is to use an (adapted) community plugin: mod_auth_wordpress.lua.
I have this module already running on an ubuntu setup. However, this is a very old version of Jitsi, and I am trying to replicate the setup using the latest docker images.
First, I tried to changes the docker prosody image to include the module. However, I am unable to find where I should put the changes that should end up in /etc/prosody/conf.d/domain.cfg.lua
My second attempt was to use the XMPP_MODULES to load the custom module. However, I do not know how to get prosody to use the new module for authentication.
I think i need something like AUTH_TYPE=wordpress ?
Can anyone point me in the right direction? How should I configure a custom authorisation module to validate users against a wordpress database? Anyone tried this before?
I made a little progress. the wordpress module is being loaded, but I get the error: module āDBIā not found.
What I did:
I added lua-dbi-common and lua-dbi-mysql to the Prosody dockerfile.
I changed prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua and added the option for āwordpressā:
{{ else if eq $AUTH_TYPE āwordpressā }}
authentication = āwordpressā
ā¦
and created a new prosody docker image with these changes,
Using this image I get an error during startup:
prosody_1 | 2023-01-22T20:30:25.130298498Z modulemanager error Error initializing module āauth_wordpressā on āmeet.jitsiā: /usr/share/lua/5.4/prosody/util/startup.lua:203: module āDBIā not found:
prosody_1 | 2023-01-22T20:30:25.130324681Z No LuaRocks module found for DBI
prosody_1 | 2023-01-22T20:30:25.130328574Z no field package.preload[āDBIā]
ā¦
If I open a shell in this container and do an āapt listā I see that both lua dbi components are installed:
lua-cyrussasl/now 1.1.0-2 amd64 [installed,local] lua-dbi-common/now 0.7.2-2 all [installed,local] lua-dbi-mysql/now 0.7.2-2 amd64 [installed,local]
lua-expat/now 1.3.9-1lua54prosody~bullseye3 amd64 [installed,local]
lua-filesystem/now 1.8.0-1 amd64 [installed,local]
lua-inspect/now 3.1.1-2 all [installed,local]
lua-ldap/now 1.2.5-1+b1 amd64 [installed,local]
lua-luaossl/now 20161214-3prosody~bullseye2 amd64 [installed,local]
lua-sec/now 1.0.2-1prosody~bullseye1 amd64 [installed,local]
lua-socket/now 3.0~rc1+git+ac3201d-6prosody~bullseye1 amd64 [installed,local]
lua-unbound/now 0.5-2 amd64 [installed,local]
lua5.4/now 5.4.2-2 amd64 [installed,local]
What is missing? What should I do to get rid of the DBI not found error?
I made some progress: it appears that de luadbi package does not support lua5.4. (see 1)
I changed all references to lua5.4 in the prosody Dockerfile to lua5.3 and build a new image. With the previous version of Lua in the image the auth_wordpress modules seems to be working fine.
However, in the prosody log file is see errors I did not notice before:
The latest Jitsi docker has prosody 0.12.2, which supports lua 5.3 (although 5.4 is recommended).
I did some testing and could indeed find no issues using lua 5.3 with the docker setup, other then the log error about the Garbage Collector complaining about the parameter āstep_sizeā.
The documentation on the prosody advanced garbage collector states that parameter step_size is only supported on Lua 5.4. (see: Advanced GC configuration ā Prosody IM )
I changed the configuration file prosody.cfg.lua and removed this parameter from the gc section. Now the errors are gone
I think I am happy now: I have a working docker setup with my custom authentication module and branding. After some more testing and changing small cosmetic things (like missing translation on the new āleave meetingā and āend meeting for allā buttons) it should be ready for deployment.