Skip to content

Commit 6842617

Browse files
author
Andrzej Telezynski
committed
MIM-2360 Add migration note about fast_tls deprecation
1 parent 7d64595 commit 6842617

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

doc/listeners/listen-c2s.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ Password to the X509 PEM file with the private key.
164164
* **Default:** `true`
165165
* **Example:** `tls.disconnect_on_failure = false`
166166

167+
This option specifies what happens when client certificate is verified during TLS handshake.
168+
It therefore only applies when client certificate verification is enabled, that is `tls.verify_mode` is set to `"peer"` or `"selfsigned_peer"`.
169+
170+
When set to `true`, client verification is performed during TLS handshake and in case of error the connection is aborted.
171+
Additionally empty client certificate is treated as an error.
172+
173+
When set to `false`, TLS handshake will succeed even if there were errors in client certificate verification.
174+
This allows to use other methods of authentication (like SASL) later as part of XMPP stream.
175+
The above behaviour is the same as default `fast_tls` behaviour (not aborting TLS connection on verification errors).
176+
167177
### `listen.c2s.tls.versions` - only for `just_tls`
168178
* **Syntax:** array of strings
169179
* **Default:** not set, all supported versions are accepted

doc/migrations/6.3.1_6.x.y.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Change of the default TLS library used for C2S connections
2+
3+
As of this release, usage of `fast_tls` for Client to Server connections (C2S) has been deprecated.
4+
`fast_tls` will be removed in a future release.
5+
6+
From now on the default TLS library for C2S is `just_tls`, which uses TLS implementation from Erlang OTP.
7+
In our load tests `just_tls` is as performant as `fast_tls` and also has better standards compliance.
8+
9+
This deprecation affects only C2S, `fast_tls` remains as a TLS implementation for S2S.
10+
11+
To continue using `fast_tls` for C2S in existing deployment after upgrade, make sure the
12+
option `tls.module` is set to `fast_tls` in `listen.c2s` section of your MongooseIM config.
13+
14+
### Channel binding for TLS
15+
16+
Note that `just_tls` currently does not implement `channel binding` for TLS, which is required for SCRAM_PLUS
17+
authentication methods. If you depend on using SCRAM_PLUS for authentication, you need to use `fast_tls`.
18+
We do plan to implement `channel binding` for `just_tls` (only for TLS 1.3) in the future.
19+
20+
### TLS handshake
21+
22+
There is a difference between `fast_tls` and `just_tls` in client authentication behaviour during TLS handshake.
23+
24+
`fast_tls` doesn't verify client certificate during TLS handshake and relies on other mechanisms, like SASL,
25+
to authenticate client. It may involve client certificate, but is executed after TLS handshake succeeded,
26+
and in case of invalid certificate will result in an error reported in message stream.
27+
28+
`just_tls` by default verifies client certificate during TLS handshake
29+
and aborts connection when client certificate is invalid. This is realised by the default settings in
30+
`just_tls` of `verify_mode` set to `peer` and `disconnect_on_failure` set to `true`.
31+
32+
If you want to have the same behaviour for `just_tls` as it was in `fast_tls` regarding TLS handshake,
33+
set `tls.disconnect_on_failure` to `false`. This is required for example when using SASL for client authentication.
34+
35+
It is also possible to completely disable client certificate verification during TLS
36+
handshake in `just_tls` by setting `tls.verify_mode` to `none`.
37+
38+
For more information regarding configuration of TLS for C2S see [Listener modules](../listeners/listen-c2s/#tls-options-for-c2s)

0 commit comments

Comments
 (0)