fluent-plugin-out-http 1.1.7 → 1.2.0

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: eaea1aa37be02026c0e434b6277a1c97b5bf1a961174af05073a999376b815f5
4
- data.tar.gz: aa5919dbde2d8a694f36ab77caf8d5c57c3fa7541628ce793cc48c38e183fb06
3
+ metadata.gz: f5c36d135a72bdaa77bced9039e4ef561c669a727661165c540820d652e49824
4
+ data.tar.gz: c5ba0a229f0a1841a03dde8a74b219d67a10fc21d637b54aada4929cf847c798
5
5
  SHA512:
6
- metadata.gz: 8293600a151c072ccac26e25c5d468837d3354fba9a7374325be7a6872508db5acd8a2747b745a932bd8b3c4fadeff24587228427e28db2b3631ca6555052708
7
- data.tar.gz: 835f1180cefb9e83b10da043fa0677ba6096ca23745ab4f95372421c2407dbf5dea28413fcbc8bc7ed24be107c38272e3c119ad38482fe8f6cbed44f4c487b9a
6
+ metadata.gz: f993d90b140c13a411ddf3b97ae581b2e7b02939b9a082b66ca1961d80570471ca5e2f73c661ad056c0bc69966d6f93b9d4dae44688b3e2df8f8ba874f9cabd6
7
+ data.tar.gz: 89ada9fc27ec59901c930447c5ec43bfa4552f077a78b994c47526d909dea851f8c1071f573d64035112513f2e5a3aeb54c454831af08920fcd83f97cafc138b
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.0
4
+ * Support mutual authentication
5
+
3
6
  ## 1.1.7
4
7
  * Fix dependent Fluentd version
5
8
 
data/README.md CHANGED
@@ -18,6 +18,9 @@ A generic [fluentd][1] output plugin for sending logs to an HTTP endpoint.
18
18
  password bobpop # default: '', secret: true
19
19
  buffered true # default: false. Switch non-buffered/buffered mode
20
20
  cacert_file /etc/ssl/endpoint1.cert # default: ''
21
+ client_cert_path /path/to/client_cert.crt # default: ''
22
+ private_key_path /path/to/private_key.key # default: ''
23
+ private_key_passphrase yourpassphrase # default: ''
21
24
  token tokent # default: ''
22
25
  custom_headers {"token":"arbitrary"} # default: nil
23
26
  </match>
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "fluent-plugin-out-http"
5
- gem.version = "1.1.7"
5
+ gem.version = "1.2.0"
6
6
  gem.authors = ["Marica Odagaki"]
7
7
  gem.email = ["ento.entotto@gmail.com"]
8
8
  gem.summary = %q{A generic Fluentd output plugin to send logs to an HTTP endpoint}
@@ -2,6 +2,7 @@ require 'net/http'
2
2
  require 'uri'
3
3
  require 'yajl'
4
4
  require 'fluent/plugin/output'
5
+ require 'openssl'
5
6
 
6
7
  class Fluent::Plugin::HTTPOutput < Fluent::Plugin::Output
7
8
  Fluent::Plugin.register_output('http', self)
@@ -37,6 +38,15 @@ class Fluent::Plugin::HTTPOutput < Fluent::Plugin::Output
37
38
  # ca file to use for https request
38
39
  config_param :cacert_file, :string, :default => ''
39
40
 
41
+ # specify client sertificate
42
+ config_param :client_cert_path, :string, :default => ''
43
+
44
+ # specify private key path
45
+ config_param :private_key_path, :string, :default => ''
46
+
47
+ # specify private key passphrase
48
+ config_param :private_key_passphrase, :string, :default => '', :secret => true
49
+
40
50
  # custom headers
41
51
  config_param :custom_headers, :hash, :default => nil
42
52
 
@@ -142,6 +152,8 @@ class Fluent::Plugin::HTTPOutput < Fluent::Plugin::Output
142
152
  }
143
153
  opts[:verify_mode] = @ssl_verify_mode if opts[:use_ssl]
144
154
  opts[:ca_file] = File.join(@ca_file) if File.file?(@ca_file)
155
+ opts[:cert] = OpenSSL::X509::Certificate.new(File.read(@client_cert_path)) if File.file?(@client_cert_path)
156
+ opts[:key] = OpenSSL::PKey::RSA.new(File.read(@private_key_path), @private_key_passphrase) if File.file?(@private_key_path)
145
157
  opts
146
158
  end
147
159
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-out-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marica Odagaki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-27 00:00:00.000000000 Z
11
+ date: 2019-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yajl-ruby