Skip to content

Commit 3e8b55c

Browse files
committed
Improve the Authentication and SCRAM sections
1 parent 9e2cba8 commit 3e8b55c

File tree

2 files changed

+45
-15
lines changed

2 files changed

+45
-15
lines changed

content/admin/configuration/authentication.md

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@ menu: Authentication
55
order: 50
66
---
77

8-
The toplevel option [auth_method](/admin/configuration/toplevel/#auth-method)
9-
defines the authentication methods that are
10-
used for user authentication. The option syntax is:
11-
12-
`auth_method: [Method1, Method2, ...]`
8+
# Supported Methods
139

14-
The following authentication methods are supported by `ejabberd`:
10+
The authentication methods supported by `ejabberd` are:
1511

1612
- `internal` — See section [Internal](#internal).
1713

@@ -27,10 +23,26 @@ The following authentication methods are supported by `ejabberd`:
2723

2824
- `jwt` — See section [JWT Authentication](#jwt-authentication).
2925

30-
When the option is omitted, ejabberd will rely upon the default database which is configured in `default_db` option. If this option is not set neither the default authentication method will be `internal`.
26+
The top-level option [auth_method](/admin/configuration/toplevel/#auth-method)
27+
defines the authentication methods that are
28+
used for user authentication.
29+
The option syntax is:
30+
31+
```yaml
32+
auth_method: [Method1, Method2, ...]
33+
```
34+
35+
When the `auth_method` option is omitted, `ejabberd` relies on the default database which is configured in [`default_db`](/admin/configuration/toplevel/#default-db) option. If this option is not set neither, then the default authentication method will be `internal`.
3136

3237
Account creation is only supported by `internal`, `external` and `sql` auth methods.
3338

39+
# General Options
40+
41+
The top-level option
42+
[auth_password_format](/admin/configuration/toplevel/#auth-password-format)
43+
allows to store the passwords in SCRAM format,
44+
see the [SCRAM](#scram) section.
45+
3446
Other top-level options that are relevant to the authentication configuration:
3547
[disable_sasl_mechanisms](/admin/configuration/toplevel/#disable-sasl-mechanisms),
3648
[fqdn](/admin/configuration/toplevel/#fqdn).
@@ -315,11 +327,25 @@ For more information about JWT authentication, you can check a brief tutorial in
315327
# SCRAM
316328

317329
The top-level option
318-
[auth_password_format](/admin/configuration/toplevel/#auth-password-format)
319-
allows to store the passwords in SCRAM format instead of plaintext format.
330+
[`auth_password_format`](/admin/configuration/toplevel/#auth-password-format)
331+
defines in what format the users passwords are stored:
332+
SCRAM format or plaintext format.
333+
334+
The top-level option
335+
[`auth_scram_hash`](/admin/configuration/toplevel/#auth-scram-hash)
336+
defines the hash algorithm that will be used to scram the password.
337+
338+
ejabberd supports channel binding to the external channel,
339+
allowing the clients to use `-PLUS` authentication mechanisms.
340+
341+
In summary, depending on the configured options, ejabberd supports:
342+
343+
- `SCRAM_SHA-1(-PLUS)`
344+
- `SCRAM_SHA-256(-PLUS)`
345+
- `SCRAM_SHA-512(-PLUS)`
320346

321-
For details about the client-server communication when using SCRAM-SHA-1,
322-
refer to [SASL and SCRAM-SHA-1](https://wiki.xmpp.org/web/SASLandSCRAM-SHA-1).
347+
For details about the client-server communication when using SCRAM,
348+
refer to [SASL Authentication and SCRAM](https://wiki.xmpp.org/web/SASL_Authentication_and_SCRAM).
323349

324350
## Internal storage
325351

content/admin/configuration/toplevel.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,26 +268,30 @@ repository. Please refer to that module’s README file for details.
268268

269269
*plain | scram*
270270

271-
The option defines in what format the users passwords are stored:
271+
The option defines in what format the users passwords are stored,
272+
plain text or in [SCRAM](/admin/configuration/authentication/#scram) format:
272273

273274
- *plain*: The password is stored as plain text in the database. This
274275
is risky because the passwords can be read if your database gets
275276
compromised. This is the default value. This format allows clients
276277
to authenticate using: the old Jabber Non-SASL (XEP-0078), SASL
277-
PLAIN, SASL DIGEST-MD5, and SASL SCRAM-SHA-1.
278+
PLAIN, SASL DIGEST-MD5, and SASL SCRAM-SHA-1/256/512(-PLUS).
278279

279280
- *scram*: The password is not stored, only some information that
280281
allows to verify the hash provided by the client. It is impossible
281282
to obtain the original plain password from the stored information;
282283
for this reason, when this value is configured it cannot be changed
283284
to plain anymore. This format allows clients to authenticate using:
284-
SASL PLAIN and SASL SCRAM-SHA-1. The default value is *plain*.
285+
SASL PLAIN and SASL SCRAM-SHA-1/256/512(-PLUS). The SCRAM variant
286+
depends on the [auth_scram_hash](/admin/configuration/toplevel/#auth-scram-hash) option.
287+
288+
The default value is *plain*.
285289

286290
## auth\_scram\_hash
287291

288292
*sha | sha256 | sha512*
289293

290-
Hash algorithm that should be used to store password in SCRAM format.
294+
Hash algorithm that should be used to store password in [SCRAM](/admin/configuration/authentication/#scram) format.
291295
You shouldn’t change this if you already have passwords generated with a
292296
different algorithm - users that have such passwords will not be able to
293297
authenticate. The default value is *sha*.

0 commit comments

Comments
 (0)