This was last covered several years ago in Jitsi-meet: how to enable authentication?, however the solution there is incomplete and no longer seems to work.
Can anyone help me figure out how to set up authentication on a jitsi server with Nixpkgs 21.11? I want to require authenticated users to create a channel, but anonymous users are allowed to join it.
I’ve gotten to a state where I can get my jitsi server to prompt me for a password, but it never recognizes my as a host. Further, I can find no errors in the prosody, videobridge, or jicofo log files. My configuration currently looks like this (jitsi_fqdn = jitsi.luminescent-dreams.com
)
services.jitsi-meet = {
enable = true;
hostName = jitsi_fqdn;
config = {
authdomain = jitsi_fqdn;
enableInsecureRoomNameWarning = true;
fileRecordingsEnabled = false;
liveStreamingEnabled = false;
prejoinPageEnabled = true;
hosts = {
domain = jitsi_fqdn;
anonymousDomain = "guests.${jitsi_fqdn}";
};
};
};
services.jitsi-videobridge = {
enable = true;
openFirewall = true;
};
services.coturn = {
enable = true;
...
};
services.prosody = {
allowRegistration = true;
virtualHosts = {
"${jitsi_fqdn}" = {
enabled = true;
domain = "${jitsi_fqdn}";
extraConfig = ''
authentication = "internal_hashed"
'';
};
"guests.${jitsi_fqdn}" = {
domain = "guests.${jitsi_fqdn}";
enabled = true;
extraConfig = ''
authentication = "anonymous"
c2s_require_encryption = false
'';
};
};
};
services.jicofo = {
enable = true;
config = {
"org.jitsi.jicofo.auth.URL" = "XMPP:${jitsi_fqdn}";
};
};
This is the closest I’m getting to an error message at this point:
107881 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: Handling new request table: 0x2aed970: <body rid="1767851451" sid="0d7e27ad-9be8-4e34-8762-75badfe9ca86" xmlns="http://jabber.org/protocol/httpbind"><i
│ q id="f848a3e4-2efa-42a4-8d25-c9370ec2fc8b:sendIQ" to="focus.jitsi.luminescent-dreams.com" type="set" xmlns="jabber:client"><conference machine-uid="dd94d2ad2b2bfc14c63ebee2a635762b" room="the-forgotte
│ n-city@conference.jitsi.luminescent-dreams.com" xmlns="http://jitsi.org/protocol/focus"><property name="disableRtx" value="false"/></conference></iq></body>
107882 │ ----------
107883 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: BOSH body open (sid: 0d7e27ad-9be8-4e34-8762-75badfe9ca86)
107884 │ Feb 07 06:29:47 matrix prosody[477020]: bosh0d7e27ad-9be8-4e34-8762-75badfe9ca86: rid: 1767851451, sess: 1767851450, diff: 1
107885 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: BOSH stanza received: <iq id='f848a3e4-2efa-42a4-8d25-c9370ec2fc8b:sendIQ' to='focus.jitsi.luminescent-dreams.com' type='set'>
107886 │ Feb 07 06:29:47 matrix prosody[477020]: bosh0d7e27ad-9be8-4e34-8762-75badfe9ca86: Received[c2s]: <iq id='f848a3e4-2efa-42a4-8d25-c9370ec2fc8b:sendIQ' to='focus.jitsi.luminescent-dreams.com' type='set'>
107887 │ Feb 07 06:29:47 matrix prosody[477020]: focus.jitsi.luminescent-dreams.com:client_proxy: received stanza from c2s session
107888 │ Feb 07 06:29:47 matrix prosody[477020]: focus.jitsi.luminescent-dreams.com:client_proxy: stanza to target: name = iq, type = set
107889 │ Feb 07 06:29:47 matrix prosody[477020]: focus.jitsi.luminescent-dreams.com:client_proxy: NAT-ed stanza: from: savanni@jitsi.luminescent-dreams.com/RvPQmZVk -> focus.jitsi.luminescent-dreams.com/savanni
│ @jitsi.luminescent-dreams.com/RvPQmZVk, to: focus.jitsi.luminescent-dreams.com -> focus@auth.jitsi.luminescent-dreams.com/focus
107890 │ Feb 07 06:29:47 matrix prosody[477020]: c2s28f4e00: Sending[c2s]: <iq id='f848a3e4-2efa-42a4-8d25-c9370ec2fc8b:sendIQ' to='focus@auth.jitsi.luminescent-dreams.com/focus' type='set' from='focus.jitsi.lu
│ minescent-dreams.com/savanni@jitsi.luminescent-dreams.com/RvPQmZVk'>
107891 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: Session 0d7e27ad-9be8-4e34-8762-75badfe9ca86 has 2 out of 1 requests open
107892 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: and there are 0 things in the send_buffer:
107893 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: We are holding too many requests, so...
107894 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: ...sending an empty response
107895 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: We have an open request, so sending on that
107896 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: Request destroyed: table: 0x235da10
107897 │ Feb 07 06:29:47 matrix prosody[477020]: socket: try to close client connection with id: 2a5dc80
107898 │ Feb 07 06:29:47 matrix prosody[477020]: socket: closing delayed until writebuffer is empty
107899 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: Have nothing to say, so leaving request unanswered for now
107900 │ Feb 07 06:29:47 matrix prosody[477020]: socket: closing client after writing
107901 │ Feb 07 06:29:47 matrix prosody[477020]: socket: closing client with id: 2a5dc80 client to close
107902 │ Feb 07 06:29:47 matrix prosody[477020]: c2s28f4e00: Received[c2s]: <iq id='f848a3e4-2efa-42a4-8d25-c9370ec2fc8b:sendIQ' to='focus.jitsi.luminescent-dreams.com/savanni@jitsi.luminescent-dreams.com/RvPQm
│ ZVk' type='error'>
107903 │ Feb 07 06:29:47 matrix prosody[477020]: focus.jitsi.luminescent-dreams.com:client_proxy: received stanza from c2s session
107904 │ Feb 07 06:29:47 matrix prosody[477020]: focus.jitsi.luminescent-dreams.com:client_proxy: non-presence stanza from target: name = iq, type = error
107905 │ Feb 07 06:29:47 matrix prosody[477020]: focus.jitsi.luminescent-dreams.com:client_proxy: de-NAT-ed stanza: from: focus@auth.jitsi.luminescent-dreams.com/focus -> focus.jitsi.luminescent-dreams.com, to:
│ focus.jitsi.luminescent-dreams.com/savanni@jitsi.luminescent-dreams.com/RvPQmZVk -> savanni@jitsi.luminescent-dreams.com/RvPQmZVk
107906 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: We have an open request, so sending on that
107907 │ Feb 07 06:29:47 matrix prosody[477020]: mod_bosh: Request destroyed: table: 0x2aedc50
107908 │ Feb 07 06:29:47 matrix prosody[477020]: bosh0d7e27ad-9be8-4e34-8762-75badfe9ca86: BOSH session marked as inactive (for 60s)
107909 │ Feb 07 06:29:47 matrix prosody[477020]: socket: try to close client connection with id: 298da50
107910 │ Feb 07 06:29:47 matrix prosody[477020]: socket: closing delayed until writebuffer is empty
107911 │ Feb 07 06:29:47 matrix prosody[477020]: socket: closing client after writing
107912 │ Feb 07 06:29:47 matrix prosody[477020]: socket: closing client with id: 298da50 client to close
107913 │ Feb 07 06:29:48 matrix prosody[477020]: socket: accepted incoming client connection from: 127.0.0.1 40764 to 5280
107914 │ Feb 07 06:29:48 matrix prosody[477020]: http.server: Firing event: POST /http-bind
107915 │ Feb 07 06:29:48 matrix prosody[477020]: mod_bosh: Handling new request table: 0x2aaddb0: <body rid="1767851452" sid="0d7e27ad-9be8-4e34-8762-75badfe9ca86" xmlns="http://jabber.org/protocol/httpbind"/>
107916 │ ----------
107917 │ Feb 07 06:29:48 matrix prosody[477020]: mod_bosh: BOSH body open (sid: 0d7e27ad-9be8-4e34-8762-75badfe9ca86)
107918 │ Feb 07 06:29:48 matrix prosody[477020]: bosh0d7e27ad-9be8-4e34-8762-75badfe9ca86: rid: 1767851452, sess: 1767851451, diff: 1
107919 │ Feb 07 06:29:48 matrix prosody[477020]: mod_bosh: Session 0d7e27ad-9be8-4e34-8762-75badfe9ca86 has 1 out of 1 requests open
107920 │ Feb 07 06:29:48 matrix prosody[477020]: mod_bosh: and there are 0 things in the send_buffer:
107921 │ Feb 07 06:29:48 matrix prosody[477020]: mod_bosh: Have nothing to say, so leaving request unanswered for now
But this is only a fragment of the printouts that appear to occur on every auth attempt. I see at least a hundred such lines, again with no obvious error.