aboutsummaryrefslogtreecommitdiff
path: root/src/ejabberd_auth.erl (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-11-04Add some missing RFCs and remove problematic leading 0 in xep versionsBadlop1-0/+2
2022-02-11Update copyright year to 2022Badlop1-1/+1
2021-01-27Update newest copyright year to 2021 (#3464)Badlop1-1/+1
2020-12-14Make anonymous auth not override sasl mechaninsm offered by other modulesPaweł Chmielowski1-10/+15
This stop overriding store_type when anonymous is enabled with other auth modules, we don't really need that since anonymous is not taking passwords anyway, and this was disabling scram mechanisms. This fixes issue #2803.
2020-12-08Allow to use different hash for storing scram passwordsPaweł Chmielowski1-13/+16
2020-12-04Fix more places that needed changes after scram.erl api modificationsPaweł Chmielowski1-5/+5
2020-10-22Don't use same value in cache for user don't exist and wrong passwordPaweł Chmielowski1-9/+19
By doing this check_password that returned info about mismatched password caused user_exists checks performed after that to return wrongly that account doesn't exist.
2020-09-03Use include_lib() to include headers from dependencies (#3369)Stu Tomlinson1-1/+1
2020-01-28Update copyright to 2020 (#3149)Badlop1-1/+1
2019-11-27Make convert_to_scram work with all backendsPaweł Chmielowski1-1/+22
2019-09-18JWT-only authentication for some users (#3012)Alexey Shchepin1-13/+25
2019-07-29Improve hooks validator and fix bugs related to hooks registrationEvgeny Khramtsov1-2/+2
2019-07-18Remove Riak supportEvgeny Khramtsov1-2/+0
Reasons: - Riak DB development is almost halted after Basho - riak-erlang-client is abandoned and doesn't work correctly with OTP22 - Riak is slow in comparison to other databases - Missing key ordering makes it impossible to implement range queries efficiently (e.g. MAM queries)
2019-07-16Fix typos using codespellEvgeny Khramtsov1-1/+1
2019-07-12Process unexpected messages uniformlyEvgeny Khramtsov1-4/+5
2019-07-07Fix return type in try_set_password()Evgeny Khramtsov1-25/+33
Fixes #2932
2019-06-30Use new ets_cache API in ejabberd_authEvgeny Khramtsov1-14/+11
2019-06-27Avoid using broad map() type wherever possibleEvgeny Khramtsov1-3/+4
2019-06-24Make logging messages more consistentEvgeny Khramtsov1-1/+1
2019-06-15Get rid of "well-known" typeEvgeny Khramtsov1-4/+1
2019-06-14Use new configuration validatorEvgeny Khramtsov1-48/+10
2019-05-23Use different cache tables per auth moduleEvgeny Khramtsov1-23/+38
Fixes #2322
2019-04-19Correctly support cache tags in ejabberd_authEvgeny Khramtsov1-5/+8
2019-04-19Use new ets_cache api in ejabberd_authEvgeny Khramtsov1-8/+9
2019-01-08Update copyright to 2019 (#2756)Badlop1-1/+1
2018-12-05Add auth:which_user_exist to bulk checking existence of list of usersPaweł Chmielowski1-1/+43
2018-09-09Fix some dialyzer warningsEvgeny Khramtsov1-7/+1
2018-07-26ejabberd_auth: Restore lost case clauseHolger Weiss1-1/+3
Let check_password_with_authmodule/6 handle the case where validate_credentials/2 returns an error. This got lost in commit 4f8af723c6fc5dc4b689f0f1734d4e2b11dd4c82.
2018-07-08Reload internal room's configuration when mod_muc is reloadedEvgeniy Khramtsov1-7/+1
Fixes #2513
2018-07-05Move move randoms module to p1_utils repoEvgeniy Khramtsov1-1/+1
2018-06-14Get rid of ejabberd.hrl headerEvgeniy Khramtsov1-4/+4
The header consisted of too many unrelated stuff and macros misuse. Some stuff is moved into scram.hrl and type_compat.hrl. All macros have been replaced with the corresponding function calls. TODO: probably type_compat.hrl is not even needed anymore since we support only Erlang >= OTP 17.5
2018-05-30Improve indentationEvgeniy Khramtsov1-12/+12
2018-05-30Fix authentication for usernames containing uppercase charactersStu Tomlinson1-10/+13
Applies to authentication methods that compare User (normalized) and AuthzId (was not being normalized). These are external, ldap & pam. Fixes #2280
2018-05-07Improve robustness of external authentication backendsEvgeniy Khramtsov1-10/+31
Now all external ports are attached to supervising processes and requests are balanced in round-robin manner until the pool is exhausted. The commit also deprecates `extauth_instances` option and introduces `extauth_pool_size` option instead, with the default value of a number of logical processors (i.e. CPU cores). Fixes #2403
2018-05-03ejabberd_auth: Don't use cache if it's disabledHolger Weiss1-2/+4
Don't let the check whether a user exists use the cache if caching was disabled in the configuration.
2018-02-18Don't ask other nodes to invalidate cache when the key is not updatedEvgeniy Khramtsov1-4/+4
2018-02-16Cache 'isuser' queries to external auth programEvgeniy Khramtsov1-2/+18
2018-01-05Update copyright datesEvgeniy Khramtsov1-1/+1
2017-10-31Allow auth and pubsub plugin to use Elixir moduleChristophe Romain1-2/+2
2017-10-25Make it possible to convert to SQL for any current db_typeEvgeniy Khramtsov1-4/+1
It is now possible to run `export` command even when the current `db_type` is not `sql`
2017-08-04Fix missing validation from 633b68db1 (#1900)Christophe Romain1-2/+2
2017-05-23Deprecate misc:encode_base64/1 and misc:decode_base64/1Evgeniy Khramtsov1-6/+6
2017-05-11Rename is_user_exists -> user_existsEvgeniy Khramtsov1-17/+17
2017-05-11Use cache for authentication backendsEvgeniy Khramtsov1-280/+582
The commit introduces the following API incompatibilities: In ejabberd_auth.erl: * dirty_get_registered_users/0 is renamed to get_users/0 * get_vh_registered_users/1 is renamed to get_users/1 * get_vh_registered_users/2 is renamed to get_users/2 * get_vh_registered_users_number/1 is renamed to count_users/1 * get_vh_registered_users_number/2 is renamed to count_users/2 In ejabberd_auth callbacks * plain_password_required/0 is replaced by plain_password_required/1 where the argument is a virtual host * store_type/0 is replaced by store_type/1 where the argument is a virtual host * set_password/3 is now an optional callback * remove_user/3 callback is no longer needed * remove_user/2 now should return `ok | {error, atom()}` * is_user_exists/2 now must only be implemented for backends with `external` store type * check_password/6 is no longer needed * check_password/4 now must only be implemented for backends with `external` store type * try_register/3 is now an optional callback and should return `ok | {error, atom()}` * dirty_get_registered_users/0 is no longer needed * get_vh_registered_users/1 is no longer needed * get_vh_registered_users/2 is renamed to get_users/2 * get_vh_registered_users_number/1 is no longer needed * get_vh_registered_users_number/2 is renamed to count_users/2 * get_password_s/2 is no longer needed * get_password/2 now must only be implemented for backends with `plain` or `scram` store type Additionally, the commit introduces two new callbacks: * use_cache/1 where the argument is a virtual host * cache_nodes/1 where the argument is a virtual host New options are also introduced: `auth_use_cache`, `auth_cache_missed`, `auth_cache_life_time` and `auth_cache_size`.
2017-05-08Add type specs for Module:opt_type/1Evgeniy Khramtsov1-0/+3
2017-04-29Don't validate an option in ejabberd_config:get_option() functionsEvgeniy Khramtsov1-5/+2
The commit introduces the following changes: * Now there is no need to pass validating function in ejabberd_config:get_option() functions, because the configuration keeps already validated values. * New function ejabberd_config:get_option/1 is introduced * Function ejabberd_config:get_option/3 is deprecated. If the function is still called, the second argument (validating function) is simply ignored. * The second argument for ejabberd_config:get_option/2 is now a default value, not a validating function.
2017-04-28Don't re-define validation functions in multiple placesEvgeniy Khramtsov1-2/+11
2017-04-11Rename aux.erl as misc.erl17.04Christophe Romain1-2/+2
Thanks Microsoft Windows to not support some filenames
2017-03-30Deprecate jlib.erl in favor of aux.erlEvgeniy Khramtsov1-2/+2
Since the main goal of jlib.erl is lost, all auxiliary functions are now moved to aux.erl, and the whole jlib.erl is now deprecated.
2017-02-27Fix compilation on R17Paweł Chmielowski1-3/+3