diff --git a/README.auth-dovecot b/README.auth-dovecot index 392b54f..a3f23a5 100644 --- a/README.auth-dovecot +++ b/README.auth-dovecot @@ -5,3 +5,131 @@ # --- /usr/local/src/jitsi/jitsi-auth-dovecot.sh + + +# ============================================================== + + +# --- +# 1.) Download (extra) Prososy Module +# +# es braucht weitere prosody module - ich habe bei mir diese module gedownloaded +# und dann via symlink im ordner '/usr/local/lib/prosody/modules' bereitgestellt. also z.bsp.: +# --- + + +mkdir -p /usr/local/src/prosody-modules +hg clone https://hg.prosody.im/prosody-modules/ /usr/local/src/prosody-modules + +PROSODY_EXT_MOD_PATH=/usr/local/lib/prosody/modules + +mkdir -p $PROSODY_EXT_MOD_PATH +ln -s "/usr/local/src/prosody-modules" "${PROSODY_EXT_MOD_PATH}" + + +# --- +# 2. Konfiguration Prosody +# +# - registriere pfad zu den extra modulen +# +# - setze parameter 'authentication' +# - setze parameter 'dovecot_auth_host' +# - setze parameter 'dovecot_auth_port' +# - setze parameter 'auth_append_host' +# - +# --- + +# z.bsp. bei mir host: meet.oopen.de +# +# ich habe einen 'guest part, deshaalb ended meine prosody konfiguration +# mit dem abschnitt VirtualHost "guest.meet.oopen.de" +# +cat /etc/prosody/conf.avail/meet.oopen.de.cfg.lua +plugin_paths = { "/usr/share/jitsi-meet/prosody-plugins/" , "/usr/local/lib/prosody/modules"} +... +VirtualHost "meet.oopen.de" + authentication = "dovecot" + dovecot_auth_host = "a.mx.oopen.de" + dovecot_auth_port = "44444" + auth_append_host = true +... +VirtualHost "guest.meet.oopen.de" + authentication = "anonymous" + c2s_require_encryption = false + + +# --- +# 3. prosody module 'mod_auth_dovecot.lua' an +# +# ersetze +# +# return new_sasl(module.host):plain_test(username .. "@".. (service_realm or module.host), password) == "success"; +# +# durch +# +# if module.host == "meet.oopen.de" then +# return new_sasl(module.host):plain_test(username .. "@".. ("meet.oopen.de"), password) == "success"; +# else +# return new_sasl(module.host):plain_test(username .. "@".. (service_realm or module.host), password) == "success"; +# end +# +# --- + +# bei mir für host 'meet.oopen.de' +cat /usr/local/lib/prosody/modules/mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua +.. +if append_host then + function provider.test_password(username, password) + if module.host == "meet.oopen.de" then + return new_sasl(module.host):plain_test(username .. "@".. ("meet.oopen.de"), password) == "success"; + else + return new_sasl(module.host):plain_test(username .. "@".. (service_realm or module.host), password) == "success"; + end + end + + function provider.get_sasl_handler() + return util_sasl_new(module.host, { + plain_test = function(sasl, username, password, realm) + return provider.test_password(username, password), true + end; + }); + end +end +.. + + +# --- +# 4. Konfiguration Jitsi Meet +# +# Anpassen der datei /etc/jitsi/meet/${FQHN_HOSTNAME}-config.js +# +# FQHN_HOSTNAME=meet.oopen.de +# +# # vermutlich bei dir nicht nötig +# anonymousdomain: guest.meet.oopen.de +# +# # vermutlich schon auf dem korrekten wert +# authdomain: 'meet.oopen.de', +# +# # ist vermutlich ebenfalls schon auf dem richtigen wert +# requireDisplayName: true, +# +# -- + + +# --- +# 5. configure dovecot +# +# ergänze setze in Abschnitt 'service auth' +# +# service auth { +# +# # Auth Listener (XMPP - Jabber) +# inet_listener { +# address = IPv4-Adresse [IPv6-Adresse] +# port = 44444 +# } +# ... +# } +# +# ---}