Skip to content

Commit a725dcb

Browse files
authored
Standardized SSL settings (#53)
This commit standardized the exiting SSL settings, added the ssl_cipher_suites option and fixed the server mode with SSL enabled functionality.
1 parent 9b35c07 commit a725dcb

File tree

5 files changed

+479
-38
lines changed

5 files changed

+479
-38
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 6.2.0
2+
- Reviewed and deprecated SSL settings to comply with Logstash's naming convention [#53](https://github.com/logstash-plugins/logstash-output-tcp/pull/53)
3+
- Deprecated `ssl_enable` in favor of `ssl_enabled`
4+
- Deprecated `ssl_cert` in favor of `ssl_certificate`
5+
- Deprecated `ssl_verify` in favor of `ssl_client_authentication` when mode is `server`
6+
- Deprecated `ssl_verify` in favor of `ssl_verification_mode` when mode is `client`
7+
- Added `ssl_cipher_suites` configuration
8+
- Added SSL configuration validations
9+
110
## 6.1.2
211
- Changed the client mode to write using the non-blocking method. [#52](https://github.com/logstash-plugins/logstash-output-tcp/pull/52)
312

docs/index.asciidoc

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,18 @@ This plugin supports the following configuration options plus the <<plugins-{typ
4040
| <<plugins-{type}s-{plugin}-mode>> |<<string,string>>, one of `["server", "client"]`|No
4141
| <<plugins-{type}s-{plugin}-port>> |<<number,number>>|Yes
4242
| <<plugins-{type}s-{plugin}-reconnect_interval>> |<<number,number>>|No
43-
| <<plugins-{type}s-{plugin}-ssl_cacert>> |a valid filesystem path|No
44-
| <<plugins-{type}s-{plugin}-ssl_cert>> |a valid filesystem path|No
45-
| <<plugins-{type}s-{plugin}-ssl_enable>> |<<boolean,boolean>>|No
43+
| <<plugins-{type}s-{plugin}-ssl_cacert>> |a valid filesystem path|__Deprecated__
44+
| <<plugins-{type}s-{plugin}-ssl_cert>> |a valid filesystem path|__Deprecated__
45+
| <<plugins-{type}s-{plugin}-ssl_certificate>> |a valid filesystem path|No
46+
| <<plugins-{type}s-{plugin}-ssl_certificate_authorities>> |<<array,array>>|No
47+
| <<plugins-{type}s-{plugin}-ssl_cipher_suites>> |<<string,string>>|No
48+
| <<plugins-{type}s-{plugin}-ssl_client_authentication>> |<<string,string>>, one of `["none", "optional", "required"]`|No
49+
| <<plugins-{type}s-{plugin}-ssl_enable>> |<<boolean,boolean>>|__Deprecated__
50+
| <<plugins-{type}s-{plugin}-ssl_enabled>> |<<boolean,boolean>>|No
4651
| <<plugins-{type}s-{plugin}-ssl_key>> |a valid filesystem path|No
4752
| <<plugins-{type}s-{plugin}-ssl_key_passphrase>> |<<password,password>>|No
4853
| <<plugins-{type}s-{plugin}-ssl_supported_protocols>> |<<string,string>>|No
54+
| <<plugins-{type}s-{plugin}-ssl_verification_mode>> |<<string,string>>, one of `["full", "none"]`|No
4955
| <<plugins-{type}s-{plugin}-ssl_verify>> |<<boolean,boolean>>|No
5056
|=======================================================================
5157

@@ -93,6 +99,7 @@ When connect failed,retry interval in sec.
9399

94100
[id="plugins-{type}s-{plugin}-ssl_cacert"]
95101
===== `ssl_cacert`
102+
deprecated[6.2.0, Replaced by <<plugins-{type}s-{plugin}-ssl_certificate_authorities>>]
96103

97104
* Value type is <<path,path>>
98105
* There is no default value for this setting.
@@ -101,14 +108,69 @@ The SSL CA certificate, chainfile or CA path. The system CA path is automaticall
101108

102109
[id="plugins-{type}s-{plugin}-ssl_cert"]
103110
===== `ssl_cert`
111+
deprecated[6.2.0, Replaced by <<plugins-{type}s-{plugin}-ssl_certificate>>]
104112

105113
* Value type is <<path,path>>
106114
* There is no default value for this setting.
107115

108116
SSL certificate path
109117

118+
[id="plugins-{type}s-{plugin}-ssl_certificate"]
119+
===== `ssl_certificate`
120+
121+
* Value type is <<path,path>>
122+
* There is no default value for this setting.
123+
124+
Path to certificate in PEM format. This certificate will be presented
125+
to the other part of the TLS connection.
126+
127+
[id="plugins-{type}s-{plugin}-ssl_certificate_authorities"]
128+
===== `ssl_certificate_authorities`
129+
130+
* Value type is <<array,array>>
131+
* Default value is `[]`
132+
133+
Validate client certificate or certificate chain against these authorities.
134+
You can define multiple files. All the certificates will be read and added to the trust store.
135+
The system CA path is automatically included.
136+
137+
[id="plugins-{type}s-{plugin}-ssl_cipher_suites"]
138+
===== `ssl_cipher_suites`
139+
140+
* Value type is a list of <<string,string>>
141+
* There is no default value for this setting
142+
143+
The list of cipher suites to use, listed by priorities.
144+
Supported cipher suites vary depending on the Java and protocol versions.
145+
146+
[id="plugins-{type}s-{plugin}-ssl_client_authentication"]
147+
===== `ssl_client_authentication`
148+
149+
* Value can be any of: `none`, `optional`, `required`
150+
* Default value is `none`
151+
152+
Controls the server's behavior in regard to requesting a certificate from client connections:
153+
`none` disables the client authentication. `required` forces a client to present a certificate, while `optional` requests a client certificate
154+
but the client is not required to present one.
155+
156+
When mutual TLS is enabled (`optional` or `required`), the certificate presented by the client must be signed by trusted
157+
<<plugins-{type}s-{plugin}-ssl_certificate_authorities>> (CAs).
158+
Please note that the server does not validate the client certificate CN (Common Name) or SAN (Subject Alternative Name).
159+
160+
NOTE: This setting can be used only if <<plugins-{type}s-{plugin}-mode>> is `server` and <<plugins-{type}s-{plugin}-ssl_certificate_authorities>> is set.
161+
162+
110163
[id="plugins-{type}s-{plugin}-ssl_enable"]
111164
===== `ssl_enable`
165+
deprecated[6.2.0, Replaced by <<plugins-{type}s-{plugin}-ssl_enabled>>]
166+
167+
* Value type is <<boolean,boolean>>
168+
* Default value is `false`
169+
170+
Enable SSL (must be set for other `ssl_` options to take effect).
171+
172+
[id="plugins-{type}s-{plugin}-ssl_enabled"]
173+
===== `ssl_enabled`
112174

113175
* Value type is <<boolean,boolean>>
114176
* Default value is `false`
@@ -145,17 +207,32 @@ NOTE: If you configure the plugin to use `'TLSv1.1'` on any recent JVM, such as
145207
the protocol is disabled by default and needs to be enabled manually by changing `jdk.tls.disabledAlgorithms` in
146208
the *$JDK_HOME/conf/security/java.security* configuration file. That is, `TLSv1.1` needs to be removed from the list.
147209

210+
[id="plugins-{type}s-{plugin}-ssl_verification_mode"]
211+
===== `ssl_verification_mode`
212+
213+
* Value can be any of: `full`, `none`
214+
* Default value is `full`
215+
216+
Defines how to verify the certificates presented by another part in the TLS connection:
217+
218+
`full` validates that the server certificate has an issue date that's within
219+
the not_before and not_after dates; chains to a trusted Certificate Authority (CA), and
220+
has a hostname or IP address that matches the names within the certificate.
221+
222+
`none` performs no certificate validation.
223+
224+
NOTE: This setting can be used only if <<plugins-{type}s-{plugin}-mode>> is `client`.
225+
148226
[id="plugins-{type}s-{plugin}-ssl_verify"]
149227
===== `ssl_verify`
228+
deprecated[6.2.0, Replaced by <<plugins-{type}s-{plugin}-ssl_client_authentication>> and <<plugins-{type}s-{plugin}-ssl_verification_mode>>]
150229

151230
* Value type is <<boolean,boolean>>
152231
* Default value is `false`
153232

154233
Verify the identity of the other end of the SSL connection against the CA.
155234
For input, sets the field `sslsubject` to that of the client certificate.
156235

157-
158-
159236
[id="plugins-{type}s-{plugin}-common-options"]
160237
include::{include_path}/{type}.asciidoc[]
161238

0 commit comments

Comments
 (0)