logstash-input-tcp 5.0.4-java → 5.0.5-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df3e4929e62c379a3b9f904417a7cef6e0178284c292fc4d16630bee3b787703
4
- data.tar.gz: d3575b78db9c0d8bbdc8fa7f777402831795680d7a76b1aa015f8d372cc94ea8
3
+ metadata.gz: ad7840c0cf73f327b2b02bf73482c901aac8574fc021e0595e11c2fd7f084dea
4
+ data.tar.gz: 3eb145d5dad58772c79d5ba7dc404efcc118681ffe5f0556366a02d5f5ec8ed0
5
5
  SHA512:
6
- metadata.gz: 2649a80caeecea3f22603115e843d5e23dc44fe18c57c3cea09f82c497613476ffa322ce82c70b3ea122cfe63c805ab4e73985f85fd0ea5026c0eb79a9779c2e
7
- data.tar.gz: 94d67190988a00efa762d6e76c09e730baa002adb009a93929322225904c06bd379af1372b1e5cae0ef653537da0d93a6c50f50b5487207dc4a9baf544fd92c8
6
+ metadata.gz: f53b94841621db869d25b9dbc96b4833f928bd7b7a2713347c6e56ef1e76d0dc8a35f41f6b7114c2d8a487a3ab11b510329f54b8a194fca4c8d003b1930f2637
7
+ data.tar.gz: ec3ab3f25406f52f1879621b1dae31ea667f7ea3fda2f7dfbf3b472bfb8876fd0d44f203918ffacbe6c09199c3b7282e6b5a331a287f310a3ed94c4b2302520e
@@ -1,3 +1,6 @@
1
+ ## 5.0.5
2
+ - Restore SSLSUBJECT field when ssl_verify is enabled. #115
3
+
1
4
  ## 5.0.4
2
5
  - Update Netty/tc-native versions to match those in beats input #113
3
6
 
@@ -178,19 +178,19 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
178
178
  end
179
179
 
180
180
  def decode_buffer(client_ip_address, client_address, client_port, codec, proxy_address,
181
- proxy_port, tbuf)
181
+ proxy_port, tbuf, socket)
182
182
  codec.decode(tbuf) do |event|
183
183
  if @proxy_protocol
184
184
  event.set(PROXY_HOST_FIELD, proxy_address) unless event.get(PROXY_HOST_FIELD)
185
185
  event.set(PROXY_PORT_FIELD, proxy_port) unless event.get(PROXY_PORT_FIELD)
186
186
  end
187
- enqueue_decorated(event, client_ip_address, client_address, client_port)
187
+ enqueue_decorated(event, client_ip_address, client_address, client_port, socket)
188
188
  end
189
189
  end
190
190
 
191
- def flush_codec(codec, client_ip_address, client_address, client_port)
191
+ def flush_codec(codec, client_ip_address, client_address, client_port, socket)
192
192
  codec.flush do |event|
193
- enqueue_decorated(event, client_ip_address, client_address, client_port)
193
+ enqueue_decorated(event, client_ip_address, client_address, client_port, socket)
194
194
  end
195
195
  end
196
196
 
@@ -268,7 +268,7 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
268
268
  end
269
269
  end
270
270
  decode_buffer(client_ip_address, client_address, client_port, codec, proxy_address,
271
- proxy_port, tbuf)
271
+ proxy_port, tbuf, socket)
272
272
  end
273
273
  rescue EOFError
274
274
  @logger.debug? && @logger.debug("Connection closed", :client => peer)
@@ -284,13 +284,14 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
284
284
  ensure
285
285
  # catch all rescue nil on close to discard any close errors or invalid socket
286
286
  socket.close rescue nil
287
- flush_codec(codec, client_ip_address, client_address, client_port)
287
+ flush_codec(codec, client_ip_address, client_address, client_port, socket)
288
288
  end
289
289
 
290
- def enqueue_decorated(event, client_ip_address, client_address, client_port)
290
+ def enqueue_decorated(event, client_ip_address, client_address, client_port, socket)
291
291
  event.set(HOST_FIELD, client_address) unless event.get(HOST_FIELD)
292
292
  event.set(HOST_IP_FIELD, client_ip_address) unless event.get(HOST_IP_FIELD)
293
293
  event.set(PORT_FIELD, client_port) unless event.get(PORT_FIELD)
294
+ event.set(SSLSUBJECT_FIELD, socket.peer_cert.subject.to_s) if socket && @ssl_enable && @ssl_verify && event.get(SSLSUBJECT_FIELD).nil?
294
295
  decorate(event)
295
296
  @output_queue << event
296
297
  end
@@ -22,7 +22,7 @@ class DecoderImpl
22
22
  tbuf = init_first_read(channel_addr, tbuf)
23
23
  end
24
24
  @tcp.decode_buffer(@ip_address, @address, @port, @codec,
25
- @proxy_address, @proxy_port, tbuf)
25
+ @proxy_address, @proxy_port, tbuf, nil)
26
26
  end
27
27
 
28
28
  def copy
@@ -30,7 +30,7 @@ class DecoderImpl
30
30
  end
31
31
 
32
32
  def flush
33
- @tcp.flush_codec(@codec, @ip_address, @address, @port)
33
+ @tcp.flush_codec(@codec, @ip_address, @address, @port, nil)
34
34
  end
35
35
 
36
36
  private
data/version CHANGED
@@ -1 +1 @@
1
- 5.0.4
1
+ 5.0.5
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-tcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.4
4
+ version: 5.0.5
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-08 00:00:00.000000000 Z
11
+ date: 2018-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -163,7 +163,7 @@ files:
163
163
  - logstash-input-tcp.gemspec
164
164
  - spec/inputs/tcp_spec.rb
165
165
  - spec/spec_helper.rb
166
- - vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/5.0.4/logstash-input-tcp-5.0.4.jar
166
+ - vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/5.0.5/logstash-input-tcp-5.0.5.jar
167
167
  - version
168
168
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
169
169
  licenses: