fluent-plugin-syslog-tls 2.0.0 → 2.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile +0 -2
- data/Gemfile.lock +42 -52
- data/fluent-plugin-syslog-tls.gemspec +2 -2
- data/lib/syslog_tls/ssl_transport.rb +3 -3
- data/lib/syslog_tls/version.rb +1 -1
- data/test/helper.rb +0 -3
- data/test/ssl.rb +3 -1
- data/test/syslog_tls/test_ssl_transport.rb +30 -13
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 645976d5334d9574e292336a7a04fe771f42c2d6a3a4117157ac765002b0cd59
|
4
|
+
data.tar.gz: 93e1cd22473b4924810765608d9b6741a30faea7f416169f33f4eec07661a607
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acbe5677f687a549b3133af9a19079ee6ffdba5bc0640b2ddd8b44f0487d6b19c41bd2dd78e4406bf358624600d7509190b29c8048c52a59225998a3a4eae14e
|
7
|
+
data.tar.gz: 5e1c5004e04d102c9b143c37d12117032ac2aec885ad7429bdc68c3887cb75224d9ad46e6325bb38c517cfb706bf27bc036f7d622c49e8cde2cca15d88b70347
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,77 +1,67 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fluent-plugin-syslog-tls (2.0.
|
4
|
+
fluent-plugin-syslog-tls (2.1.0.rc1)
|
5
5
|
fluentd (>= 0.14.0, < 2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
public_suffix (>= 2.0.2, <
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
crack (0.4.3)
|
20
|
-
safe_yaml (~> 1.0.0)
|
21
|
-
dig_rb (1.0.1)
|
22
|
-
docile (1.3.1)
|
23
|
-
fluentd (1.5.0)
|
10
|
+
addressable (2.8.1)
|
11
|
+
public_suffix (>= 2.0.2, < 6.0)
|
12
|
+
concurrent-ruby (1.1.10)
|
13
|
+
cool.io (1.7.1)
|
14
|
+
crack (0.4.5)
|
15
|
+
rexml
|
16
|
+
docile (1.4.0)
|
17
|
+
fluentd (1.15.3)
|
18
|
+
bundler
|
24
19
|
cool.io (>= 1.4.5, < 2.0.0)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
serverengine (>= 2.0.4, < 3.0.0)
|
20
|
+
http_parser.rb (>= 0.5.1, < 0.9.0)
|
21
|
+
msgpack (>= 1.3.1, < 2.0.0)
|
22
|
+
serverengine (>= 2.3.0, < 3.0.0)
|
29
23
|
sigdump (~> 0.2.2)
|
30
|
-
strptime (>= 0.2.
|
31
|
-
tzinfo (
|
24
|
+
strptime (>= 0.2.4, < 1.0.0)
|
25
|
+
tzinfo (>= 1.0, < 3.0)
|
32
26
|
tzinfo-data (~> 1.0)
|
27
|
+
webrick (>= 1.4.2, < 1.8.0)
|
33
28
|
yajl-ruby (~> 1.0)
|
34
|
-
hashdiff (0.
|
35
|
-
http_parser.rb (0.
|
36
|
-
|
37
|
-
minitest (
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
serverengine (2.1.1)
|
29
|
+
hashdiff (1.0.1)
|
30
|
+
http_parser.rb (0.8.0)
|
31
|
+
minitest (5.17.0)
|
32
|
+
minitest-stub_any_instance (1.0.3)
|
33
|
+
msgpack (1.6.0)
|
34
|
+
power_assert (2.0.3)
|
35
|
+
public_suffix (5.0.1)
|
36
|
+
rake (13.0.6)
|
37
|
+
rexml (3.2.5)
|
38
|
+
serverengine (2.3.1)
|
45
39
|
sigdump (~> 0.2.2)
|
46
40
|
sigdump (0.2.4)
|
47
|
-
simplecov (0.
|
41
|
+
simplecov (0.22.0)
|
48
42
|
docile (~> 1.1)
|
49
|
-
|
50
|
-
|
51
|
-
simplecov-html (0.
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
test-unit (3.3.3)
|
43
|
+
simplecov-html (~> 0.11)
|
44
|
+
simplecov_json_formatter (~> 0.1)
|
45
|
+
simplecov-html (0.12.3)
|
46
|
+
simplecov_json_formatter (0.1.4)
|
47
|
+
strptime (0.2.5)
|
48
|
+
test-unit (3.5.7)
|
56
49
|
power_assert
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
tzinfo (1.2.5)
|
61
|
-
thread_safe (~> 0.1)
|
62
|
-
tzinfo-data (1.2019.1)
|
50
|
+
tzinfo (2.0.5)
|
51
|
+
concurrent-ruby (~> 1.0)
|
52
|
+
tzinfo-data (1.2022.7)
|
63
53
|
tzinfo (>= 1.0.0)
|
64
|
-
webmock (3.
|
65
|
-
addressable (>= 2.
|
54
|
+
webmock (3.18.1)
|
55
|
+
addressable (>= 2.8.0)
|
66
56
|
crack (>= 0.3.2)
|
67
|
-
hashdiff
|
68
|
-
|
57
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
58
|
+
webrick (1.7.0)
|
59
|
+
yajl-ruby (1.4.3)
|
69
60
|
|
70
61
|
PLATFORMS
|
71
62
|
ruby
|
72
63
|
|
73
64
|
DEPENDENCIES
|
74
|
-
coveralls
|
75
65
|
fluent-plugin-syslog-tls!
|
76
66
|
minitest (~> 5.8)
|
77
67
|
minitest-stub_any_instance (~> 1.0.0)
|
@@ -81,4 +71,4 @@ DEPENDENCIES
|
|
81
71
|
webmock (~> 3.0)
|
82
72
|
|
83
73
|
BUNDLED WITH
|
84
|
-
|
74
|
+
2.3.26
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright 2016 Acquia, Inc.
|
2
|
-
# Copyright 2016-
|
2
|
+
# Copyright 2016-2023 t.e.morgan.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
31
31
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
32
32
|
s.require_paths = ['lib']
|
33
|
-
s.required_ruby_version = '>= 2.
|
33
|
+
s.required_ruby_version = '>= 2.5'
|
34
34
|
|
35
35
|
s.add_runtime_dependency 'fluentd', [">= 0.14.0", "< 2"]
|
36
36
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright 2016 Acquia, Inc.
|
2
|
-
# Copyright 2016-
|
2
|
+
# Copyright 2016-2023 t.e.morgan.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -29,7 +29,7 @@ module SyslogTls
|
|
29
29
|
|
30
30
|
attr_writer :retries
|
31
31
|
|
32
|
-
def initialize(host, port, idle_timeout: nil, ca_cert: 'system', client_cert: nil, client_key: nil, verify_cert_name: true, ssl_version: :
|
32
|
+
def initialize(host, port, idle_timeout: nil, ca_cert: 'system', client_cert: nil, client_key: nil, verify_cert_name: true, ssl_version: :TLS1_2, max_retries: 1)
|
33
33
|
@host = host
|
34
34
|
@port = port
|
35
35
|
@idle_timeout = idle_timeout
|
@@ -96,7 +96,7 @@ module SyslogTls
|
|
96
96
|
|
97
97
|
ctx = OpenSSL::SSL::SSLContext.new
|
98
98
|
ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
99
|
-
ctx.
|
99
|
+
ctx.min_version = ssl_version
|
100
100
|
|
101
101
|
ctx.verify_hostname = verify_cert_name != false
|
102
102
|
|
data/lib/syslog_tls/version.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -12,13 +12,10 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
require 'coveralls'
|
16
15
|
require 'simplecov'
|
17
16
|
|
18
17
|
SimpleCov.start
|
19
18
|
|
20
|
-
Coveralls.wear! if ENV['TRAVIS']
|
21
|
-
|
22
19
|
require 'test/unit'
|
23
20
|
require 'fluent/test'
|
24
21
|
require 'minitest/pride'
|
data/test/ssl.rb
CHANGED
@@ -2,12 +2,14 @@ require 'socket'
|
|
2
2
|
require 'openssl'
|
3
3
|
|
4
4
|
module SSLTestHelper
|
5
|
-
def ssl_server
|
5
|
+
def ssl_server(min_version: nil, max_version: nil)
|
6
6
|
@ssl_server ||= begin
|
7
7
|
tcp_server = TCPServer.new("localhost", 33000 + Random.rand(1000))
|
8
8
|
ssl_context = OpenSSL::SSL::SSLContext.new
|
9
9
|
ssl_context.cert = certificate
|
10
10
|
ssl_context.key = rsa_key
|
11
|
+
ssl_context.min_version = min_version if min_version
|
12
|
+
ssl_context.max_version = max_version if max_version
|
11
13
|
OpenSSL::SSL::SSLServer.new(tcp_server, ssl_context)
|
12
14
|
end
|
13
15
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright 2016 Acquia, Inc.
|
2
|
-
# Copyright 2016 t.e.morgan.
|
2
|
+
# Copyright 2016-2023 t.e.morgan.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -20,19 +20,36 @@ require 'syslog_tls/ssl_transport'
|
|
20
20
|
class SSLTransportTest < Test::Unit::TestCase
|
21
21
|
include SSLTestHelper
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
23
|
+
# srvr-min srvr-max clnt-min should-raise?
|
24
|
+
[ [:TLS1_2, :TLS1_2, :TLS1_2],
|
25
|
+
[:TLS1_2, :TLS1_3, :TLS1_2],
|
26
|
+
[:TLS1_3, :TLS1_3, :TLS1_2],
|
27
|
+
[:TLS1_2, :TLS1_2, :TLS1_3, true],
|
28
|
+
[:TLS1_2, :TLS1_3, :TLS1_3],
|
29
|
+
[:TLS1_3, :TLS1_3, :TLS1_3],
|
30
|
+
].each do |(server_min, server_max, client_min, should_raise)|
|
31
|
+
define_method "test_#{server_min}-#{server_max}_server_#{client_min}_client" do
|
32
|
+
Thread.report_on_exception = false
|
33
|
+
blk = lambda do
|
34
|
+
server = ssl_server(min_version: server_min, max_version: server_max)
|
35
|
+
st = Thread.new {
|
36
|
+
client = server.accept
|
37
|
+
assert_equal "TESTTEST2\n", client.gets
|
38
|
+
client.close
|
39
|
+
}
|
40
|
+
t = SyslogTls::SSLTransport.new("localhost", server.addr[1], ca_cert: false, ssl_version: client_min)
|
41
|
+
t.write("TEST")
|
42
|
+
t.write("TEST2\n")
|
43
|
+
st.join
|
44
|
+
end
|
45
|
+
if should_raise
|
46
|
+
assert_raises OpenSSL::SSL::SSLError, &blk
|
47
|
+
else
|
48
|
+
blk.call
|
49
|
+
end
|
50
|
+
ensure
|
51
|
+
Thread.report_on_exception = true
|
34
52
|
end
|
35
|
-
st.join
|
36
53
|
end
|
37
54
|
|
38
55
|
def test_retry
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-syslog-tls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thomas morgan
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -150,7 +150,7 @@ homepage: https://github.com/zarqman/fluent-plugin-syslog-tls
|
|
150
150
|
licenses:
|
151
151
|
- Apache v2
|
152
152
|
metadata: {}
|
153
|
-
post_install_message:
|
153
|
+
post_install_message:
|
154
154
|
rdoc_options: []
|
155
155
|
require_paths:
|
156
156
|
- lib
|
@@ -158,15 +158,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
158
|
requirements:
|
159
159
|
- - ">="
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version: '2.
|
161
|
+
version: '2.5'
|
162
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - "
|
164
|
+
- - ">"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 1.3.1
|
167
167
|
requirements: []
|
168
|
-
rubygems_version: 3.
|
169
|
-
signing_key:
|
168
|
+
rubygems_version: 3.3.26
|
169
|
+
signing_key:
|
170
170
|
specification_version: 4
|
171
171
|
summary: Fluent Syslog TLS output plugin
|
172
172
|
test_files:
|