25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-31 15:21:38 +01:00
Commit Graph

29 Commits

Author SHA1 Message Date
Evgeniy Khramtsov
fd8e07af47 Get rid of ejabberd.hrl header
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-06-14 14:00:47 +03:00
Evgeniy Khramtsov
cdc7c1d1ed Update copyright dates 2018-01-05 23:18:58 +03:00
Alexey Shchepin
78dfb832b8 Add SQL_INSERT macro and update SQL queries to use server_host field 2017-11-02 18:21:40 +03:00
Evgeniy Khramtsov
29462f0053 Make it possible to convert to SQL for any current db_type
It is now possible to run `export` command even when the current `db_type` is not `sql`
2017-10-25 21:21:52 +03:00
Evgeniy Khramtsov
633b68db11 Use cache for authentication backends
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-11 14:37:21 +03:00
Evgeniy Khramtsov
7129aebe76 Don't re-define validation functions in multiple places 2017-04-28 13:23:32 +03:00
Evgeniy Khramtsov
9a93acc62a Improve Mnesia tables creation and transformation 2017-04-23 16:37:58 +03:00
Christophe Romain
b1acd1183f Rename aux.erl as misc.erl
Thanks Microsoft Windows to not support some filenames
2017-04-11 12:13:58 +02:00
Evgeniy Khramtsov
7bcbea2108 Deprecate jlib.erl in favor of aux.erl
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-03-30 14:17:13 +03:00
Evgeniy Khramtsov
6cdead166b Start/stop auth modules when host is added/deleted 2017-02-23 16:19:22 +03:00
Badlop
7d767fac7f Support scrammed passwords in ejabberdctl import_prosody (#1549) 2017-02-20 12:47:56 +01:00
Peter Lemenkov
cb30f7733d Use ejabberd_config:get_option/2 instead of ejabberd_config:get_local_option/2
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2017-02-16 20:41:57 +03:00
Evgeniy Khramtsov
fd885d0818 Apply SASLprep before storing/converting passwords
Fixes #996 and #1295
2017-02-12 10:06:30 +03:00
Badlop
5fdd1c39fe Update copyright date automatically (#1442) 2017-01-02 21:42:06 +01:00
Christophe Romain
fbfbb96872 Improve ODBC import 2016-11-22 14:48:01 +01:00
Evgeniy Khramtsov
4c5460f0bd Get rid of compile warnings for random/crypto modules on R19 2016-10-18 08:17:21 +03:00
Alexey Shchepin
0ea0ba3004 Update more SQL queries 2016-05-05 15:51:58 +03:00
Evgeniy Khramtsov
1aae8a9fda Rename odbc to sql everywhere 2016-04-20 13:25:42 +03:00
Evgeniy Khramtsov
46568fb959 Merge commit 'refs/pull/524/head' of github.com:processone/ejabberd into sasl-api-change 2016-03-25 18:16:50 +03:00
Badlop
f448ff608a Update copyright to 2016 (#901) 2016-01-13 12:29:14 +01:00
Evgeniy Khramtsov
95265dd3ad Move JID related functions to jid.erl (#847) 2015-11-24 18:44:13 +03:00
Ben Langfeld
917d48f30b Use SASL PLAIN authzid as client identity if auth module permits it
This allows the authentication modules to perform SASL proxy authentication. It puts the onus on them to authorize the authcid to masquerade as the authzid. Doesn't currently implement such functionality in existing auth modules, since they cannot currently codify a relationship between the two identities. Does not permit the authzid to use a domain differently from the one of the connection.

Note: digest might not work, but I have no interest in it, being deprecated.
2015-05-06 14:12:15 -03:00
badlop
31c5775025 Merge pull request #426 from hairyhum/master
Migration of scram passwords with piefxis (riak and internal only)
2015-04-15 11:04:29 +02:00
Badlop
5bd8724801 Update FSF address 2015-02-25 15:19:33 +01:00
Feotov Daniil
eb52c118d0 Migration of scram passwords with piefxis (riak and internal only) 2015-02-05 18:44:08 +03:00
Christophe Romain
120e581865 Fix missing copyright dates to 2015 (EJAB-1733) 2015-01-21 14:52:37 +01:00
Evgeniy Khramtsov
792b5a24df Serialize records to proplists before storing then in Riak 2014-07-14 08:24:44 +04:00
Evgeniy Khramtsov
e82219185b Add SQL to Riak converter 2014-07-10 13:29:01 +04:00
Evgeniy Khramtsov
0490c2f139 Improve Riak support 2014-07-10 13:26:37 +04:00