fluent-plugin-secure-forward-addproxy 0.3.3dev2
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 +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +444 -0
- data/Rakefile +11 -0
- data/bin/console +14 -0
- data/bin/secure-forward-ca-generate +34 -0
- data/bin/setup +7 -0
- data/example/auth_client.conf +19 -0
- data/example/auth_server.conf +30 -0
- data/example/cert_client.conf +21 -0
- data/example/cert_server.conf +35 -0
- data/example/certs/cert.pem +18 -0
- data/example/certs/key.pem +15 -0
- data/example/client.conf +24 -0
- data/example/client_proxy.conf +26 -0
- data/example/insecure_client.conf +23 -0
- data/example/insecure_server.conf +10 -0
- data/example/server.conf +13 -0
- data/fluent-plugin-secure-forward-addproxy.gemspec +23 -0
- data/lib/fluent/plugin/in_secure_forward.rb +278 -0
- data/lib/fluent/plugin/input_session.rb +219 -0
- data/lib/fluent/plugin/openssl_util.rb +38 -0
- data/lib/fluent/plugin/out_secure_forward.rb +280 -0
- data/lib/fluent/plugin/output_node.rb +348 -0
- data/lib/fluent/plugin/secure/forward/addproxy/version.rb +11 -0
- data/lib/fluent/plugin/secure/forward/addproxy.rb +13 -0
- data/lib/fluent/plugin/secure/forward/v033dev2/addproxy/version.rb +13 -0
- data/lib/fluent/plugin/secure/forward/v033dev2/addproxy.rb +15 -0
- data/lib/fluent/plugin/secure_forward/cert_util.rb +85 -0
- data/test/helper.rb +66 -0
- data/test/plugin/test_in_secure_forward.rb +237 -0
- data/test/plugin/test_input_session.rb +43 -0
- data/test/plugin/test_out_secure_forward.rb +147 -0
- metadata +169 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2855715708739b31522d45e2bf0f68e299aafc97
|
4
|
+
data.tar.gz: fb0b48ccc7435b6da6e4add699d922bd23736fa3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 195d98a4b9e40bca34c986d3435844f2f7572ba37469a4be13e4181c79f880903094d91fde42c16d770f8ef850161a12c53543a4df0649d533bb9041384b5547
|
7
|
+
data.tar.gz: 3dd3e8f005e2051a4a54f3a9c0cc0a7cbba68736c150c711f594006ce49adb7fd3d197dfa184aa4ac6592eff679244bf6c7175722c8606e98f49eaaad44c821a
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,444 @@
|
|
1
|
+
# fluent-plugin-secure-forward
|
2
|
+
|
3
|
+
[Fluentd](http://fluentd.org) input/output plugin to forward fluentd messages over SSL with authentication.
|
4
|
+
|
5
|
+
This plugin makes you to be able to:
|
6
|
+
|
7
|
+
* protect your data from others in transferring with SSL
|
8
|
+
* with certificate signed and registered correctly/publicly
|
9
|
+
* with private CA certificates generated by users
|
10
|
+
* with automatically generated and self-signed certificates **in vulnerable way**
|
11
|
+
* authenticate by shared\_key check from both of client(out\_secure\_forward) and server(in\_secure\_forward)
|
12
|
+
* authenticate with username / password pairs
|
13
|
+
|
14
|
+
## Installation
|
15
|
+
install with gem or fluent-gem command as:
|
16
|
+
|
17
|
+
```
|
18
|
+
### native gem
|
19
|
+
$ gem install fluent-plugin-secure-forward
|
20
|
+
|
21
|
+
### fluentd gem
|
22
|
+
$ fluent-gem install fluent-plugin-secure-forward
|
23
|
+
```
|
24
|
+
|
25
|
+
### Using SSL certificates issued from trusted CA
|
26
|
+
|
27
|
+
To communicate over SSL with valid certificate issued from public CA, configure params below for input plugin:
|
28
|
+
|
29
|
+
* `secure`: set `yes` or `true`
|
30
|
+
* `cert_path`: set path of certificate file issued from CA
|
31
|
+
* `private_key_path`: set path of private key file
|
32
|
+
* `private_key_passphrase`: set passphrase of private key
|
33
|
+
|
34
|
+
```apache
|
35
|
+
<source>
|
36
|
+
type secure_forward
|
37
|
+
|
38
|
+
# bind 0.0.0.0 # default
|
39
|
+
# port 24284 # default
|
40
|
+
self_hostname server.fqdn.example.com
|
41
|
+
shared_key secret_string
|
42
|
+
|
43
|
+
secure yes
|
44
|
+
|
45
|
+
cert_path /path/for/certificate/cert.pem
|
46
|
+
private_key_path /path/for/certificate/key.pem
|
47
|
+
private_key_passphrase secret_foo_bar_baz
|
48
|
+
</source>
|
49
|
+
```
|
50
|
+
|
51
|
+
For output plugin, specify just 2 options below:
|
52
|
+
|
53
|
+
* `secure`: set `yes` or `true`
|
54
|
+
* `enable_strict_verification`: specify `yes` or `true` to verify FQDN of servers (input plugin)
|
55
|
+
|
56
|
+
```apache
|
57
|
+
<match secret.data.**>
|
58
|
+
type secure_forward
|
59
|
+
|
60
|
+
self_hostname client.fqdn.local
|
61
|
+
shared_key secret_string
|
62
|
+
|
63
|
+
secure yes
|
64
|
+
enable_strict_verification yes
|
65
|
+
|
66
|
+
<server>
|
67
|
+
host server.fqdn.example.com # or IP
|
68
|
+
# port 24284
|
69
|
+
</server>
|
70
|
+
<server>
|
71
|
+
host 203.0.113.8 # ip address to connect
|
72
|
+
hostlabel server.fqdn.example.com # specify hostlabel for FQDN verification if ipaddress is used for host
|
73
|
+
</server>
|
74
|
+
</match>
|
75
|
+
```
|
76
|
+
|
77
|
+
### Using private CA file and key
|
78
|
+
|
79
|
+
This plugin has a simple utility command to generate private CA cert/key files just for secure-forward.
|
80
|
+
|
81
|
+
```
|
82
|
+
$ secure-forward-ca-generate /path/for/dir/of/certs "passphrase for private CA secret key"
|
83
|
+
```
|
84
|
+
|
85
|
+
This command generates `ca_cert.pem` and `ca_key.pem` on `/path/for/dir/of/certs`. For SSL communication with private CA, users must deploy both files for input plugins, and also must deploy `ca_cert.pem` for output plugins.
|
86
|
+
And then, configure Fluentd with these files and the passphrase. With this configuration, server certificates are automatically generated and issued by private CA.
|
87
|
+
|
88
|
+
```apache
|
89
|
+
<source>
|
90
|
+
type secure_forward
|
91
|
+
|
92
|
+
# bind 0.0.0.0 # default
|
93
|
+
# port 24284 # default
|
94
|
+
self_hostname myserver.local
|
95
|
+
shared_key secret_string
|
96
|
+
|
97
|
+
secure yes
|
98
|
+
|
99
|
+
ca_cert_path /path/for/certificate/ca_cert.pem
|
100
|
+
ca_private_key_path /path/for/certificate/ca_key.pem
|
101
|
+
ca_private_key_passphrase passphrase for private CA secret key
|
102
|
+
</source>
|
103
|
+
```
|
104
|
+
|
105
|
+
For output plugin, specify just 2 options below:
|
106
|
+
|
107
|
+
* `secure`: set `yes` or `true`
|
108
|
+
* `enable_strict_verification`: specify `yes` or `true`
|
109
|
+
|
110
|
+
```apache
|
111
|
+
<match secret.data.**>
|
112
|
+
type secure_forward
|
113
|
+
|
114
|
+
self_hostname myclient.local
|
115
|
+
shared_key secret_string
|
116
|
+
|
117
|
+
secure yes
|
118
|
+
ca_cert_path /path/for/certificate/ca_cert.pem
|
119
|
+
# enable_strict_verification yes
|
120
|
+
|
121
|
+
<server>
|
122
|
+
host server.fqdn.example.com # or IP
|
123
|
+
# port 24284
|
124
|
+
</server>
|
125
|
+
<server>
|
126
|
+
host 203.0.113.8 # ip address to connect
|
127
|
+
hostlabel server.fqdn.example.com # specify hostlabel for FQDN verification if ipaddress is used for host
|
128
|
+
</server>
|
129
|
+
</match>
|
130
|
+
```
|
131
|
+
|
132
|
+
### Using insecure self-signed certificates
|
133
|
+
|
134
|
+
**This is very dangerous and vulnerable to man-in-the-middle attacks**
|
135
|
+
|
136
|
+
For just testing or data center internal communications, this plugin has a feature to communicate without any verification of certificates. Turn `secure` option to `false` to use this feature.
|
137
|
+
|
138
|
+
```apache
|
139
|
+
<source>
|
140
|
+
type secure_forward
|
141
|
+
|
142
|
+
self_hostname myserver.local
|
143
|
+
shared_key secret_string
|
144
|
+
|
145
|
+
secure no
|
146
|
+
</source>
|
147
|
+
```
|
148
|
+
|
149
|
+
Configure output plugin just same way:
|
150
|
+
|
151
|
+
```apache
|
152
|
+
<match data.**>
|
153
|
+
type secure_forward
|
154
|
+
|
155
|
+
self_hostname myclient.local
|
156
|
+
shared_key secret_string
|
157
|
+
|
158
|
+
secure no
|
159
|
+
|
160
|
+
<server>
|
161
|
+
host server.fqdn.example.com # or IP
|
162
|
+
</server>
|
163
|
+
</match>
|
164
|
+
```
|
165
|
+
|
166
|
+
In this mode, output plugin cannot verify peer node of connections. Man-in-the-middle attackers can spoof messages from output plugins under many various situations.
|
167
|
+
|
168
|
+
## Configuration
|
169
|
+
|
170
|
+
### SecureForwardInput
|
171
|
+
|
172
|
+
Default settings:
|
173
|
+
* listen 0.0.0.0:24284
|
174
|
+
* `bind 192.168.0.101`
|
175
|
+
* `port 24284`
|
176
|
+
* allow to accept from any sources
|
177
|
+
* allow to connect without authentications
|
178
|
+
* use certificate automatically generated
|
179
|
+
* `generate_private_key_length 2048`
|
180
|
+
* `generate_cert_country US`
|
181
|
+
* `generate_cert_state CA`
|
182
|
+
* `generate_cert_locality Mountain View`
|
183
|
+
* `generate_cert_common_name SAME_WITH_SELF_HOSTNAME_PARAMETER`
|
184
|
+
* use TLSv1.2
|
185
|
+
|
186
|
+
Minimal configurations like below:
|
187
|
+
|
188
|
+
```apache
|
189
|
+
<source>
|
190
|
+
type secure_forward
|
191
|
+
shared_key secret_string
|
192
|
+
self_hostname server.fqdn.local # This fqdn is used as CN (Common Name) of certificates
|
193
|
+
|
194
|
+
secure yes
|
195
|
+
# and configurations for certs
|
196
|
+
</source>
|
197
|
+
```
|
198
|
+
|
199
|
+
To check username/password from clients, like this:
|
200
|
+
|
201
|
+
```apache
|
202
|
+
<source>
|
203
|
+
type secure_forward
|
204
|
+
shared_key secret_string
|
205
|
+
self_hostname server.fqdn.local
|
206
|
+
|
207
|
+
secure yes
|
208
|
+
# and configurations for certs
|
209
|
+
|
210
|
+
authentication yes # Deny clients without valid username/password
|
211
|
+
<user>
|
212
|
+
username tagomoris
|
213
|
+
password foobar012
|
214
|
+
</user>
|
215
|
+
<user>
|
216
|
+
username frsyuki
|
217
|
+
password yakiniku
|
218
|
+
</user>
|
219
|
+
</source>
|
220
|
+
```
|
221
|
+
|
222
|
+
To deny unknown source IP/hosts:
|
223
|
+
|
224
|
+
```apache
|
225
|
+
<source>
|
226
|
+
type secure_forward
|
227
|
+
shared_key secret_string
|
228
|
+
self_hostname server.fqdn.local
|
229
|
+
|
230
|
+
secure yes
|
231
|
+
# and configurations for certs
|
232
|
+
|
233
|
+
allow_anonymous_source no # Allow to accept from nodes of <client>
|
234
|
+
<client>
|
235
|
+
host 192.168.10.30
|
236
|
+
</client>
|
237
|
+
<client>
|
238
|
+
host your.host.fqdn.local
|
239
|
+
# wildcard (ex: *.host.fqdn.local) NOT Supported now
|
240
|
+
</client>
|
241
|
+
<client>
|
242
|
+
network 192.168.16.0/24 # network address specification
|
243
|
+
</client>
|
244
|
+
</source>
|
245
|
+
```
|
246
|
+
|
247
|
+
You can use both of username/password check and client check:
|
248
|
+
|
249
|
+
```apache
|
250
|
+
<source>
|
251
|
+
type secure_forward
|
252
|
+
shared_key secret_string
|
253
|
+
self_hostname server.fqdn.local
|
254
|
+
|
255
|
+
secure yes
|
256
|
+
# and configurations for certs
|
257
|
+
|
258
|
+
allow_anonymous_source no # Allow to accept from nodes of <client>
|
259
|
+
authentication yes # Deny clients without valid username/password
|
260
|
+
<user>
|
261
|
+
username tagomoris
|
262
|
+
password foobar012
|
263
|
+
</user>
|
264
|
+
<user>
|
265
|
+
username frsyuki
|
266
|
+
password sukiyaki
|
267
|
+
</user>
|
268
|
+
<user>
|
269
|
+
username repeatedly
|
270
|
+
password sushi
|
271
|
+
</user>
|
272
|
+
<client>
|
273
|
+
host 192.168.10.30 # allow all users to connect from 192.168.10.30
|
274
|
+
</client>
|
275
|
+
<client>
|
276
|
+
host 192.168.10.31
|
277
|
+
users tagomoris,frsyuki # deny repeatedly from 192.168.10.31
|
278
|
+
</client>
|
279
|
+
<client>
|
280
|
+
host 192.168.10.32
|
281
|
+
shared_key less_secret_string # limited shared_key for 192.168.10.32
|
282
|
+
users repeatedly # and repatedly only
|
283
|
+
</client>
|
284
|
+
</source>
|
285
|
+
```
|
286
|
+
|
287
|
+
### SecureForwardOutput
|
288
|
+
|
289
|
+
Minimal configurations like this:
|
290
|
+
|
291
|
+
```apache
|
292
|
+
<match secret.data.**>
|
293
|
+
type secure_forward
|
294
|
+
shared_key secret_string
|
295
|
+
self_hostname client.fqdn.local
|
296
|
+
|
297
|
+
secure yes
|
298
|
+
# and configurations for certs/verification
|
299
|
+
|
300
|
+
<server>
|
301
|
+
host server.fqdn.local # or IP
|
302
|
+
# port 24284
|
303
|
+
</server>
|
304
|
+
</match>
|
305
|
+
```
|
306
|
+
|
307
|
+
Without hostname ACL (and it's not implemented yet), `self_hostname` is not checked in any state. `${hostname}` placeholder is available for such cases.
|
308
|
+
|
309
|
+
```apache
|
310
|
+
<match secret.data.**>
|
311
|
+
type secure_forward
|
312
|
+
shared_key secret_string
|
313
|
+
self_hostname ${hostname}
|
314
|
+
|
315
|
+
secure yes
|
316
|
+
# and configurations for certs/verification
|
317
|
+
|
318
|
+
<server>
|
319
|
+
host server.fqdn.local # or IP
|
320
|
+
# port 24284
|
321
|
+
</server>
|
322
|
+
</match>
|
323
|
+
```
|
324
|
+
|
325
|
+
When specified 2 or more `<server>`, this plugin uses these nodes in simple round-robin order. And servers with `standby yes` will be selected until all of non-standby servers goes down.
|
326
|
+
|
327
|
+
If server requires username/password, set `username` and `password` in `<server>` section:
|
328
|
+
|
329
|
+
```apache
|
330
|
+
<match secret.data.**>
|
331
|
+
type secure_forward
|
332
|
+
shared_key secret_string
|
333
|
+
self_hostname client.fqdn.local
|
334
|
+
|
335
|
+
secure yes
|
336
|
+
# and configurations for certs/verification
|
337
|
+
|
338
|
+
<server>
|
339
|
+
host first.fqdn.local
|
340
|
+
hostlabel server.fqdn.local
|
341
|
+
username repeatedly
|
342
|
+
password sushi
|
343
|
+
</server>
|
344
|
+
<server>
|
345
|
+
host second.fqdn.local
|
346
|
+
hostlabel server.fqdn.local
|
347
|
+
username sasatatsu
|
348
|
+
password karaage
|
349
|
+
</server>
|
350
|
+
<server>
|
351
|
+
host standby.fqdn.local
|
352
|
+
hostlabel server.fqdn.local
|
353
|
+
username kzk
|
354
|
+
password hawaii
|
355
|
+
standby yes
|
356
|
+
</server>
|
357
|
+
</match>
|
358
|
+
```
|
359
|
+
|
360
|
+
Specify `hostlabel` if server (`in_forward`) have different hostname (`self_host` configuration of `in_forward`) from DNS name (`first.fqdn.local`, `second.fqdn.local` or `standby.fqdn.local`). This configuration variable will be used to check common name (CN) of certifications.
|
361
|
+
|
362
|
+
To specify keepalive timeouts, use `keepalive` configuration with seconds. SSL connection will be disconnected and re-connected for each 1 hour with configuration below. In Default (and with `keepalive 0`), connections will not be disconnected without any communication troubles. (This feature is for dns name updates, and SSL common key refreshing.)
|
363
|
+
|
364
|
+
```apache
|
365
|
+
<match secret.data.**>
|
366
|
+
type secure_forward
|
367
|
+
shared_key secret_string
|
368
|
+
self_hostname client.fqdn.local
|
369
|
+
|
370
|
+
secure yes
|
371
|
+
# and configurations for certs/verification
|
372
|
+
|
373
|
+
keepalive 3600
|
374
|
+
<server>
|
375
|
+
host server.fqdn.local # or IP
|
376
|
+
# port 24284
|
377
|
+
</server>
|
378
|
+
</match>
|
379
|
+
```
|
380
|
+
|
381
|
+
## Senario (developer document)
|
382
|
+
|
383
|
+
* server
|
384
|
+
* in\_secure\_forward
|
385
|
+
* client
|
386
|
+
* out\_secure\_forward
|
387
|
+
|
388
|
+
### Handshake
|
389
|
+
|
390
|
+
1. (client) connect to server
|
391
|
+
* on SSL socket handshake, checks certificate and its significate (in client)
|
392
|
+
2. (server)
|
393
|
+
* check network/domain acl (if enabled)
|
394
|
+
* check client dns reverse lookup result (if enabled)
|
395
|
+
* disconnect when failed
|
396
|
+
3. (server) send HELO
|
397
|
+
* ['HELO', options(hash)]
|
398
|
+
* options:
|
399
|
+
* nonce: string as nonce: used for shared key digest (required, v0.3.2 or later)
|
400
|
+
* auth: string or blank\_string (string: authentication required, and its salt is this value)
|
401
|
+
* keepalive: bool (allowed or not)
|
402
|
+
4. (client) send PING
|
403
|
+
* ['PING', selfhostname, sharedkey\_salt, sha512\_hex(sharedkey\_salt + selfhostname + nonce + sharedkey), username || '', sha512\_hex(auth\_salt + username + password) || '']
|
404
|
+
5. (server) check PING
|
405
|
+
* check sharedkey
|
406
|
+
* check username / password (if required)
|
407
|
+
* send PONG FAILURE if failed
|
408
|
+
* ['PONG', false, 'reason of authentication failure', '', '']
|
409
|
+
6. (server) send PONG
|
410
|
+
* ['PONG', bool(authentication result), 'reason if authentication failed', selfhostname, sha512\_hex(salt + selfhostname + nonce + sharedkey)]
|
411
|
+
7. (client) check PONG
|
412
|
+
* check sharedkey
|
413
|
+
* disconnect when failed
|
414
|
+
8. connection established
|
415
|
+
* send data from client (until keepalive expiration)
|
416
|
+
|
417
|
+
### Data transferring
|
418
|
+
|
419
|
+
CONSIDER RETURN ACK OR NOT
|
420
|
+
|
421
|
+
* Current version has no ACKs
|
422
|
+
* only supports burst transferring (same as ForwardInput/Output)
|
423
|
+
* ack for each message ?
|
424
|
+
* pipeline mode and one-by-one mode ?
|
425
|
+
* data sequence number in keepalive session ?
|
426
|
+
|
427
|
+
## TODO
|
428
|
+
|
429
|
+
* ACK mode (protocol)
|
430
|
+
* support disabling keepalive (input/output)
|
431
|
+
* access control (input plugin)
|
432
|
+
* network acl / domain acl
|
433
|
+
* check connecting source ip and its dns reverse lookup result (for domaian acl)
|
434
|
+
* access deny on accept (against DoS)
|
435
|
+
* pluggable authentication database (input plugin)
|
436
|
+
* RDBMS, LDAP, or ...
|
437
|
+
* Authentication by clients certificate
|
438
|
+
* TESTS!
|
439
|
+
|
440
|
+
## Copyright
|
441
|
+
|
442
|
+
* Copyright (c) 2013- TAGOMORI Satoshi (tagomoris)
|
443
|
+
* License
|
444
|
+
* Apache License, Version 2.0
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "fluent/plugin/secure/forward/v033dev2/addproxy"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'fileutils'
|
4
|
+
require 'fluent/plugin/secure_forward/cert_util'
|
5
|
+
|
6
|
+
ca_dir, passphrase = ARGV
|
7
|
+
|
8
|
+
unless ca_dir && passphrase
|
9
|
+
puts 'USAGE: secure-forward-ca-generate DIR_PATH PRIVATE_KEY_PASSPHRASE'
|
10
|
+
puts ''
|
11
|
+
exit 0
|
12
|
+
end
|
13
|
+
|
14
|
+
FileUtils.mkdir_p(ca_dir)
|
15
|
+
|
16
|
+
opt = {
|
17
|
+
private_key_length: 2048,
|
18
|
+
cert_country: 'US',
|
19
|
+
cert_state: 'CA',
|
20
|
+
cert_locality: 'Mountain View',
|
21
|
+
cert_common_name: 'SecureForward CA',
|
22
|
+
}
|
23
|
+
cert, key = Fluent::SecureForward::CertUtil.generate_ca_pair(opt)
|
24
|
+
|
25
|
+
key_data = key.export(OpenSSL::Cipher::Cipher.new('aes256'), passphrase)
|
26
|
+
File.open(File.join(ca_dir, 'ca_key.pem'), 'w') do |file|
|
27
|
+
file.write key_data
|
28
|
+
end
|
29
|
+
File.open(File.join(ca_dir, 'ca_cert.pem'), 'w') do |file|
|
30
|
+
file.write cert.to_pem
|
31
|
+
end
|
32
|
+
|
33
|
+
puts "successfully generated: ca_key.pem, ca_cert.pem"
|
34
|
+
puts "copy and use ca_cert.pem to client(out_secure_forward)"
|
data/bin/setup
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
<source>
|
2
|
+
type forward
|
3
|
+
</source>
|
4
|
+
|
5
|
+
<match test.**>
|
6
|
+
type secure_forward
|
7
|
+
self_hostname client
|
8
|
+
#shared_key hogeposxxx0
|
9
|
+
shared_key wrong_shared_key
|
10
|
+
<server>
|
11
|
+
host localhost
|
12
|
+
shared_key hogeposxxx1
|
13
|
+
username tagomoris
|
14
|
+
password 001122
|
15
|
+
# password XXYYZZ
|
16
|
+
# password wrong_pass
|
17
|
+
</server>
|
18
|
+
flush_interval 1s
|
19
|
+
</match>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<source>
|
2
|
+
type secure_forward
|
3
|
+
self_hostname server
|
4
|
+
shared_key hogeposxxx0
|
5
|
+
cert_auto_generate yes
|
6
|
+
allow_anonymous_source no
|
7
|
+
authentication yes
|
8
|
+
<user>
|
9
|
+
username tagomoris
|
10
|
+
password 001122
|
11
|
+
</user>
|
12
|
+
<user>
|
13
|
+
username sugomoris
|
14
|
+
password 012345
|
15
|
+
</user>
|
16
|
+
<user>
|
17
|
+
username tagomoris
|
18
|
+
password XXYYZZ
|
19
|
+
</user>
|
20
|
+
<client>
|
21
|
+
host localhost
|
22
|
+
users tagomoris
|
23
|
+
shared_key hogeposxxx1
|
24
|
+
# users sugomoris
|
25
|
+
</client>
|
26
|
+
</source>
|
27
|
+
|
28
|
+
<match test.**>
|
29
|
+
type stdout
|
30
|
+
</match>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<source>
|
2
|
+
type forward
|
3
|
+
</source>
|
4
|
+
|
5
|
+
<match test.**>
|
6
|
+
type secure_forward
|
7
|
+
secure yes
|
8
|
+
self_hostname client
|
9
|
+
#shared_key hogeposxxx0
|
10
|
+
shared_key wrong_shared_key
|
11
|
+
<server>
|
12
|
+
host localhost
|
13
|
+
hostlabel tagomoris
|
14
|
+
shared_key hogeposxxx1
|
15
|
+
username tagomoris
|
16
|
+
password 001122
|
17
|
+
# password XXYYZZ
|
18
|
+
# password wrong_pass
|
19
|
+
</server>
|
20
|
+
flush_interval 1s
|
21
|
+
</match>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<source>
|
2
|
+
type secure_forward
|
3
|
+
secure yes
|
4
|
+
self_hostname server
|
5
|
+
# self_hostname tagomoris
|
6
|
+
shared_key hogeposxxx0
|
7
|
+
cert_path /Users/tagomoris/Documents/fluent-plugin-secure-forward/example/certs/cert.pem
|
8
|
+
private_key_path /Users/tagomoris/Documents/fluent-plugin-secure-forward/example/certs/key.pem
|
9
|
+
# blank passphrase
|
10
|
+
private_key_passphrase
|
11
|
+
allow_anonymous_source no
|
12
|
+
authentication yes
|
13
|
+
<user>
|
14
|
+
username tagomoris
|
15
|
+
password 001122
|
16
|
+
</user>
|
17
|
+
<user>
|
18
|
+
username sugomoris
|
19
|
+
password 012345
|
20
|
+
</user>
|
21
|
+
<user>
|
22
|
+
username tagomoris
|
23
|
+
password XXYYZZ
|
24
|
+
</user>
|
25
|
+
<client>
|
26
|
+
host localhost
|
27
|
+
users tagomoris
|
28
|
+
shared_key hogeposxxx1
|
29
|
+
# users sugomoris
|
30
|
+
</client>
|
31
|
+
</source>
|
32
|
+
|
33
|
+
<match test.**>
|
34
|
+
type stdout
|
35
|
+
</match>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIC9TCCAl6gAwIBAgIJAPZkY4lTv8EcMA0GCSqGSIb3DQEBBQUAMFsxCzAJBgNV
|
3
|
+
BAYTAkpQMQ4wDAYDVQQIEwVUb2t5bzEQMA4GA1UEBxMHU2hpYnV5YTEWMBQGA1UE
|
4
|
+
ChMNRmx1ZW50ZCBKYXBhbjESMBAGA1UEAxMJdGFnb21vcmlzMB4XDTEzMDIxNDA4
|
5
|
+
MzQ0OVoXDTIzMDIxMjA4MzQ0OVowWzELMAkGA1UEBhMCSlAxDjAMBgNVBAgTBVRv
|
6
|
+
a3lvMRAwDgYDVQQHEwdTaGlidXlhMRYwFAYDVQQKEw1GbHVlbnRkIEphcGFuMRIw
|
7
|
+
EAYDVQQDEwl0YWdvbW9yaXMwgZ8wD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