NethServer Version: NethServer 7.9.2009
Module: Jitsi, Local Active Directory
VM in parallels
Self-signed certificate
LDAP ip: 192.168.10.10
Jitsi/prosody IP: 172.28.0.2
Hi all,
I installed jitsi following the procedure in the wiki. Jitsi is reachable on https://meet.nethserver.home:8443/
Now I’m trying to get authentication to work. I tried everything I could think of, but can’t get it to work. And I cannot find what’s wrong…
So I might be a bit to excessive in the information below, but the question is: How can I solve this? What else can I do to investigate this?
Thanks for your time!
René
Enable guests
I started by just making sure Jitsi works for guest. For this I made the following changes in /opt/jitsi/docker-jitsi-meet/.env
# replace meet.jitsi with local settings
:%s/meet.jitsi/nethserver.home/gc
# add port to PUBLIC_URL
# PUBLIC_URL=https://meet.nethserver.home
PUBLIC_URL=https://meet.nethserver.home:8443
# disable authentication
#ENABLE_AUTH=1
ENABLE_AUTH=0
Resulting .env file:
JICOFO_COMPONENT_SECRET=b9049e3eb1bba74f9188c99c35d51a1b
JICOFO_AUTH_PASSWORD=ad1fb3944c74ae217f20079f01ca7d03
JVB_AUTH_PASSWORD=f966be726ce89809e729b2525942505f
JIGASI_XMPP_PASSWORD=42043ee1107a0d6712fcf18778ebb41c
JIBRI_RECORDER_PASSWORD=624fc344ffbf51c38d6eb6cb663baca7
JIBRI_XMPP_PASSWORD=5022d94d6ebef29e01d48676acc8b38d
CONFIG=/opt/jitsi/.jitsi-meet-cfg
HTTP_PORT=8000
HTTPS_PORT=8443
TZ=Europe/Amsterdam
PUBLIC_URL=https://meet.nethserver.home:8443
ETHERPAD_TITLE="Video Chat"
ETHERPAD_DEFAULT_PAD_TEXT="Welcome to Web Chat!\n\n"
ETHERPAD_SKIN_NAME="colibris"
ETHERPAD_SKIN_VARIANTS="super-light-toolbar super-light-editor light-background full-width-editor"
ENABLE_AUTH=0
ENABLE_GUESTS=1
AUTH_TYPE=ldap
LDAP_URL=ldaps://172.28.0.0:636
LDAP_BASE=dc=ad,dc=nethserver,dc=home
LDAP_BINDDN=CN=binduser,OU=users,DC=AD,DC=NETHSERVER,DC=HOME
LDAP_BINDPW="bKlDbcv_ITSx2Qic"
LDAP_FILTER=(uid=%u)
LDAP_AUTH_METHOD=bind
LDAP_USE_TLS=1
XMPP_DOMAIN=nethserver.home
XMPP_SERVER=xmpp.nethserver.home
XMPP_BOSH_URL_BASE=http://xmpp.nethserver.home:5280
XMPP_AUTH_DOMAIN=auth.nethserver.home
XMPP_MUC_DOMAIN=muc.nethserver.home
XMPP_INTERNAL_MUC_DOMAIN=internal-muc.nethserver.home
XMPP_GUEST_DOMAIN=guest.nethserver.home
XMPP_MODULES=
XMPP_MUC_MODULES=
XMPP_INTERNAL_MUC_MODULES=
JVB_BREWERY_MUC=jvbbrewery
JVB_AUTH_USER=jvb
JVB_STUN_SERVERS=meet-jit-si-turnrelay.jitsi.net:443
JVB_PORT=10000
JVB_TCP_HARVESTER_DISABLED=true
JVB_TCP_PORT=4443
JVB_TCP_MAPPED_PORT=4443
JICOFO_AUTH_USER=focus
JIGASI_XMPP_USER=jigasi
JIGASI_BREWERY_MUC=jigasibrewery
JIGASI_PORT_MIN=20000
JIGASI_PORT_MAX=20050
XMPP_RECORDER_DOMAIN=recorder.nethserver.home
JIBRI_RECORDER_USER=recorder
JIBRI_RECORDING_DIR=/config/recordings
JIBRI_XMPP_USER=jibri
JIBRI_BREWERY_MUC=jibribrewery
JIBRI_PENDING_TIMEOUT=90
JIBRI_STRIP_DOMAIN_JID=muc
JIBRI_LOGS_DIR=/config/logs
RESTART_POLICY=unless-stopped
Completely rebuild and restart docker
docker-compose down && rm -rf ../.jitsi-meet-cfg/ && docker-compose up -d
Jitsi meet is now working for guests
Test LDAP connection
To make sure I can reach the AD server from the jitsi-prosody container I tested this using:
docker exec -ti docker-jitsi-meet_prosody_1 bash
apt-get update
apt-get install ldap-utils
ldapsearch -H ldaps://192.168.10.10:636 -x -D CN=ldapservice,CN=Users,DC=ad,DC=nethserver,DC=home -w bKlDbcv_ITSx2Qic -b CN=Users,DC=ad,DC=nethserver,DC=home
This works without problems.
Enable authentication in .env file
To get authentication to work I made the following changes to /opt/jitsi/docker-jitsi-meet/.env
# enable authentication
ENABLE_AUTH=1
#ENABLE_AUTH=0
# LDAP url for connection
LDAP_URL=ldaps://192.168.10.10:636
# LDAP base DN. Can be empty
LDAP_BASE=CN=Users,DC=ad,DC=nethserver,DC=home
# LDAP user DN. Do not specify this parameter for the anonymous bind
LDAP_BINDDN=CN=ldapservice,CN=Users,DC=ad,DC=nethserver,DC=home
# LDAP user password. Do not specify this parameter for the anonymous bind
LDAP_BINDPW=bKlDbcv_ITSx2Qic
# LDAP TLS using
#LDAP_USE_TLS=1
LDAP_USE_TLS=0
After rebuilding/restarting Docker a host needs to log in when starting a meeting in Jitsi. But logging in with NSuser@nethserver.home and password does not work.
Firefox logging
Firefox console gives a strange error:
021-03-22T11:59:04.358Z [modules/UI/authentication/AuthHandler.js] <b/</n</<>: authenticateAndUpgradeRole failed
{…}
connectionError: "connection.passwordRequired"
credentials: Object { jid: "NSuser@nethserver.home", password: "PassWord" }
message: null
logging in prosody.log
The logging in the prosody.log is not really descriptive either
saslauthd[275] :released accept lock
saslauthd[276] :acquired accept lock
saslauthd[275] :attempting a read lock on slot: 692
saslauthd[275] :[login=NSuser] [service=xmpp] [realm=nethserver.home]: not found, update pending
saslauthd[275] :attempting to release lock on slot: 692
saslauthd[275] :auth failure: [user=NSuser] [service=xmpp] [realm=nethserver.home] [mech=ldap] [reason=Unknown]
saslauthd[275] :response: NO
Testing with testsaslauthd
Testing with testsaslauthd doesn’t give a lot of information. Logging in prosody is the same as above.
docker exec -ti docker-jitsi-meet_prosody_1 bash
testsaslauthd -u NSuser -p PassWord -r nethserver.home -s xmpp
0: NO "authentication failed"
Samba logging
Man, it was hard to find this…
I finally found out that I needed to change /var/lib/machines/nsdc/etc/samba/smb.conf And I added the following:
log level = 1 auth_audit:10 auth_json_audit:10
log file = /var/log/samba.log.%m
max log size = 50
debug timestamp = yes
After restarting samba (via nsdc)
systemctl stop nsdc
systemctl start nsdc
I could find the following in the log which correlates to issuing the testsaslauthd command (using: journalctl -M nsdc -f
)
Mar 19 16:45:01 nsdc-myhost.ad.nethserver.home samba[25]: Auth: [LDAP,simple bind] user [(null)]\[ldapservice@AD.NETHSERVER.HOME] at [Fri, 19 Mar 2021 16:45:01.750952 CET] with [Plaintext] status [NT_STATUS_OK] workstation [(null)] remote host [ipv4:192.168.10.2:50188] became [NETHSERVER]\[ldapservice] [S-1-5-21-2079265069-3524957898-2694064665-1103]. local host [ipv4:192.168.10.10:636]
Mar 19 16:45:01 nsdc-myhost.ad.nethserver.home samba[25]: {"timestamp": "2021-03-19T16:45:01.751064+0100", "type": "Authentication", "Authentication": {"version": {"major": 1, "minor": 0}, "status": "NT_STATUS_OK", "localAddress": "ipv4:192.168.10.10:636", "remoteAddress": "ipv4:192.168.10.2:50188", "serviceDescription": "LDAP", "authDescription": "simple bind", "clientDomain": null, "clientAccount": "ldapservice@AD.NETHSERVER.HOME", "workstation": null, "becameAccount": "ldapservice", "becameDomain": "NETHSERVER", "becameSid": "S-1-5-21-2079265069-3524957898-2694064665-1103", "mappedAccount": "ldapservice", "mappedDomain": "NETHSERVER", "netlogonComputer": null, "netlogonTrustAccount": null, "netlogonNegotiateFlags": "0x00000000", "netlogonSecureChannelType": 0, "netlogonTrustAccountSid": null, "passwordType": "Plaintext", "duration": 4186}}
Mar 19 16:45:01 nsdc-myhost.ad.nethserver.home samba[25]: Successful AuthZ: [LDAP,simple bind] user [NETHSERVER]\[ldapservice] [S-1-5-21-2079265069-3524957898-2694064665-1103] at [Fri, 19 Mar 2021 16:45:01.753384 CET] Remote host [ipv4:192.168.10.2:50188] local host [ipv4:192.168.10.10:636]
Mar 19 16:45:01 nsdc-myhost.ad.nethserver.home samba[25]: {"timestamp": "2021-03-19T16:45:01.753482+0100", "type": "Authorization", "Authorization": {"version": {"major": 1, "minor": 1}, "localAddress": "ipv4:192.168.10.10:636", "remoteAddress": "ipv4:192.168.10.2:50188", "serviceDescription": "LDAP", "authType": "simple bind", "domain": "NETHSERVER", "account": "ldapservice", "sid": "S-1-5-21-2079265069-3524957898-2694064665-1103", "sessionId": "7d875063-b6c5-4536-83a5-7c5b348facb9", "logonServer": "NSDC-MYHOST", "transportProtection": "TLS", "accountFlags": "0x00000210"}}
Mar 19 16:47:22 nsdc-myhost.ad.nethserver.home samba[25]: Auth: [Kerberos KDC,ENC-TS Pre-authentication] user [(null)]\[MYHOST$@AD.NETHSERVER.HOME] at [Fri, 19 Mar 2021 16:47:22.021236 CET] with [aes256-cts-hmac-sha1-96] status [NT_STATUS_OK] workstation [(null)] remote host [ipv4:192.168.10.2:42913] became [NETHSERVER]\[MYHOST$] [S-1-5-21-2079265069-3524957898-2694064665-1104]. local host [NULL]
Mar 19 16:47:22 nsdc-myhost.ad.nethserver.home samba[25]: {"timestamp": "2021-03-19T16:47:22.021284+0100", "type": "Authentication", "Authentication": {"version": {"major": 1, "minor": 0}, "status": "NT_STATUS_OK", "localAddress": null, "remoteAddress": "ipv4:192.168.10.2:42913", "serviceDescription": "Kerberos KDC", "authDescription": "ENC-TS Pre-authentication", "clientDomain": null, "clientAccount": "MYHOST$@AD.NETHSERVER.HOME", "workstation": null, "becameAccount": "MYHOST$", "becameDomain": "NETHSERVER", "becameSid": "S-1-5-21-2079265069-3524957898-2694064665-1104", "mappedAccount": "MYHOST$", "mappedDomain": "NETHSERVER", "netlogonComputer": null, "netlogonTrustAccount": null, "netlogonNegotiateFlags": "0x00000000", "netlogonSecureChannelType": 0, "netlogonTrustAccountSid": null, "passwordType": "aes256-cts-hmac-sha1-96", "duration": 2587}}
Mar 19 16:47:22 nsdc-myhost.ad.nethserver.home samba[25]: Auth: [Kerberos KDC,ENC-TS Pre-authentication] user [(null)]\[MYHOST$@AD.NETHSERVER.HOME] at [Fri, 19 Mar 2021 16:47:22.027792 CET] with [aes256-cts-hmac-sha1-96] status [NT_STATUS_OK] workstation [(null)] remote host [ipv4:192.168.10.2:53986] became [NETHSERVER]\[MYHOST$] [S-1-5-21-2079265069-3524957898-2694064665-1104]. local host [NULL]
Mar 19 16:47:22 nsdc-myhost.ad.nethserver.home samba[25]: {"timestamp": "2021-03-19T16:47:22.027831+0100", "type": "Authentication", "Authentication": {"version": {"major": 1, "minor": 0}, "status": "NT_STATUS_OK", "localAddress": null, "remoteAddress": "ipv4:192.168.10.2:53986", "serviceDescription": "Kerberos KDC", "authDescription": "ENC-TS Pre-authentication", "clientDomain": null, "clientAccount": "MYHOST$@AD.NETHSERVER.HOME", "workstation": null, "becameAccount": "MYHOST$", "becameDomain": "NETHSERVER", "becameSid": "S-1-5-21-2079265069-3524957898-2694064665-1104", "mappedAccount": "MYHOST$", "mappedDomain": "NETHSERVER", "netlogonComputer": null, "netlogonTrustAccount": null, "netlogonNegotiateFlags": "0x00000000", "netlogonSecureChannelType": 0, "netlogonTrustAccountSid": null, "passwordType": "aes256-cts-hmac-sha1-96", "duration": 2554}}
Mar 19 16:47:22 nsdc-myhost.ad.nethserver.home samba[25]: Successful AuthZ: [LDAP,krb5] user [NETHSERVER]\[MYHOST$] [S-1-5-21-2079265069-3524957898-2694064665-1104] at [Fri, 19 Mar 2021 16:47:22.044082 CET] Remote host [ipv4:192.168.10.2:48232] local host [ipv4:192.168.10.10:389]
Mar 19 16:47:22 nsdc-myhost.ad.nethserver.home samba[25]: {"timestamp": "2021-03-19T16:47:22.044201+0100", "type": "Authorization", "Authorization": {"version": {"major": 1, "minor": 1}, "localAddress": "ipv4:192.168.10.10:389", "remoteAddress": "ipv4:192.168.10.2:48232", "serviceDescription": "LDAP", "authType": "krb5", "domain": "NETHSERVER", "account": "MYHOST$", "sid": "S-1-5-21-2079265069-3524957898-2694064665-1104", "sessionId": "01ed47a4-77c0-4f49-a8b6-3c5ffab60f17", "logonServer": "NSDC-MYHOST", "transportProtection": "SEAL", "accountFlags": "0x00000080"}}
As far as I can tell, this confirms the ‘ldapservice’ user is authenticated. But I cannot tell what query is run against the ldap server.
Wireshark
I even installed wireshark to make sure there is traffic between the prosody container and the ldap server:
21 11.700735869 192.168.10.2 -> 192.168.10.10 TLSv1.2 176 Application Data
22 11.700757082 192.168.10.10 -> 172.28.0.2 TCP 54 ldaps > 34116 [RST] Seq=1 Win=0 Len=0
23 11.700905168 192.168.10.2 -> 192.168.10.10 TCP 74 34246 > ldaps [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=7195153 TSecr=0 WS=128
24 11.700915629 192.168.10.10 -> 172.28.0.2 TCP 74 ldaps > 34246 [SYN, ACK] Seq=0 Ack=1 Win=28960 Len=0 MSS=1460 SACK_PERM=1 TSval=7195153 TSecr=7195153 WS=128
25 11.700933182 192.168.10.2 -> 192.168.10.10 TCP 66 34246 > ldaps [ACK] Seq=1 Ack=1 Win=29312 Len=0 TSval=7195153 TSecr=7195153
26 11.701126657 192.168.10.2 -> 192.168.10.10 SSL 403 Client Hello
27 11.701132658 192.168.10.10 -> 172.28.0.2 TCP 66 ldaps > 34246 [ACK] Seq=1 Ack=338 Win=30080 Len=0 TSval=7195153 TSecr=7195153
28 11.718625324 192.168.10.10 -> 172.28.0.2 TLSv1.2 2437 Server Hello, Certificate, Server Key Exchange, Certificate Request, Server Hello Done
29 11.718721269 192.168.10.2 -> 192.168.10.10 TCP 66 34246 > ldaps [ACK] Seq=338 Ack=2372 Win=34048 Len=0 TSval=7195171 TSecr=7195171
30 11.719317974 192.168.10.2 -> 192.168.10.10 TLSv1.2 78 Certificate
31 11.719346052 192.168.10.2 -> 192.168.10.10 TLSv1.2 141 Client Key Exchange
32 11.719373913 192.168.10.2 -> 192.168.10.10 TLSv1.2 72 Change Cipher Spec
33 11.719384729 192.168.10.2 -> 192.168.10.10 TLSv1.2 111 Hello Request, Hello Request
34 11.719708012 192.168.10.10 -> 172.28.0.2 TCP 66 ldaps > 34246 [ACK] Seq=2372 Ack=476 Win=30080 Len=0 TSval=7195172 TSecr=7195171
35 11.719808893 192.168.10.10 -> 172.28.0.2 TLSv1.2 117 Change Cipher Spec, Hello Request, Hello Request
36 11.720065803 192.168.10.2 -> 192.168.10.10 TLSv1.2 176 Application Data
37 11.727595457 192.168.10.10 -> 172.28.0.2 TLSv1.2 109 Application Data
38 11.727684515 192.168.10.2 -> 192.168.10.10 TLSv1.2 176 Application Data
39 11.730318469 192.168.10.10 -> 172.28.0.2 TLSv1.2 109 Application Data
40 11.770065539 192.168.10.2 -> 192.168.10.10 TCP 66 34246 > ldaps [ACK] Seq=696 Ack=2509 Win=34048 Len=0 TSval=7195222 TSecr=7195182