Commit Graph

38 Commits

Author SHA1 Message Date
Badlop e234ced107 Support ejabberd_auth_http's auth_opts (processone/ejabberd-contrib#284) 2020-02-19 13:18:39 +01:00
Badlop 2d32c66fd7 Update copyright to 2020 (#3149) 2020-01-28 15:49:23 +01:00
Evgeny Khramtsov 97da380acd Generate ejabberd.yml.5 man page from source code directly
Several documentation callbacks (doc/0 and mod_doc/0) are implemented
and `ejabberdctl man` command is added to generate a man page. Note
that the command requires a2x to be installed (which is a part of
asciidoc package).
2020-01-08 12:24:51 +03:00
Alexey Shchepin 2a35cadf80 Merge branch 'pg_prepared_statements' of https://github.com/sabudaye/ejabberd into sabudaye-pg_prepared_statements
Conflicts:
	ejabberd.yml.example
	src/ejabberd_sql.erl
2019-11-26 19:45:01 +03:00
Evgeny Khramtsov 3826a9ed58 Also group duplicated list-like options inside host_config/append_host_config 2019-11-07 12:14:08 +03:00
Evgeny Khramtsov bb26d7c379 Accept a list in c2s_ciphers/s2s_ciphers options 2019-11-05 17:54:56 +03:00
Evgeny Khramtsov a202818037
Merge pull request #3069 from nosnilmot/jwt-custom-jid-field
Add option for JWT field name containing JID
2019-10-26 11:03:19 +03:00
Stu Tomlinson b2651dae0f Add option for JWT field name containing JID 2019-10-25 16:56:18 +01:00
Evgeny Khramtsov f981a2ef17 Improve jwt_key validator 2019-10-25 18:30:50 +03:00
Alexey Shchepin c7470f5107 Handle the case when JWT key file contains JWK set 2019-10-25 16:33:22 +03:00
Evgeny Khramtsov f1a35cc9ac Avoid calling to logger module on OTP<22 2019-10-25 15:27:47 +03:00
Evgeny Khramtsov e4a8afb15d Replace lager with built-in new logging API
This change requires Erlang/OTP-21.0 or higher.
The commit also deprecates the following options:
  - log_rotate_date
  - log_rate_limit

Furthermore, these options have no effect. The logger now fully
relies on log_rotate_size, that cannot be 0 anymore.

The loglevel option now accepts levels in literal formats.
Those are: none, emergency, alert, critical, error, warning, notice, info, debug.
Old integer values (0-5) are still supported and automatically converted
into literal format.
2019-10-18 19:12:32 +03:00
Paweł Chmielowski 9822535e70 Convert oauth_expire option to accept timeout values 2019-10-15 11:28:47 +02:00
Alexey Shchepin 8f7fa38949 Support OAUTH client authentication 2019-09-27 20:36:58 +03:00
Evgeny Khramtsov e227940b85 Improve ACME implementation
Fixes #2487, fixes #2590, fixes #2638
2019-09-20 12:36:31 +03:00
Alexey Shchepin 0fe1e40a9d JWT-only authentication for some users (#3012) 2019-09-18 18:46:24 +03:00
Evgeny Khramtsov 9ec69b8d62 Don't treat 'Host' header as a virtual XMPP host
Fixes #2989
2019-08-13 18:30:28 +03:00
Evgeny Khramtsov d796dcace5 Spawn SQL connections on demand only 2019-08-12 12:21:31 +03:00
Evgeny Khramtsov 4be98b5aef Log an error when JWT authentication is configured without jwt_key 2019-07-19 12:01:57 +03:00
Evgeny Khramtsov 55d42b9000 Fix typo 2019-07-18 22:35:16 +03:00
Evgeny Khramtsov 6d6e3e348d Improve robustness of reading jwt_key option 2019-07-18 22:31:08 +03:00
Evgeny Khramtsov 3f7d9e3ad6 Remove Riak support
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-18 19:31:12 +03:00
Evgeny Khramtsov d718b35d46 Use econf:timeout() instead of econf:pos_int() wherever appropriate 2019-07-17 22:15:56 +03:00
Evgeny Khramtsov 4658d478b4 Don't call ejabberd_option from ejabberd_options 2019-07-03 19:23:05 +03:00
Evgeny Khramtsov b7f6620166 Fix jwt_key option processing 2019-07-03 19:16:54 +03:00
Alexey Shchepin ff6884f313 Read jwt_key from file 2019-07-03 05:33:35 +03:00
Alexey Shchepin 3e5c0a1df8 Authentication using JWT tokens 2019-07-01 05:01:55 +03:00
Evgeny Khramtsov ffe1c722e0 Deprecate 'route_subdomains' option
This option was introduced to fulfill requirement of RFC3920 10.3,
but in practice it was very inconvenient and many admins were
forced to change its value to 's2s' (i.e. to behaviour that
violates the RFC). Also, it seems like in RFC6120 this requirement
no longer presents.

Those admins who used this option to block s2s with their subdomains
can use 's2s_access' option for the same purpose.
2019-06-26 10:45:58 +03:00
Evgeny Khramtsov e477a8c220 Validate and set 'version' option at an earlier stage 2019-06-23 12:23:22 +03:00
Evgeny Khramtsov e9a78d0de7 Make option 'validate_stream' global 2019-06-21 21:06:32 +03:00
Evgeny Khramtsov 72572d990a Allow multiple definitions of host_config and append_host_config 2019-06-21 15:37:51 +03:00
Evgeny Khramtsov a205ebad2b Get rid of "well-known" type 2019-06-15 12:53:16 +03:00
Evgeny Khramtsov d85cf7780c Introduce option 'captcha_url'
Option 'captcha_host' is now deprecated in favor of 'captcha_url'.
However, it's not replaced automatically at startup, i.e. both options
are supported with 'captcha_url' being the preferred one.
2019-06-14 16:06:04 +03:00
Evgeny Khramtsov a02cff0e78 Use new configuration validator 2019-06-14 12:33:26 +03:00
Evgeniy Khramtsov ba2b650464 Introduce new gen_mod callback: mod_options/1
The callback is supposed to provide known options and their default
values, as long as the documentation. Passing default values into
get_mod functions is now deprecated: all defaults should be provided
by the Mod:mod_options/1 callback.
2018-01-23 10:54:52 +03:00
Evgeniy Khramtsov cdc7c1d1ed Update copyright dates 2018-01-05 23:18:58 +03:00
Evgeniy Khramtsov 0b93cb7ece Store options using p1_options module 2017-04-27 19:44:58 +03:00
Evgeniy Khramtsov 78dba217bf Speedup configuration options lookup
We now avoid excessive ETS lookups; instead, we use dynamically
compiled module 'ejabberd_options' keeping the configuration options
2017-04-16 15:29:10 +03:00