From d1e8fefa1ffefb7b7e69e58ef4091d74553b4506 Mon Sep 17 00:00:00 2001 From: ieQu1 <99872536+ieQu1@users.noreply.github.com> Date: Wed, 23 Mar 2022 09:51:51 +0100 Subject: [PATCH] docs(schema): Add descriptions of events --- apps/emqx/src/emqx_schema.erl | 37 ++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/apps/emqx/src/emqx_schema.erl b/apps/emqx/src/emqx_schema.erl index d38feacd3..e502bd548 100644 --- a/apps/emqx/src/emqx_schema.erl +++ b/apps/emqx/src/emqx_schema.erl @@ -1288,22 +1288,34 @@ fields("event_names") -> {"client_connected", sc( boolean(), - #{default => true} + #{ + default => true, + desc => "Connection complete" + } )}, {"client_disconnected", sc( boolean(), - #{default => true} + #{ + default => true, + desc => "Disconnect" + } )}, {"client_subscribed", sc( boolean(), - #{default => false} + #{ + default => false, + desc => "Subscribe" + } )}, {"client_unsubscribed", sc( boolean(), - #{default => false} + #{ + default => false, + desc => "Unsubscribe" + } )} ]; fields("sysmon") -> @@ -1589,10 +1601,8 @@ fields("alarm") -> default => "24h", example => "24h", desc => - "" "Retention time of deactivated alarms. Alarms are not deleted immediately\n" "when deactivated, but after the retention time.\n" - "" } )} ]; @@ -1757,7 +1767,7 @@ common_ssl_opts_schema(Defaults) -> "issue chain. That is, the host's certificate should be placed in the beginning\n" "of the file, followed by the immediate issuer certificate and so on.\n" "Although the root CA certificate is optional, it should be placed at the end of\n" - "the file if it is to be added.\n" + "the file if it is to be added." } )}, {"keyfile", @@ -1767,7 +1777,7 @@ common_ssl_opts_schema(Defaults) -> default => D("keyfile"), required => false, desc => - "PEM format private key file.
\n" + "PEM format private key file." } )}, {"verify", @@ -1805,7 +1815,7 @@ common_ssl_opts_schema(Defaults) -> "All TLS/DTLS versions to be supported.
\n" "NOTE: PSK ciphers are suppressed by 'tlsv1.3' version config
\n" "In case PSK cipher suites are intended, make sure to configured\n" - "['tlsv1.2', 'tlsv1.1'] here.\n", + "['tlsv1.2', 'tlsv1.1'] here.", validator => fun validate_tls_versions/1 } )}, @@ -1827,7 +1837,7 @@ common_ssl_opts_schema(Defaults) -> "SSL parameter renegotiation is a feature that allows a client and a server\n" "to renegotiate the parameters of the SSL connection on the fly.\n" "RFC 5746 defines a more secure way of doing this. By enabling secure renegotiation,\n" - "you drop support for the insecure renegotiation, prone to MitM attacks.\n" + "you drop support for the insecure renegotiation, prone to MitM attacks." } )} ]. @@ -1864,7 +1874,7 @@ server_ssl_opts_schema(Defaults, IsRanchListener) -> "If set to true, the server fails if the client does not have a\n" "certificate to send, that is, sends an empty certificate.\n" "If set to false, it fails only if the client sends an invalid\n" - "certificate (an empty certificate is considered valid).\n" + "certificate (an empty certificate is considered valid)." } )}, {"honor_cipher_order", @@ -1887,7 +1897,7 @@ server_ssl_opts_schema(Defaults, IsRanchListener) -> "this option to false.\n" "The default value is true. Note that disabling renegotiation can result in\n" "long-lived connections becoming unusable due to limits on\n" - "the number of messages the underlying cipher suite can encipher.\n" + "the number of messages the underlying cipher suite can encipher." } )} | [ @@ -1980,8 +1990,7 @@ ciphers_schema(Default) -> "PSK cipher suites: \"RSA-PSK-AES256-GCM-SHA384,RSA-PSK-AES256-CBC-SHA384,\n" "RSA-PSK-AES128-GCM-SHA256,RSA-PSK-AES128-CBC-SHA256,\n" "RSA-PSK-AES256-CBC-SHA,RSA-PSK-AES128-CBC-SHA,\n" - "RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA\"
\n" - "" ++ + "RSA-PSK-DES-CBC3-SHA,RSA-PSK-RC4-SHA\"
\n" ++ case Default of quic -> "NOTE: QUIC listener supports only 'tlsv1.3' ciphers
"; _ -> ""