Add LDAP support to ejabberd
Users in the cn=greg,ou=users,dc=kosmos,dc=org group and the xmpp attribute set to enabled will be able to log in using their userPassword
This commit is contained in:
@@ -79,11 +79,21 @@ execute "create db schema ejabberd_5apps" do
|
||||
action :nothing
|
||||
end
|
||||
|
||||
ldap_credentials = data_bag_item("credentials", "389")
|
||||
ldap_server = node["kosmos-dirsrv"]["nginx"]["domain"]
|
||||
ldap_encryption_type = node.chef_environment == "development" ? "none" : "tls"
|
||||
ldap_base = "ou=users,dc=kosmos,dc=org"
|
||||
|
||||
template "/opt/ejabberd/conf/ejabberd.yml" do
|
||||
source "ejabberd.yml.erb"
|
||||
mode 0640
|
||||
sensitive true
|
||||
variables pgsql_password: postgresql_data_bag_item['ejabberd_user_password']
|
||||
variables pgsql_password: postgresql_data_bag_item['ejabberd_user_password'],
|
||||
ldap_server: ldap_server,
|
||||
ldap_username: ldap_credentials[:username],
|
||||
ldap_password: ldap_credentials[:password],
|
||||
ldap_base: ldap_base,
|
||||
ldap_encryption_type: ldap_encryption_type
|
||||
notifies :run, "execute[ejabberdctl reload_config]", :delayed
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user