Persistent Passwords on Self Hosted Rooms

Hey all,

We are working on a self hosted Jitsi Meet server, and we have a use case that is not persistently covered by the Jitsi Meet documentation.

We would like to be able to set persistent chatrooms on our server that have persistently set passwords. Our use case being that we have a specific client assigned to a particular URL, and we send that client a URL and a password for that room. They should be able to continue to use both the password and URL over the course of time.

Passwords are currently not persistent, and they are reset when all peers leave the room. This is particularly problematic when the admin and the client lose connection to the server in the middle of a meeting, and have to recreate and reset the conference rooms password when we reestablish connection.

Hopefully theres a known way to do this! Thanks.

We want the conference room passwords to be persistent, even if no users are in the conference room. Is that a possibility?

1 Like

There are two options here:

  • Install and use prosody 0.11 and set muc_room_default_persistent=true https://prosody.im/doc/modules/mod_muc
    Not sure how it will work, but you can experiment and report.
  • Keep current behaviour with non persistent rooms, but on every create check for a password and set it, by querying an external service and by implementing your custom module.
module:hook("muc-room-pre-create", function(event)
            local pass = http.query.for.password for this event.room;
            event.room:set_password(pass);
end);

The second approach for sure works as we use it.

Damencho,

I will be experimenting with the first option over the next few days and will let you know how badly I blow things up!

Thank you so much for helping out.

1 Like

I have two open threads about two separate instances, FYI so you dont get confused.

We tried the first one on our test instance, and prosody 0.11 basically broke Jitsi-meet, wherein users who join a conference room cant see each other or chat at all. Starting a room also doesn’t prompt the user to set a password.

|Nov 18 21:42:37 general|info|Hello and welcome to Prosody version 0.10.0|

|Nov 18 21:42:37 general|info|Prosody is using the select backend for connection handling|

|Nov 18 21:42:37 portmanager|info|Activated service ‘s2s’ on [::]:5269, :5269|

|Nov 18 21:42:37 portmanager|info|Activated service ‘c2s’ on [::]:5222, :5222|

|Nov 18 21:42:37 portmanager|info|Activated service ‘legacy_ssl’ on no ports|

|Nov 18 21:42:37 mod_posix|info|Prosody is about to detach from the console, disabling further console output|

|Nov 18 21:42:37 mod_posix|info|Successfully daemonized to PID 10316|

|Nov 18 21:42:37 portmanager|info|Activated service ‘component’ on [127.0.0.1]:5347, [::1]:5347|

|Nov 18 21:42:37 portmanager|info|Activated service ‘http’ on [::]:5280, :5280|

|Nov 18 21:42:37 portmanager|error|Error binding encrypted port for https: No key present in SSL/TLS configuration for https port 5281|

|Nov 18 21:42:37 portmanager|error|Error binding encrypted port for https: No key present in SSL/TLS configuration for https port 5281|

|Nov 18 21:42:37 portmanager|info|Activated service ‘https’ on no ports|

|Nov 18 21:42:38 jcp559f52507370|info|Incoming Jabber component connection|

|Nov 18 21:42:38 jitsi-videobridge.domain. com:component|info|External component successfully authenticated|

|Nov 18 21:42:38 c2s559f52465dd0|info|Client connected|

|Nov 18 21:42:39 jcp559f52581950|info|Incoming Jabber component connection|

|Nov 18 21:42:39 focus.domain. com:component|info|External component successfully authenticated|

|Nov 18 21:42:39 c2s559f52465dd0|info|Stream encrypted (TLSv1.2 with ECDHE-RSA-AES256-GCM-SHA384)|

|Nov 18 21:42:39 c2s559f52465dd0|info|Authenticated as focus@auth.domain. com|

|Nov 18 21:43:08 mod_posix|warn|Received SIGTERM|

|Nov 18 21:43:08 general|info|Shutting down: Received SIGTERM|

|Nov 18 21:43:08 c2s559f52465dd0|info|Client disconnected: connection closed|

|Nov 18 21:43:08 jcp559f52507370|info|component disconnected: jitsi-videobridge.domain. com (false)|

|Nov 18 21:43:08 jcp559f52581950|info|component disconnected: focus.domain. com (false)|

|Nov 18 21:43:08 general|info|Shutting down…|

|Nov 18 21:43:08 general|info|Shutdown status: Cleaning up|

|Nov 18 21:43:08 general|info|Shutdown complete|

|Nov 18 21:43:10 startup|info|Hello and welcome to Prosody version 0.11.3|

|Nov 18 21:43:10 startup|info|Prosody is using the select backend for connection handling|

|Nov 18 21:43:10 certmanager|error|SSL/TLS: Failed to load ‘/etc/prosody/certs/localhost.key’: Check that the permissions allow Prosody to read this file. (for localhost)|

|Nov 18 21:43:10 localhost:tls|error|Error creating context for c2s: error loading private key (Permission denied)|

|Nov 18 21:43:10 certmanager|error|SSL/TLS: Failed to load ‘/etc/prosody/certs/localhost.key’: Previous error (see logs), or other system error. (for localhost)|

|Nov 18 21:43:10 localhost:tls|error|Error creating contexts for s2sout: error loading private key (system lib)|

|Nov 18 21:43:10 certmanager|error|SSL/TLS: Failed to load ‘/etc/prosody/certs/localhost.key’: Previous error (see logs), or other system error. (for localhost)|

|Nov 18 21:43:10 localhost:tls|error|Error creating contexts for s2sin: error loading private key (system lib)|

|Nov 18 21:43:10 portmanager|info|Activated service ‘c2s’ on :5222, [::]:5222|

|Nov 18 21:43:10 portmanager|info|Activated service ‘legacy_ssl’ on no ports|

|Nov 18 21:43:10 mod_posix|info|Prosody is about to detach from the console, disabling further console output|

|Nov 18 21:43:10 mod_posix|info|Successfully daemonized to PID 10964|

|Nov 18 21:43:10 portmanager|info|Activated service ‘s2s’ on :5269, [::]:5269|

|Nov 18 21:43:14 c2s55ab8f080200|info|Client connected|

|Nov 18 21:43:14 c2s55ab8f080200|info|Client disconnected: connection closed|

|Nov 18 21:43:20 c2s55ab8f089f90|info|Client connected|

|Nov 18 21:43:20 c2s55ab8f089f90|info|Client disconnected: connection closed|

|Nov 18 21:43:26 c2s55ab8f093240|info|Client connected|

|Nov 18 21:43:26 c2s55ab8f093240|info|Client disconnected: connection closed|

|Nov 18 21:43:32 c2s55ab8f09cda0|info|Client connected|

|Nov 18 21:43:32 c2s55ab8f09cda0|info|Client disconnected: connection closed|

|Nov 18 21:43:38 c2s55ab8f0a6a50|info|Client connected|

|Nov 18 21:43:38 c2s55ab8f0a6a50|info|Client disconnected: connection closed|

|Nov 18 21:43:44 c2s55ab8f0b0a40|info|Client connected|

|Nov 18 21:43:44 c2s55ab8f0b0a40|info|Client disconnected: connection closed|

|Nov 18 21:43:50 c2s55ab8f0ba9e0|info|Client connected|

|Nov 18 21:43:50 c2s55ab8f0ba9e0|info|Client disconnected: connection closed|

|Nov 18 21:44:26 c2s55ab8f0c74d0|info|Client connected|

|Nov 18 21:44:26 c2s55ab8f0c74d0|info|Client disconnected: connection closed|

|Nov 18 21:45:02 c2s55ab8f0d4950|info|Client connected|

|Nov 18 21:45:02 c2s55ab8f0d4950|info|Client disconnected: connection closed|

|Nov 18 21:45:38 c2s55ab8f0e2130|info|Client connected|

|Nov 18 21:45:38 c2s55ab8f0e2130|info|Client disconnected: connection closed|

|Nov 18 21:46:14 c2s55ab8f0ef680|info|Client connected|

|Nov 18 21:46:14 c2s55ab8f0ef680|info|Client disconnected: connection closed|

|Nov 18 21:46:50 c2s55ab8f0fcad0|info|Client connected|

|Nov 18 21:46:50 c2s55ab8f0fcad0|info|Client disconnected: connection closed|

|Nov 18 21:47:26 c2s55ab8f10a0c0|info|Client connected|

|Nov 18 21:47:26 c2s55ab8f10a0c0|info|Client disconnected: connection closed|

|Nov 18 21:48:22 mod_posix|warn|Received SIGTERM|

|Nov 18 21:48:22 startup|info|Shutting down: Received SIGTERM|

|Nov 18 21:48:22 general|info|Shutting down…|

|Nov 18 21:48:22 general|info|Shutdown status: Cleaning up|

|Nov 18 21:48:22 general|info|Shutdown complete|

I referenced the permissions for the certificate on a separate install and widened the permissions on this machine before restarting the Prosody service.

|Nov 18 21:48:22 startup|info|Hello and welcome to Prosody version 0.11.3|

|Nov 18 21:48:22 startup|info|Prosody is using the select backend for connection handling|

|Nov 18 21:48:22 mod_posix|info|Prosody is about to detach from the console, disabling further console output|

|Nov 18 21:48:22 mod_posix|info|Successfully daemonized to PID 11682|

|Nov 18 21:48:22 portmanager|info|Activated service ‘s2s’ on [::]:5269, :5269|

|Nov 18 21:48:22 portmanager|info|Activated service ‘c2s’ on [::]:5222, :5222|

|Nov 18 21:48:22 portmanager|info|Activated service ‘legacy_ssl’ on no ports|

Obviously it doesnt seem to be interacting at all with the jitsi-meet-prosody component.

Looking at the second option, is the external service Prosody itself? I’m a little confused on what the external service would be in this case.

Do you see an error in the client’s js console?

Here are the errors that prosody 0.11 appears to generate

XML Parsing Error: mismatched tag. Expected: .
Location: https://domain. com/http-bind?room=test
Line Number 6, Column 3: http-bind:6:3
[JitsiMeetJS.js] : UnhandledError: null Script: null Line: null Column: null StackTrace: Error: “Strophe: request id 1.1 error 502 happened”
log strophe.util.js:89
error strophe.js:2083
_onRequestStateChange strophe.js:5569
Logger.js:125:17
i Logger.js:125
getGlobalOnErrorHandler JitsiMeetJS.js:548
onerror middleware.js:100
callErrorHandler GlobalOnErrorHandler.js:61
log strophe.util.js:89
error strophe.js:2083
_onRequestStateChange strophe.js:5569
[modules/xmpp/strophe.util.js] <t.a/i.Strophe.log>: Strophe: request id 1.1 error 502 happened Logger.js:125:17
[modules/xmpp/strophe.util.js] <t.a/i.Strophe.log>: Strophe: request errored, status: 502, number of errors: 1 Logger.js:125:17
XML Parsing Error: mismatched tag. Expected: .
Location: https://domain. com/http-bind?room=test
Line Number 6, Column 3: http-bind:6:3
[JitsiMeetJS.js] : UnhandledError: null Script: null Line: null Column: null StackTrace: Error: “Strophe: request id 2.2 error 502 happened”
log strophe.util.js:89
error strophe.js:2083
_onRequestStateChange strophe.js:5569
Logger.js:125:17
i Logger.js:125
getGlobalOnErrorHandler JitsiMeetJS.js:548
onerror middleware.js:100
callErrorHandler GlobalOnErrorHandler.js:61
log strophe.util.js:89
error strophe.js:2083
_onRequestStateChange strophe.js:5569
[modules/xmpp/strophe.util.js] <t.a/i.Strophe.log>: Strophe: request id 2.2 error 502 happened Logger.js:125:17
[modules/xmpp/strophe.util.js] <t.a/i.Strophe.log>: Strophe: request errored, status: 502, number of errors: 2

Etc. etc. etc.

[modules/xmpp/strophe.util.js] <t.a/i.Strophe.log>: Strophe: request id 4.4 error 502 happened Logger.js:125:17
i Logger.js:125
log strophe.util.js:90
error strophe.js:2083
_onRequestStateChange strophe.js:5569
[modules/xmpp/strophe.util.js] <t.a/i.Strophe.log>: Strophe: request errored, status: 502, number of errors: 4 Logger.js:125:17
[modules/xmpp/xmpp.js] : (TIME) Strophe connfail[giving-up]: 37839 Logger.js:125:17
[modules/statistics/statistics.js] <b.sendAnalyticsAndLog>: {“type”:“operational”,“action”:“connection.failed”,“attributes”:{“error_type”:“connection.otherError”,“error_message”:“giving-up”}} Logger.js:125:17