logstash-codec-cef 6.2.2-java → 6.2.5-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6769d2631f2bd27a0e5d4efebcdf5522eb2e1e843fef3d195ca804d4e68e1cb
4
- data.tar.gz: 97a5acd21e5041dbb91129819ed13b4989f269acaccbc134a26be5c6a83535e6
3
+ metadata.gz: 03b13f5507c5f1bdb5f09668a2bcb445dd5d93014b91cb9c17272b7445a787ff
4
+ data.tar.gz: a25d40bf2ccd77baacc58dd4d49b69da9c7e0b616537d306b937807915d36115
5
5
  SHA512:
6
- metadata.gz: 7a1021a17d1c87f07bf61f5583acda25f69e69c7946191056d93f0c8c0e9f1ad3aea6489b14fb78754c92507114d588ba36513d7ba9d39e861550d02aeaa7cab
7
- data.tar.gz: ff9ce9b27c9c4ae1cc5440cecd9e6113989507e030bf609683de344645536eb1a713149e70da2f87638dd553e493145c750f54e5e560d5b938829b8d0b6404e8
6
+ metadata.gz: d600beff671cd1d1a287c153bf4dac27922ea8ca109fc92d3b43c18ea69fdbf645b53067d36cd859604e8013a14010397bd6b0640b4173977ff95a6800f563be
7
+ data.tar.gz: 4ef42b63bf2c8fdf535c6c7106149dcf7df4e269fd1299708ed3a290d9ceedace58eaf46c002eaa18afb174a2670edf6abea392c120e7eea606de5bb9f8d3bec
data/CHANGELOG.md CHANGED
@@ -1,16 +1,25 @@
1
+ ## 6.2.5
2
+ - [DOC] Update link to CEF implementation guide [#97](https://github.com/logstash-plugins/logstash-codec-cef/pull/97)
3
+
4
+ ## 6.2.4
5
+ - [DOC] Emphasize importance of delimiter setting for byte stream inputs [#95](https://github.com/logstash-plugins/logstash-codec-cef/pull/95)
6
+
7
+ ## 6.2.3
8
+ - Feat: event_factory support [#94](https://github.com/logstash-plugins/logstash-codec-cef/pull/94)
9
+
1
10
  ## 6.2.2
2
11
  - Fixed invalid Field Reference that could occur when ECS mode was enabled and the CEF field `fileHash` was parsed.
3
- - Added expanded mapping for numbered `deviceCustom*` and `deviceCustom*Label` fields so that all now include numbers 1 through 15.
12
+ - Added expanded mapping for numbered `deviceCustom*` and `deviceCustom*Label` fields so that all now include numbers 1 through 15. [#89](https://github.com/logstash-plugins/logstash-codec-cef/pull/89).
4
13
 
5
14
  ## 6.2.1
6
15
  - Added field mapping to docs.
7
- - Fixed ECS mapping of `deviceMacAddress` field.
16
+ - Fixed ECS mapping of `deviceMacAddress` field. [#88](https://github.com/logstash-plugins/logstash-codec-cef/pull/88).
8
17
 
9
18
  ## 6.2.0
10
19
  - Introduce ECS Compatibility mode [#83](https://github.com/logstash-plugins/logstash-codec-cef/pull/83).
11
20
 
12
21
  ## 6.1.2
13
- - Added error log with full payload when something bad happens in decoding a message[#84](https://github.com/logstash-plugins/logstash-codec-cef/pull/84)
22
+ - Added error log with full payload when something bad happens in decoding a message [#84](https://github.com/logstash-plugins/logstash-codec-cef/pull/84)
14
23
 
15
24
  ## 6.1.1
16
25
  - Improved encoding performance, especially when encoding many extension fields [#81](https://github.com/logstash-plugins/logstash-codec-cef/pull/81)
data/docs/index.asciidoc CHANGED
@@ -20,12 +20,11 @@ include::{include_path}/plugin_header.asciidoc[]
20
20
 
21
21
  ==== Description
22
22
 
23
- Implementation of a Logstash codec for the ArcSight Common Event Format (CEF)
24
- Based on Revision 20 of Implementing ArcSight CEF, dated from June 05, 2013
25
- https://community.saas.hpe.com/dcvta86296/attachments/dcvta86296/connector-documentation/1116/1/CommonEventFormatv23.pdf
23
+ Implementation of a Logstash codec for the ArcSight Common Event Format (CEF).
24
+ It is based on https://www.microfocus.com/documentation/arcsight/arcsight-smartconnectors/pdfdoc/common-event-format-v25/common-event-format-v25.pdf[Implementing ArcSight CEF Revision 25, September 2017].
26
25
 
27
- If this codec receives a payload from an input that is not a valid CEF message, then it will
28
- produce an event with the payload as the 'message' field and a '_cefparsefailure' tag.
26
+ If this codec receives a payload from an input that is not a valid CEF message, then it
27
+ produces an event with the payload as the 'message' field and a '_cefparsefailure' tag.
29
28
 
30
29
  ==== Compatibility with the Elastic Common Schema (ECS)
31
30
 
@@ -441,14 +440,19 @@ not include timezone information, this `default_timezone` is used instead.
441
440
  If your input puts a delimiter between each CEF event, you'll want to set
442
441
  this to be that delimiter.
443
442
 
444
- For example, with the TCP input, you probably want to put this:
443
+ NOTE: Byte stream inputs such as TCP require delimiter to be specified. Otherwise input can be truncated or incorrectly split.
445
444
 
445
+ **Example**
446
+
447
+ [source,ruby]
448
+ -----
446
449
  input {
447
450
  tcp {
448
451
  codec => cef { delimiter => "\r\n" }
449
452
  # ...
450
453
  }
451
454
  }
455
+ -----
452
456
 
453
457
  This setting allows the following character sequences to have special meaning:
454
458
 
@@ -484,9 +488,7 @@ If the codec handles data from a variety of sources, the ECS recommendation is t
484
488
  ** When Logstash provides a `pipeline.ecs_compatibility` setting, its value is used as the default
485
489
  ** Otherwise, the default value is `disabled`.
486
490
 
487
- Controls this plugin's compatibility with the
488
- {ecs-ref}[Elastic Common Schema (ECS)]
489
- (ECS)].
491
+ Controls this plugin's compatibility with the {ecs-ref}[Elastic Common Schema (ECS)].
490
492
 
491
493
  [id="plugins-{type}s-{plugin}-fields"]
492
494
  ===== `fields`
@@ -6,6 +6,7 @@ require "json"
6
6
  require "time"
7
7
 
8
8
  require 'logstash/plugin_mixins/ecs_compatibility_support'
9
+ require 'logstash/plugin_mixins/event_support/event_factory_adapter'
9
10
 
10
11
  # Implementation of a Logstash codec for the ArcSight Common Event Format (CEF)
11
12
  # Based on Revision 20 of Implementing ArcSight CEF, dated from June 05, 2013
@@ -16,7 +17,8 @@ require 'logstash/plugin_mixins/ecs_compatibility_support'
16
17
  class LogStash::Codecs::CEF < LogStash::Codecs::Base
17
18
  config_name "cef"
18
19
 
19
- include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled, :v1)
20
+ include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled, :v1, :v8 => :v1)
21
+ include LogStash::PluginMixins::EventSupport::EventFactoryAdapter
20
22
 
21
23
  InvalidTimestamp = Class.new(StandardError)
22
24
 
@@ -201,7 +203,7 @@ class LogStash::Codecs::CEF < LogStash::Codecs::Base
201
203
 
202
204
  def handle(data, &block)
203
205
  original_data = data.dup
204
- event = LogStash::Event.new
206
+ event = event_factory.new_event
205
207
  event.set(raw_data_field, data) unless raw_data_field.nil?
206
208
 
207
209
  @utf8_charset.convert(data)
@@ -282,7 +284,7 @@ class LogStash::Codecs::CEF < LogStash::Codecs::Base
282
284
  rescue => e
283
285
  @logger.error("Failed to decode CEF payload. Generating failure event with payload in message field.",
284
286
  :exception => e.class, :message => e.message, :backtrace => e.backtrace, :original_data => original_data)
285
- yield LogStash::Event.new("message" => data, "tags" => ["_cefparsefailure"])
287
+ yield event_factory.new_event("message" => data, "tags" => ["_cefparsefailure"])
286
288
  end
287
289
 
288
290
  public
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-cef'
4
- s.version = '6.2.2'
4
+ s.version = '6.2.5'
5
5
  s.platform = 'java'
6
6
  s.licenses = ['Apache License (2.0)']
7
7
  s.summary = "Reads the ArcSight Common Event Format (CEF)."
@@ -22,7 +22,8 @@ Gem::Specification.new do |s|
22
22
 
23
23
  # Gem dependencies
24
24
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
25
- s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.1'
25
+ s.add_runtime_dependency "logstash-mixin-ecs_compatibility_support", '~> 1.3'
26
+ s.add_runtime_dependency "logstash-mixin-event_support", '~> 1.0'
26
27
 
27
28
  s.add_development_dependency 'logstash-devutils'
28
29
  s.add_development_dependency 'insist'
@@ -873,7 +873,7 @@ describe LogStash::Codecs::CEF do
873
873
 
874
874
  let(:results) { [] }
875
875
 
876
- ecs_compatibility_matrix(:disabled,:v1) do |ecs_select|
876
+ ecs_compatibility_matrix(:disabled, :v1, :v8 => :v1) do |ecs_select|
877
877
  before(:each) do
878
878
  allow_any_instance_of(described_class).to receive(:ecs_compatibility).and_return(ecs_compatibility)
879
879
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-cef
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.2
4
+ version: 6.2.5
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-22 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -35,7 +35,7 @@ dependencies:
35
35
  requirements:
36
36
  - - "~>"
37
37
  - !ruby/object:Gem::Version
38
- version: '1.1'
38
+ version: '1.3'
39
39
  name: logstash-mixin-ecs_compatibility_support
40
40
  prerelease: false
41
41
  type: :runtime
@@ -43,7 +43,21 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '1.1'
46
+ version: '1.3'
47
+ - !ruby/object:Gem::Dependency
48
+ requirement: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '1.0'
53
+ name: logstash-mixin-event_support
54
+ prerelease: false
55
+ type: :runtime
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.0'
47
61
  - !ruby/object:Gem::Dependency
48
62
  requirement: !ruby/object:Gem::Requirement
49
63
  requirements:
@@ -113,8 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
127
  - !ruby/object:Gem::Version
114
128
  version: '0'
115
129
  requirements: []
116
- rubyforge_project:
117
- rubygems_version: 2.6.13
130
+ rubygems_version: 3.1.6
118
131
  signing_key:
119
132
  specification_version: 4
120
133
  summary: Reads the ArcSight Common Event Format (CEF).