Skip to content

Commit

Permalink
Add new settings for SOGo 5.10
Browse files Browse the repository at this point in the history
The latest version introduced a bunch of new settings.  Allow to tune
them.

Release notes:
https://www.sogo.nu/news/2024/sogo-v5100-released.html
  • Loading branch information
smortex committed May 6, 2024
1 parent 3396f1b commit 75585fb
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 0 deletions.
63 changes: 63 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,18 @@ The following parameters are available in the `sogo` class:
* [`password_recovery_domains`](#-sogo--password_recovery_domains)
* [`jwt_secret`](#-sogo--jwt_secret)
* [`create_identities_disabled`](#-sogo--create_identities_disabled)
* [`url_encryption_enabled`](#-sogo--url_encryption_enabled)
* [`url_encryption_passphrase`](#-sogo--url_encryption_passphrase)
* [`global_address_book_first_entries`](#-sogo--global_address_book_first_entries)
* [`global_address_book_first_entries_count`](#-sogo--global_address_book_first_entries_count)
* [`secret_type`](#-sogo--secret_type)
* [`secret_value`](#-sogo--secret_value)
* [`email_alarms_folder_url`](#-sogo--email_alarms_folder_url)
* [`disable_organizer_event_check`](#-sogo--disable_organizer_event_check)
* [`store_url`](#-sogo--store_url)
* [`acl_url`](#-sogo--acl_url)
* [`cache_folder_url`](#-sogo--cache_folder_url)
* [`admin_url`](#-sogo--admin_url)
* [`ldap_contact_info_attribute`](#-sogo--ldap_contact_info_attribute)
* [`ldap_query_limit`](#-sogo--ldap_query_limit)
* [`ldap_query_timeout`](#-sogo--ldap_query_timeout)
Expand Down Expand Up @@ -760,6 +767,54 @@ Data type: `Optional[Boolean]`



Default value: `undef`

##### <a name="-sogo--url_encryption_enabled"></a>`url_encryption_enabled`

Data type: `Optional[Boolean]`



Default value: `undef`

##### <a name="-sogo--url_encryption_passphrase"></a>`url_encryption_passphrase`

Data type: `Optional[Sensitive[String[1]]]`



Default value: `undef`

##### <a name="-sogo--global_address_book_first_entries"></a>`global_address_book_first_entries`

Data type: `Optional[Boolean]`



Default value: `undef`

##### <a name="-sogo--global_address_book_first_entries_count"></a>`global_address_book_first_entries_count`

Data type: `Optional[Integer[0]]`



Default value: `undef`

##### <a name="-sogo--secret_type"></a>`secret_type`

Data type: `Optional[Enum['plain', 'env', 'none']]`



Default value: `undef`

##### <a name="-sogo--secret_value"></a>`secret_value`

Data type: `Optional[Variant[String[1], Sensitive[String[1]]]]`



Default value: `undef`

##### <a name="-sogo--email_alarms_folder_url"></a>`email_alarms_folder_url`
Expand Down Expand Up @@ -800,6 +855,14 @@ Data type: `Optional[String[1]]`



Default value: `undef`

##### <a name="-sogo--admin_url"></a>`admin_url`

Data type: `Optional[String[1]]`



Default value: `undef`

##### <a name="-sogo--ldap_contact_info_attribute"></a>`ldap_contact_info_attribute`
Expand Down
9 changes: 9 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@
# D
Optional[Boolean] $create_identities_disabled = undef,

# S
Optional[Boolean] $url_encryption_enabled = undef,
Optional[Sensitive[String[1]]] $url_encryption_passphrase = undef,
Optional[Boolean] $global_address_book_first_entries = undef,
Optional[Integer[0]] $global_address_book_first_entries_count = undef,
Optional[Enum['plain', 'env', 'none']] $secret_type = undef,
Optional[Variant[String[1], Sensitive[String[1]]]] $secret_value = undef,

# Database Configuration
Optional[String[1]] $profile_url = undef,
Optional[String[1]] $folder_info_url = undef,
Expand All @@ -123,6 +131,7 @@
Optional[String[1]] $store_url = undef,
Optional[String[1]] $acl_url = undef,
Optional[String[1]] $cache_folder_url = undef,
Optional[String[1]] $admin_url = undef,

# Authentication using LDAP
Optional[String[1]] $ldap_contact_info_attribute = undef,
Expand Down
14 changes: 14 additions & 0 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@
'password_recovery_domains' => ['example.com'],
'jwt_secret' => sensitive('secret'),
'create_identities_disabled' => true,
'url_encryption_enabled' => true,
'url_encryption_passphrase' => sensitive('this is a secret'),
'global_address_book_first_entries' => true,
'global_address_book_first_entries_count' => 10,
'secret_type' => 'env',
'secret_value' => 'SOGO_SECRET',

# Authentication using LDAP
'ldap_contact_info_attribute' => 'comment',
Expand All @@ -208,6 +214,7 @@
'store_url' => 'postgresql://sogo:[email protected]:5432/sogo/sogo_store',
'acl_url' => 'postgresql://sogo:[email protected]:5432/sogo/sogo_acl',
'cache_folder_url' => 'postgresql://sogo:[email protected]:5432/sogo/sogo_cache_folder',
'admin_url' => 'postgresql://sogo:[email protected]:5432/sogo/sogo_admin',

'mailing_mechanism' => 'smtp',
'smtp_server' => 'smtp://localhost:587/?tls=YES&tlsVerifyMode=allowInsecureLocalhost',
Expand Down Expand Up @@ -620,6 +627,12 @@
);
SOGoJWTSecret = "secret";
SOGoCreateIdentitiesDisabled = YES;
SOGoURLEncryptionEnabled = YES;
SOGoURLEncryptionPassphrase = "this is a secret";
SOGoGlobalAddressBookFirstEntries = YES;
SOGoGlobalAddressBookFirstEntriesCount = 10;
SOGoSecretType = "env";
SOGoSecretValue = "SOGO_SECRET";
/* Database Configuration */
SOGoProfileURL = "mysql://sogo:[email protected]:3306/sogo/sogo_user_profile";
Expand All @@ -630,6 +643,7 @@
OCSStoreURL = "postgresql://sogo:[email protected]:5432/sogo/sogo_store";
OCSAclURL = "postgresql://sogo:[email protected]:5432/sogo/sogo_acl";
OCSCacheFolderURL = "postgresql://sogo:[email protected]:5432/sogo/sogo_cache_folder";
OCSAdminURL = "postgresql://sogo:[email protected]:5432/sogo/sogo_admin";
/* Authentication using LDAP */
SOGoLDAPContactInfoAttribute = "comment";
Expand Down
21 changes: 21 additions & 0 deletions templates/sogo.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,24 @@
<% if $sogo::create_identities_disabled != undef { -%>
SOGoCreateIdentitiesDisabled = <%= $sogo::create_identities_disabled.bool2str('YES', 'NO') %>;
<% } -%>
<% if $sogo::url_encryption_enabled != undef { -%>
SOGoURLEncryptionEnabled = <%= $sogo::url_encryption_enabled.bool2str('YES', 'NO') %>;
<% } -%>
<% if $sogo::url_encryption_passphrase { -%>
SOGoURLEncryptionPassphrase = <%= Sensitive($sogo::url_encryption_passphrase.sogo::to_plist) %>;
<% } -%>
<% if $sogo::global_address_book_first_entries != undef { -%>
SOGoGlobalAddressBookFirstEntries = <%= $sogo::global_address_book_first_entries.bool2str('YES', 'NO') %>;
<% } -%>
<% if $sogo::global_address_book_first_entries_count { -%>
SOGoGlobalAddressBookFirstEntriesCount = <%= $sogo::global_address_book_first_entries_count %>;
<% } -%>
<% if $sogo::secret_type { -%>
SOGoSecretType = <%= $sogo::secret_type.sogo::to_plist %>;
<% } -%>
<% if $sogo::secret_value { -%>
SOGoSecretValue = <%= Sensitive($sogo::secret_value.sogo::to_plist) %>;
<% } -%>

/* Database Configuration */
<% if $sogo::profile_url { -%>
Expand All @@ -209,6 +227,9 @@
<% if $sogo::cache_folder_url { -%>
OCSCacheFolderURL = <%= $sogo::cache_folder_url.sogo::to_plist %>;
<% } -%>
<% if $sogo::admin_url { -%>
OCSAdminURL = <%= $sogo::admin_url.sogo::to_plist %>;
<% } -%>

/* Authentication using LDAP */
<% if $sogo::ldap_contact_info_attribute { -%>
Expand Down

0 comments on commit 75585fb

Please sign in to comment.