prosody: add LDAP authentication via SASL mechanism
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
0db4b7dce9
commit
2e3576f6ca
@@ -1,5 +1,16 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [[ ! -f /config/saslauthd.conf ]]; then
|
||||
cp /defaults/saslauthd.conf /config/
|
||||
fi
|
||||
|
||||
if [[ ! -f /etc/saslauthd.conf ]]; then
|
||||
tpl /config/saslauthd.conf > /etc/saslauthd.conf
|
||||
mkdir -pm777 /var/run/saslauthd
|
||||
adduser prosody sasl
|
||||
echo >> /etc/ldap/ldap.conf "TLS_REQCERT allow"
|
||||
fi
|
||||
|
||||
PROSODY_CFG="/config/prosody.cfg.lua"
|
||||
|
||||
if [[ ! -d /config/data ]]; then
|
||||
|
||||
2
prosody/rootfs/etc/sasl/xmpp.conf
Normal file
2
prosody/rootfs/etc/sasl/xmpp.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
pwcheck_method: saslauthd
|
||||
mech_list: PLAIN
|
||||
2
prosody/rootfs/etc/services.d/10-saslauthd/run
Normal file
2
prosody/rootfs/etc/services.d/10-saslauthd/run
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
exec s6-setuidgid root saslauthd -a ldap -O /etc/saslauthd.conf -c -m /var/run/saslauthd -n 5 -d
|
||||
Reference in New Issue
Block a user