|
| 1 | +# |
| 2 | +# vim: syntax=ruby:expandtab:shiftwidth=2:softtabstop=2:tabstop=2 |
| 3 | +# |
| 4 | +# Copyright (c) 2025-present, Meta Platforms, Inc. |
| 5 | +# Copyright (c) 2025-present, Phil Dibowitz |
| 6 | +# All rights reserved. |
| 7 | +# |
| 8 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | +# you may not use this file except in compliance with the License. |
| 10 | +# You may obtain a copy of the License at |
| 11 | +# |
| 12 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | +# |
| 14 | +# Unless required by applicable law or agreed to in writing, software |
| 15 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | +# See the License for the specific language governing permissions and |
| 18 | +# limitations under the License. |
| 19 | +# |
| 20 | + |
| 21 | +default['fb_ejabberd'] = { |
| 22 | + 'manage_packages' => true, |
| 23 | + 'extra_packages' => [], |
| 24 | + 'sysconfig' => { |
| 25 | + 'erl_options' => '-env ERL_CRASH_DUMP_BYTES 0', |
| 26 | + 'erlang_node' => "ejabberd@#{node['hostname']}", |
| 27 | + 'ejabberd_pid_path' => '/run/ejabberd/ejabberd.pid', |
| 28 | + }, |
| 29 | + 'config' => { |
| 30 | + 'loglevel' => 5, |
| 31 | + 'log_rotate_size' => 'infinity', |
| 32 | + 'hosts' => [], |
| 33 | + 'certfiles' => [], |
| 34 | + 'acme' => { |
| 35 | + 'auto' => false, |
| 36 | + }, |
| 37 | + 'define_macro' => { |
| 38 | + 'TLS_CIPHERS' => 'HIGH:!aNULL:!eNULL:!3DES:@STRENGTH', |
| 39 | + 'TLS_OPTIONS' => [ |
| 40 | + 'no_sslv3', |
| 41 | + 'no_tlsv1', |
| 42 | + 'no_tlsv1_1', |
| 43 | + 'cipher_server_preference', |
| 44 | + 'no_compression', |
| 45 | + ], |
| 46 | + }, |
| 47 | + 'c2s_ciphers' => 'TLS_CIPHERS', |
| 48 | + 's2s_ciphers' => 'TLS_CIPHERS', |
| 49 | + 'c2s_protocol_options' => 'TLS_OPTIONS', |
| 50 | + 's2s_protocol_options' => 'TLS_OPTIONS', |
| 51 | + 'listen' => [ |
| 52 | + { |
| 53 | + 'port' => 5222, |
| 54 | + 'ip' => '::', |
| 55 | + 'module' => 'ejabberd_c2s', |
| 56 | + 'max_stanza_size' => 262144, |
| 57 | + 'shaper' => 'c2s_shaper', |
| 58 | + 'access' => 'c2s', |
| 59 | + 'starttls' => true, |
| 60 | + 'starttls_required' => true, |
| 61 | + 'protocol_options' => 'TLS_OPTIONS', |
| 62 | + }, |
| 63 | + { |
| 64 | + 'port' => 5269, |
| 65 | + 'ip' => '::', |
| 66 | + 'module' => 'ejabberd_s2s_in', |
| 67 | + }, |
| 68 | + ], |
| 69 | + 'disable_sasl_mechanisms' => [ |
| 70 | + 'digest-md5', |
| 71 | + 'X-OAUTH2', |
| 72 | + ], |
| 73 | + 's2s_use_starttls' => 'required', |
| 74 | + 'auth_method' => 'internal', |
| 75 | + 'resource_conflict' => 'closeold', |
| 76 | + 'auth_password_format' => 'scram', |
| 77 | + 'shaper' => { |
| 78 | + 'normal' => { |
| 79 | + 'rate' => 3000, |
| 80 | + 'burst_size' => 20000, |
| 81 | + }, |
| 82 | + 'fast' => 200000, |
| 83 | + }, |
| 84 | + 'shaper_rules' => { |
| 85 | + 'max_user_sessions' => 10, |
| 86 | + 'max_user_offline_messages' => { |
| 87 | + 5000 => 'admin', |
| 88 | + 100 => 'all', |
| 89 | + }, |
| 90 | + 'c2s_shaper' => { |
| 91 | + 'none' => 'admin', |
| 92 | + 'normal' => 'all', |
| 93 | + }, |
| 94 | + 's2s_shaper' => 'fast', |
| 95 | + }, |
| 96 | + 'max_fsm_queue' => 1000, |
| 97 | + 'acl' => { |
| 98 | + 'local' => { |
| 99 | + 'user_regexp' => '', |
| 100 | + }, |
| 101 | + 'loopback' => { |
| 102 | + 'ip' => [ |
| 103 | + '127.0.0.0/8', |
| 104 | + ], |
| 105 | + }, |
| 106 | + }, |
| 107 | + 'access_rules' => { |
| 108 | + 'local' => { |
| 109 | + 'allow' => 'local', |
| 110 | + }, |
| 111 | + 'c2s' => { |
| 112 | + 'deny' => 'blocked', |
| 113 | + 'allow' => 'all', |
| 114 | + }, |
| 115 | + 'announce' => { |
| 116 | + 'allow' => 'admin', |
| 117 | + }, |
| 118 | + 'configure' => { |
| 119 | + 'allow' => 'admin', |
| 120 | + }, |
| 121 | + 'muc_create' => { |
| 122 | + 'allow' => 'local', |
| 123 | + }, |
| 124 | + 'pubsub_createnode' => { |
| 125 | + 'allow' => 'local', |
| 126 | + }, |
| 127 | + 'trusted_network' => { |
| 128 | + 'allow' => 'loopback', |
| 129 | + }, |
| 130 | + }, |
| 131 | + 'api_permissions' => { |
| 132 | + 'console commands' => { |
| 133 | + 'from' => [ |
| 134 | + 'ejabberd_ctl', |
| 135 | + ], |
| 136 | + 'who' => 'all', |
| 137 | + 'what' => '*', |
| 138 | + }, |
| 139 | + 'admin access' => { |
| 140 | + 'who' => { |
| 141 | + 'access' => { |
| 142 | + 'allow' => [ |
| 143 | + { 'acl' => 'loopback' }, |
| 144 | + { 'acl' => 'admin' }, |
| 145 | + ], |
| 146 | + }, |
| 147 | + 'oauth' => { |
| 148 | + 'scope' => 'ejabberd:admin', |
| 149 | + 'access' => { |
| 150 | + 'allow' => [ |
| 151 | + { 'acl' => 'loopback' }, |
| 152 | + { 'acl' => 'admin' }, |
| 153 | + ], |
| 154 | + }, |
| 155 | + }, |
| 156 | + }, |
| 157 | + 'what' => [ |
| 158 | + '*', |
| 159 | + '!stop', |
| 160 | + '!start', |
| 161 | + ], |
| 162 | + }, |
| 163 | + 'public commands' => { |
| 164 | + 'who' => { |
| 165 | + 'ip' => '127.0.0.1/8', |
| 166 | + }, |
| 167 | + 'what' => [ |
| 168 | + 'status', |
| 169 | + 'connected_users_number', |
| 170 | + ], |
| 171 | + }, |
| 172 | + }, |
| 173 | + 'language' => 'en', |
| 174 | + 'modules' => { |
| 175 | + 'mod_adhoc' => {}, |
| 176 | + 'mod_admin_extra' => {}, |
| 177 | + 'mod_announce' => { |
| 178 | + 'access' => 'announce', |
| 179 | + }, |
| 180 | + 'mod_blocking' => {}, |
| 181 | + 'mod_bosh' => {}, |
| 182 | + 'mod_caps' => {}, |
| 183 | + 'mod_carboncopy' => {}, |
| 184 | + 'mod_configure' => {}, |
| 185 | + 'mod_disco' => {}, |
| 186 | + 'mod_fail2ban' => {}, |
| 187 | + 'mod_http_api' => {}, |
| 188 | + 'mod_last' => {}, |
| 189 | + 'mod_mqtt' => {}, |
| 190 | + 'mod_muc' => { |
| 191 | + 'access' => [ |
| 192 | + 'allow', |
| 193 | + ], |
| 194 | + 'access_admin' => [ |
| 195 | + { |
| 196 | + 'allow' => 'admin', |
| 197 | + }, |
| 198 | + ], |
| 199 | + 'access_create' => 'muc_create', |
| 200 | + 'access_persistent' => 'muc_create', |
| 201 | + 'access_mam' => [ |
| 202 | + 'allow', |
| 203 | + ], |
| 204 | + 'default_room_options' => { |
| 205 | + 'mam' => true, |
| 206 | + }, |
| 207 | + }, |
| 208 | + 'mod_muc_admin' => {}, |
| 209 | + 'mod_offline' => { |
| 210 | + 'access_max_user_messages' => 'max_user_offline_messages', |
| 211 | + }, |
| 212 | + 'mod_ping' => {}, |
| 213 | + 'mod_privacy' => {}, |
| 214 | + 'mod_private' => {}, |
| 215 | + 'mod_pubsub' => { |
| 216 | + 'access_createnode' => 'pubsub_createnode', |
| 217 | + 'ignore_pep_from_offline' => true, |
| 218 | + 'last_item_cache' => false, |
| 219 | + 'plugins' => [ |
| 220 | + 'flat', |
| 221 | + 'pep', |
| 222 | + ], |
| 223 | + 'force_node_config' => { |
| 224 | + 'eu.siacs.conversations.axolotl.*' => { |
| 225 | + 'access_model' => 'open', |
| 226 | + }, |
| 227 | + 'storage:bookmarks:' => { |
| 228 | + 'access_model' => 'whitelist', |
| 229 | + }, |
| 230 | + }, |
| 231 | + }, |
| 232 | + 'mod_push' => {}, |
| 233 | + 'mod_push_keepalive' => {}, |
| 234 | + 'mod_register' => { |
| 235 | + 'welcome_message' => { |
| 236 | + 'subject' => 'Welcome!', |
| 237 | + 'body' => "Hi.\nWelcome to this XMPP server.\n", |
| 238 | + }, |
| 239 | + 'ip_access' => 'trusted_network', |
| 240 | + 'access' => 'register', |
| 241 | + }, |
| 242 | + 'mod_roster' => { |
| 243 | + 'versioning' => true, |
| 244 | + }, |
| 245 | + 'mod_s2s_dialback' => {}, |
| 246 | + 'mod_shared_roster' => {}, |
| 247 | + 'mod_sic' => {}, |
| 248 | + 'mod_stream_mgmt' => { |
| 249 | + 'resend_on_timeout' => 'if_offline', |
| 250 | + }, |
| 251 | + 'mod_stun_disco' => {}, |
| 252 | + 'mod_stats' => {}, |
| 253 | + 'mod_time' => {}, |
| 254 | + 'mod_vcard' => { |
| 255 | + 'search' => false, |
| 256 | + }, |
| 257 | + 'mod_vcard_xupdate' => {}, |
| 258 | + 'mod_version' => {}, |
| 259 | + }, |
| 260 | + }, |
| 261 | +} |
0 commit comments