]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Markus Valentin [Thu, 29 Feb 2024 16:15:31 +0000 (17:15 +0100)]
auth: [user|pass]db-lua: Convert module arguments to const_string array
Markus Valentin [Wed, 21 Feb 2024 12:31:42 +0000 (13:31 +0100)]
auth: [user|pass]db-lua: Call auth_lua_script_get_default_cache_key() from preinit
Try to get the default_cache_key from the lua-[user|pass]db when running
the preinit. This allows the lua script to set the default_cache_key
themselves.
Markus Valentin [Wed, 21 Feb 2024 12:26:07 +0000 (13:26 +0100)]
auth: db-lua - Add auth_lua_script_get_default_cache_key()
This function calls auth_passdb_get_cache_key() or auth_userb_get_cache_key()
and sets it to the corresponding passdb_module->default_cache_key or
userdb_module->default_cache_key. This allows thereby to set the
default_cache_key from lua passdb or userdb if
auth_passdb_get_cache_key() or auth_userdb_get_cache_key() is
implemented.
Markus Valentin [Wed, 21 Feb 2024 12:16:57 +0000 (13:16 +0100)]
auth: db-lua - Split off auth_lua_script_auth_db_init() from auth_lua_script_init()
Markus Valentin [Fri, 16 Feb 2024 10:54:12 +0000 (11:54 +0100)]
auth: userdb-lua - Convert args to settings
This changes userdb args based initialization to use actual settings:
* file -> lua_file (global)
* generic args -> auth_lua_config
* blocking -> userdb_use_worker
* cache_key is removed
Markus Valentin [Fri, 16 Feb 2024 10:50:29 +0000 (11:50 +0100)]
auth: passdb-lua - Convert args to settings
This changes passdb args based initialization to use actual settings:
* file -> lua_file (global)
* generic args -> auth_lua_config
* blocking -> passdb_use_worker
* scheme -> passdb_default_password_scheme
* cache_key is removed
Markus Valentin [Thu, 29 Feb 2024 16:12:19 +0000 (17:12 +0100)]
auth: db-lua: Introduce auth_lua_settings
Timo Sirainen [Sat, 16 Mar 2024 11:48:53 +0000 (13:48 +0200)]
config: Include named list filter's name in the automatic setting prefix
For example:
passdb sql {
query = ..
}
The query translated to passdb_sql_query automatically.
Aki Tuomi [Fri, 15 Mar 2024 06:44:01 +0000 (08:44 +0200)]
doveconf: Remove prefix from filters and string lists too
Timo Sirainen [Tue, 19 Mar 2024 05:20:05 +0000 (07:20 +0200)]
config: Add ifdef macro tracking for building all-settings.c
Add settings/code to the file using the same #if / #ifdef checks as exist in
the main file. This fixes building without Cassandra.
Timo Sirainen [Wed, 13 Mar 2024 22:01:37 +0000 (00:01 +0200)]
global: Replace built-in $default_* variables with $SET:default_*
This way they're more consistent with how they can be used in config files.
Timo Sirainen [Wed, 13 Mar 2024 20:11:43 +0000 (22:11 +0200)]
config: Change $setting parsing to use prefixed $SET:setting
This allows using $text in setting values without having to quote the line.
Timo Sirainen [Thu, 7 Mar 2024 13:06:41 +0000 (15:06 +0200)]
auth: passdb/userdb sql - Add support for fields { .. }
Timo Sirainen [Tue, 12 Mar 2024 20:52:39 +0000 (22:52 +0200)]
auth: Add auth_cache_parse_key_and_fields()
Timo Sirainen [Sun, 3 Mar 2024 15:00:32 +0000 (17:00 +0200)]
auth: passdb/userdb sql - Convert to new settings
sql_drivers_deinit() needed to be moved earlier, because the sql_db is
now kept in cache until it's called. In the earlier code the sql_db was
deinitialized when the passdb/userdb sql was deinitialized. If the
sql_db deinit happens too late, it's late in aborting requests and that
causes crashes.
Timo Sirainen [Mon, 4 Mar 2024 08:40:10 +0000 (10:40 +0200)]
auth: userdb ldap, sql - Fix error handling for user iteration
Timo Sirainen [Mon, 4 Mar 2024 08:42:20 +0000 (10:42 +0200)]
auth: ldap - Remove unused ldap_connection.userdb_used
Timo Sirainen [Fri, 1 Mar 2024 11:17:31 +0000 (13:17 +0200)]
auth: passdb sql - Remove warning about changed userdb queries without userdb sql
This will no longer make sense after the upcoming settings changes.
Timo Sirainen [Fri, 1 Mar 2024 11:15:10 +0000 (13:15 +0200)]
auth: Remove default passdb/userdb sql queries
They're unlikely to be the wanted ones, and it's just causing confusion
when the defaults are accidentally used.
Timo Sirainen [Thu, 7 Mar 2024 12:51:25 +0000 (14:51 +0200)]
lib-settings: Add settings_get_params() to support escaping variables
Timo Sirainen [Thu, 7 Mar 2024 07:57:16 +0000 (09:57 +0200)]
lib-settings, global: Change SETTINGS_EVENT_VAR_EXPAND_* APIs
These now work with struct var_expand_params, which allows more flexibility.
Timo Sirainen [Thu, 7 Mar 2024 07:33:38 +0000 (09:33 +0200)]
lib: var-expand - Add support for escaping variables
Timo Sirainen [Thu, 7 Mar 2024 07:30:30 +0000 (09:30 +0200)]
lib: Add var_expand() with new API and use it to implement other var_expand_*()
Timo Sirainen [Wed, 6 Mar 2024 18:24:25 +0000 (20:24 +0200)]
lib, global: var_expand_with_arrays() - Replace func_tables/func_contexts with struct var_expand_params_func
Timo Sirainen [Wed, 6 Mar 2024 18:07:58 +0000 (20:07 +0200)]
lib, global: Rename var_expand() to var_expand_with_table()
Timo Sirainen [Wed, 6 Mar 2024 18:07:18 +0000 (20:07 +0200)]
login-common: Rename var_expand_table variable to client_tab
Fixes a conflict caused by the next commit.
Timo Sirainen [Tue, 12 Mar 2024 20:52:51 +0000 (22:52 +0200)]
lib-settings: If settings_get*() fails, always include settings struct name and filter name in error message
This can help understand where the error is coming from.
Timo Sirainen [Tue, 12 Mar 2024 19:23:06 +0000 (21:23 +0200)]
lib-sql: sqlite - Change default journal_mode to wal
Timo Sirainen [Mon, 11 Mar 2024 21:33:30 +0000 (23:33 +0200)]
doc/example-config: Update passdb/userdb sql configuration
Timo Sirainen [Mon, 11 Mar 2024 13:32:37 +0000 (15:32 +0200)]
lib-sql: cassandra - Rename cassandra_num_threads to cassandra_io_thread_count
Timo Sirainen [Mon, 11 Mar 2024 13:28:54 +0000 (15:28 +0200)]
lib-sql: cassandra - Change default 0 values to explicit defaults
Timo Sirainen [Sun, 3 Mar 2024 14:21:27 +0000 (16:21 +0200)]
lib-sql: cassandra - Keep a persistent cache of used sql databases
Timo Sirainen [Sun, 3 Mar 2024 14:15:46 +0000 (16:15 +0200)]
lib-sql: sqlite - Keep a persistent cache of used sql databases
Timo Sirainen [Sun, 3 Mar 2024 14:10:16 +0000 (16:10 +0200)]
lib-sql: pgsql - Keep a persistent cache of used sql databases
Timo Sirainen [Sun, 3 Mar 2024 14:05:15 +0000 (16:05 +0200)]
lib-sql: mysql - Keep a persistent cache of used sql databases
Currently we don't really need to support freeing databases. If needed,
this could be done with e.g. freeing unused databases after N seconds
of idling.
Timo Sirainen [Fri, 1 Mar 2024 14:21:16 +0000 (16:21 +0200)]
lib-sql, lib-dict-backend: Rename sql-db-cache to sql-db-cache-legacy
Timo Sirainen [Fri, 1 Mar 2024 12:38:00 +0000 (14:38 +0200)]
lib-settings: Add settings_hash() and settings_equal()
Timo Sirainen [Thu, 29 Feb 2024 12:28:07 +0000 (14:28 +0200)]
lib-sql: mysql, pgsql - Implement sqlpool support for new init() API
Timo Sirainen [Fri, 8 Mar 2024 12:49:05 +0000 (14:49 +0200)]
lib-sql: sql_init_auto() - Require drivers to call sql_init_common() explicitly
This will be needed by following changes.
Timo Sirainen [Thu, 29 Feb 2024 12:07:06 +0000 (14:07 +0200)]
lib-sql: sqlpool - Implement new init() API
Timo Sirainen [Thu, 29 Feb 2024 12:04:47 +0000 (14:04 +0200)]
lib-sql: sqlpool - Split off driver_sqlpool_init_common()
Timo Sirainen [Thu, 29 Feb 2024 11:56:37 +0000 (13:56 +0200)]
lib-sql: sqlpool - Rename connect_string to legacy_connect_string
Timo Sirainen [Thu, 29 Feb 2024 11:47:45 +0000 (13:47 +0200)]
lib-sql: Rename driver_sqlpool_init_full() to driver_sqlpool_legacy_init_full()
Timo Sirainen [Thu, 29 Feb 2024 11:46:53 +0000 (13:46 +0200)]
lib-sql: Remove prototype for nonexistent driver_sqlpool_init()
Timo Sirainen [Sat, 17 Feb 2024 14:37:21 +0000 (16:37 +0200)]
lib-sql: pgsql - Implement new init() API
Timo Sirainen [Fri, 16 Feb 2024 08:03:10 +0000 (10:03 +0200)]
lib-sql: pgsql - Move settings to struct pgsql_settings
Timo Sirainen [Sat, 17 Feb 2024 14:39:20 +0000 (16:39 +0200)]
lib-sql: pgsql - Remove unused pgsql_db.pool
Timo Sirainen [Fri, 8 Mar 2024 12:35:12 +0000 (14:35 +0200)]
lib-sql: pgsql - Fix logging database name on connection failure
Timo Sirainen [Fri, 16 Feb 2024 07:46:17 +0000 (09:46 +0200)]
lib-sql: cassandra - Implement new init() API
Timo Sirainen [Fri, 16 Feb 2024 05:42:32 +0000 (07:42 +0200)]
lib-sql: cassandra - Split off driver_cassandra_init_common()
Timo Sirainen [Wed, 14 Feb 2024 12:29:51 +0000 (14:29 +0200)]
lib-sql: cassandra - Move settings to struct cassandra_settings
Timo Sirainen [Fri, 9 Feb 2024 21:24:18 +0000 (23:24 +0200)]
lib-sql: mysql - Implement new init() API
Timo Sirainen [Thu, 29 Feb 2024 13:11:39 +0000 (15:11 +0200)]
lib-sql: mysql - Split off driver_mysql_init_common()
Timo Sirainen [Thu, 29 Feb 2024 12:55:07 +0000 (14:55 +0200)]
lib-sql: mysql - Move settings to struct mysql_settings
Timo Sirainen [Fri, 9 Feb 2024 21:04:20 +0000 (23:04 +0200)]
lib-sql: mysql - Handle missing MySQL SSL support without dying
Timo Sirainen [Fri, 26 Jan 2024 22:24:10 +0000 (00:24 +0200)]
lib-sql: sqlite - Implement new init() API
Timo Sirainen [Thu, 29 Feb 2024 12:47:51 +0000 (14:47 +0200)]
lib-sql: sqlite - Split off driver_sqlite_init_common()
Timo Sirainen [Thu, 29 Feb 2024 12:42:40 +0000 (14:42 +0200)]
lib-sql: sqlite - Move settings to struct sqlite_settings
Timo Sirainen [Fri, 26 Jan 2024 22:09:42 +0000 (00:09 +0200)]
lib-sql: Replace sql_init*() with a new sql_init_auto() API
Timo Sirainen [Fri, 26 Jan 2024 21:58:15 +0000 (23:58 +0200)]
lib-sql, global: Rename struct sql_settings to sql_legacy_settings
Timo Sirainen [Fri, 26 Jan 2024 21:56:24 +0000 (23:56 +0200)]
lib-sql: Rename sql_db_vfuncs.init*() to init_legacy*()
Timo Sirainen [Fri, 26 Jan 2024 21:54:40 +0000 (23:54 +0200)]
lib-sql, global: Rename sql_init*() to sql_init_legacy*()
Timo Sirainen [Fri, 8 Mar 2024 09:52:15 +0000 (11:52 +0200)]
lib-sql: Refactor sql driver initialization code
sql_drivers_init() now registers all the drivers.
Timo Sirainen [Fri, 16 Feb 2024 05:25:46 +0000 (07:25 +0200)]
lib-ssl-iostream: Add ssl_client_key_password setting
Timo Sirainen [Fri, 9 Feb 2024 21:07:50 +0000 (23:07 +0200)]
lib-ssl-iostream: Make ssl_default_settings public
Timo Sirainen [Fri, 9 Feb 2024 21:33:00 +0000 (23:33 +0200)]
lib-settings: Add settings_file_has_path()
Marco Bettini [Wed, 28 Feb 2024 10:08:30 +0000 (10:08 +0000)]
lib-language: Remove truncation from filters
Marco Bettini [Fri, 23 Feb 2024 15:12:15 +0000 (15:12 +0000)]
lib-language: Pass event with language filter to filter/tokenizer_create
This is required for non-core plugins to be able to load their language
nested configurations.
Marco Bettini [Wed, 14 Feb 2024 16:04:33 +0000 (16:04 +0000)]
lib-language: Add language_default setting
Marco Bettini [Tue, 30 Jan 2024 09:01:24 +0000 (09:01 +0000)]
lib-language: tokenizers - Use new settings
Marco Bettini [Fri, 26 Jan 2024 16:14:08 +0000 (16:14 +0000)]
lib-language: filters - Use new settings
Marco Bettini [Thu, 25 Jan 2024 09:42:21 +0000 (09:42 +0000)]
lib-language: Replace fts_languages with the names from language filter array
Marco Bettini [Wed, 24 Jan 2024 14:43:16 +0000 (14:43 +0000)]
lib-language: Replace fts_language_config with language_textcat_config_path
Marco Bettini [Wed, 24 Jan 2024 08:21:12 +0000 (08:21 +0000)]
lib-language: Add language config-rewrite settings
Marco Bettini [Tue, 23 Jan 2024 08:56:03 +0000 (08:56 +0000)]
fts: Switch to lang-user
Marco Bettini [Mon, 22 Jan 2024 16:42:35 +0000 (16:42 +0000)]
lib-storage: Add lang-user to Makefile
Also, switch fts-plugin from static linking to dynamic.
Otherwise static variables in filters and tokenizers modules
end up with duplicated/split storage.
Marco Bettini [Wed, 17 Jan 2024 11:00:28 +0000 (11:00 +0000)]
lib-language: lang-user - Rename functions
Marco Bettini [Wed, 17 Jan 2024 10:15:19 +0000 (10:15 +0000)]
lib-language: lang-user - Rename fuser -> luser
Marco Bettini [Wed, 17 Jan 2024 10:04:22 +0000 (10:04 +0000)]
lib-language: lang-user - Rename structs
Marco Bettini [Wed, 17 Jan 2024 09:59:23 +0000 (09:59 +0000)]
lib-language: lang-user - Rename Macros
Marco Bettini [Wed, 31 Jan 2024 11:55:49 +0000 (11:55 +0000)]
lib-language: Copy plugins/fts/fts-user.* into lang-user.*
Marco Bettini [Wed, 31 Jan 2024 14:41:30 +0000 (14:41 +0000)]
lib-language: Change search tokenizers pseudo-setting into proper API
Marco Bettini [Thu, 1 Feb 2024 10:51:08 +0000 (10:51 +0000)]
lib-language: Fix whitespaces
Aki Tuomi [Tue, 27 Feb 2024 11:56:14 +0000 (13:56 +0200)]
doc/example-config: Update dovecot-oauth2.conf.ext
Aki Tuomi [Tue, 13 Dec 2022 18:06:35 +0000 (20:06 +0200)]
auth: mech-oauth2 - Allow validating tokens in worker
Aki Tuomi [Tue, 13 Dec 2022 18:06:39 +0000 (20:06 +0200)]
auth: auth-worker - Support validating oauth2 tokens
Aki Tuomi [Sun, 25 Oct 2020 16:58:11 +0000 (18:58 +0200)]
auth: mech-oauth2 - Fix authentication error reporting
Use standard codes for everything except internal failure.
Aki Tuomi [Tue, 27 Feb 2024 13:22:21 +0000 (15:22 +0200)]
auth: Remove OIDC configuration URL hack
Aki Tuomi [Sun, 25 Oct 2020 16:55:46 +0000 (18:55 +0200)]
auth: mech-oauth2 - Validate credentials in mech
Simplifies auth workflow greatly by not having to pretend
verifying tokens as passwords.
Aki Tuomi [Sun, 25 Oct 2020 16:52:39 +0000 (18:52 +0200)]
auth: mech-oauth2 - Ensure data is cleaned from memory after unref
Aki Tuomi [Wed, 3 Jun 2020 05:36:18 +0000 (08:36 +0300)]
auth: mech-oauth2 - Validate token in mechanism
This is how the validation should have been done all along.
Aki Tuomi [Tue, 27 Feb 2024 13:16:42 +0000 (15:16 +0200)]
auth: Allow authentication succeed without passdb
Aki Tuomi [Wed, 14 Dec 2022 08:11:27 +0000 (10:11 +0200)]
auth: Allow noauthenticate in the last passdb
If the passdb lookup has already succeeded, ignore
PASSDB_RESULT_NEXT result.
Aki Tuomi [Tue, 20 Feb 2024 12:52:03 +0000 (14:52 +0200)]
db-oauth2: Mark passdb_success already here
Allows setting auth fields without passdb.
Aki Tuomi [Wed, 3 Jun 2020 05:32:58 +0000 (08:32 +0300)]
auth: db-oauth2 - Keep initialized oauth2 databases in memory
Removes refcounting. This avoids losing cache. Simplifies next change.
Aki Tuomi [Thu, 4 May 2023 12:32:55 +0000 (15:32 +0300)]
auth: mech-oauth2 - Always go through passdb lookup
Otherwise db-oauth2 cannot add the openid configuration URL.
Aki Tuomi [Fri, 16 Feb 2024 11:31:41 +0000 (13:31 +0200)]
lib-oauth2: Make oauth2_request_abort() NULL no-op
Timo Sirainen [Tue, 27 Feb 2024 11:57:51 +0000 (13:57 +0200)]
lib: istream-sized - Always preserve parent stream error
Only ENOENT errors were preserved previously.
Timo Sirainen [Sat, 24 Feb 2024 12:11:10 +0000 (14:11 +0200)]
auth: passwd-file - Add support for fields { .. }
Timo Sirainen [Mon, 26 Feb 2024 12:42:36 +0000 (14:42 +0200)]
auth: passwd-file - Make all pointers in struct passwd_user const