From 90a0e6be9fa856e54900a68f0532c60c91e62b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Tue, 18 Feb 2020 15:47:31 +0100 Subject: [PATCH] Enable LDAP on the kosmos.org vhost --- data_bags/credentials/ejabberd.json | 19 +++++++++++++------ site-cookbooks/kosmos-ejabberd/metadata.rb | 2 +- .../kosmos-ejabberd/recipes/default.rb | 4 +++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/data_bags/credentials/ejabberd.json b/data_bags/credentials/ejabberd.json index ef6155a..bda5a71 100644 --- a/data_bags/credentials/ejabberd.json +++ b/data_bags/credentials/ejabberd.json @@ -1,16 +1,23 @@ { "id": "ejabberd", "5apps_ldap_password": { - "encrypted_data": "LRafA47WMyuQe5KA4oOc6i/pTflwpG8Gq8v7cvsTr51XwJD62i9L\n", - "iv": "CSvV2mbofDQP4T42\n", - "auth_tag": "PERdYnrFKGs+HaPBD6Um+A==\n", + "encrypted_data": "mfV9TyC4OM055JnyV73mq4qY840pH1tZC9LnIaA3A80CY2kVteC4\n", + "iv": "gpEC3IK9BN9RkaYz\n", + "auth_tag": "WXYWOjUCgEw5OR5VMh+Enw==\n", + "version": 3, + "cipher": "aes-256-gcm" + }, + "kosmos_ldap_password": { + "encrypted_data": "Q9znUOIIXU+XsPWet4rDCjHsPPxlA3EfNTkEER/EdfoCajd1Txuh\n", + "iv": "7SAOAwSU8rZGopB1\n", + "auth_tag": "X8yIyw2BFbQMAVTMYLA67g==\n", "version": 3, "cipher": "aes-256-gcm" }, "admins": { - "encrypted_data": "D1fEa5S7ADU4tornw/FdcDifE6CzqM6TrLliWYxQ1AxwAuewdh0G2OfgjKOt\nvvibgIEMkr83FkX4La2wOjW8X6/DpBiyeys9RznVD4s0jmSaCG7qGHask3+R\nFLRl0gcYFCPkQopIAYihjnwvm9t1MwPXPF9c7B7rN5W2VvctQ9OEN3MgboHl\n", - "iv": "IgodYNr3muNTfkhX\n", - "auth_tag": "OJ42GSFtEp/KCxSIGhdbVg==\n", + "encrypted_data": "xKtiBOgn4ysJt4byry31cVJUHEsatWDwHEzEve/N5NxTOh1f4QBD+Q68IYzv\nV0ulBjtW91yFcQqKNx/prAVcK3khbnsEzg8uoub9o6hSMwp16LL5x/u6T6u2\n5DwWBEy08yuaujkko57ir0Yv7mfRedT1i5SaH9pgg5VLm56G/PXrlPFfjwaU\n", + "iv": "fpL3EA1VbXxxi+yq\n", + "auth_tag": "iJMJAmw5gHWLFJM5kdzR9A==\n", "version": 3, "cipher": "aes-256-gcm" } diff --git a/site-cookbooks/kosmos-ejabberd/metadata.rb b/site-cookbooks/kosmos-ejabberd/metadata.rb index 7085d35..5e56bce 100644 --- a/site-cookbooks/kosmos-ejabberd/metadata.rb +++ b/site-cookbooks/kosmos-ejabberd/metadata.rb @@ -4,7 +4,7 @@ maintainer_email 'ops@kosmos.org' license 'MIT' description 'Installs/Configures kosmos-ejabberd' long_description 'Installs/Configures kosmos-ejabberd' -version '0.1.2' +version '0.2.0' chef_version '>= 12.14' if respond_to?(:chef_version) # The `issues_url` points to the location where issues for this cookbook are diff --git a/site-cookbooks/kosmos-ejabberd/recipes/default.rb b/site-cookbooks/kosmos-ejabberd/recipes/default.rb index a120062..25e30c5 100644 --- a/site-cookbooks/kosmos-ejabberd/recipes/default.rb +++ b/site-cookbooks/kosmos-ejabberd/recipes/default.rb @@ -61,7 +61,8 @@ hosts = [ { name: "kosmos.org", sql_database: "ejabberd", - ldap_enabled: false, + ldap_enabled: true, + ldap_password: ejabberd_credentials['kosmos_ldap_password'], append_host_config: <<-EOF modules: mod_muc: @@ -134,6 +135,7 @@ hosts.each do |host| ldap_base: ldap_base, ldap_server: ldap_domain, ldap_encryption_type: ldap_encryption_type + notifies :run, "execute[ejabberdctl reload_config]", :delayed end end