|
| 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