fluent-plugin-sdns-api 0.1.1 → 0.1.3

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: ed83d441568fce83f35bcadfa0fea53fdafccc7a274588344eb4ace99b094d14
4
- data.tar.gz: 0ce35035202fc91bed7cc957fbacc596aedb120046ad1059f164f3216ed6582b
3
+ metadata.gz: a92d2a0115f48be5f53305954c9b8e87e64a508b0b6365a16a9fe1b99f95c260
4
+ data.tar.gz: 137f8d82a661dd2b27b446aee8700e662f4a69880e5b288ad95698ab656913c2
5
5
  SHA512:
6
- metadata.gz: 1c998e2331bf12c4d78deab97db0a86fbaa303924c80c485ba70d6711b4ec1a924913d5f20b2a7d1bffed54f3c586b18b00d9788c5c8a00f0fb39d60dcb0029b
7
- data.tar.gz: 9d09a0533a41fea12df19815c3361858486419a18711e4c6995c2efec2d66af614ef8ee007ac5ea9bdf65f5c8cbeadf7f300ff8ff26c4d145ccef565292de5b5
6
+ metadata.gz: 2ac79469be0604495006ce4c60f2590c7a02a1cd24dc4c3f59522911494e9306418092383e50a263083847cdd489eb5f576b8c0964d971567e717b93844a9d57
7
+ data.tar.gz: 7ffb17cf664ba48b99e3b64ee57d02b5100fe7cec682ea579d03f4e30d10b40d0c06512f36c0d8739cc82429647d80d603a7ce1d00eeaa601318a8d3debae9c9
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fluent-plugin-sdns-api"
6
- spec.version = "0.1.1"
6
+ spec.version = "0.1.3"
7
7
  spec.authors = ["yinqiwei"]
8
8
  spec.email = ["772006843@qq.com"]
9
9
 
@@ -94,8 +94,8 @@ module Fluent
94
94
  query["page_size"] = @page_size
95
95
  query["domain"] = @domain if @domain != ""
96
96
  query["client_ip"] = @client_ip if @client_ip != ""
97
- query["security_zone_id"] = @security_zone_id if @security_zone_id != ""
98
- query["threat_level"] = @threat_level if @threat_level.length > 0
97
+ query["zone_id"] = @security_zone_id if @security_zone_id != ""
98
+ query["severity"] = @threat_level if @threat_level.length > 0
99
99
 
100
100
  uri_parse.query = URI.encode_www_form(query)
101
101
  uri_parse.to_s
@@ -138,18 +138,17 @@ module Fluent
138
138
  record = {
139
139
  "query_timestamp" => item["query_timestamp"],
140
140
  "query_time_format" => item["query_time_format"],
141
- "security_zone_id" => item["security_zone_id"],
142
- "security_zone_name" => item["security_zone_name"],
141
+ "security_zone_id" => item["zone_id"],
142
+ "security_zone_name" => item["zone_name"],
143
143
  "client_ip" => item["client_ip"],
144
144
  "client_port" => item["client_port"],
145
145
  "domain" => item["domain"],
146
- "query_type" => item["query_type"],
147
- "action" => item["action"],
148
- "threat_level" => item["threat_level"],
146
+ "ioc" => item["ioc"],
147
+ "threat_level" => item["severity"],
149
148
  "threat_type" => item["threat_type"],
150
- "event_id" => item["event_id"],
151
- "event_name" => item["event_name"],
152
- "event_description" => item["event_description"].gsub("\n", '\\n').gsub("\t", '\\t'),
149
+ "threat_name" => item["threat_name"],
150
+ "threat_description" => item["threat_description"].gsub("\n", '\\n').gsub("\t", '\\t'),
151
+ "action" => item["action"],
153
152
  }
154
153
  es = OneEventStream.new(Fluent::EventTime.now, record)
155
154
  router.emit_stream(@tag, es)
@@ -11,7 +11,7 @@ class SdnsApiSignerTest < Test::Unit::TestCase
11
11
  sig.key = "Fad3mbhh9NwadtEd7t0ekFp5HwrNJiDc" # test key
12
12
  sig.secret = "5MLR15LYGn8IeTHQwPs7tZyJslGqNZmYI6g8eHETGrWZYZ6J7U9Ak8CrRlSyCEMT"
13
13
 
14
- r = Fluent::Plugin::SdnsApiSinger::HttpRequest.new("GET", "https://api-fake.dns.qihoo.net/apis/grpc/v2/ListThreatDetail")
14
+ r = Fluent::Plugin::SdnsApiSinger::HttpRequest.new("GET", "https://xxx.net/apis/grpc/v2/ListThreatDetail")
15
15
  r.headers = {"content-type" => "application/json"}
16
16
 
17
17
  r.body = ''
@@ -10,7 +10,7 @@ class SdnsApiListThreatDetailInputTest < Test::Unit::TestCase
10
10
  CONFIG = %[
11
11
  client_ip '1.1.1.1'
12
12
  access_key 'xxx'
13
- endpoint 'https://api-fake.dns.qihoo.net/apis/grpc/v2/ListThreatDetail'
13
+ endpoint 'https://xxx.net/apis/grpc/v2/ListThreatDetail'
14
14
  access_secret 'sdf'
15
15
  ]
16
16
 
@@ -37,7 +37,7 @@ class SdnsApiListThreatDetailInputTest < Test::Unit::TestCase
37
37
  d = create_driver(%[
38
38
  access_key 'L2guCE9mRsuvUhNxUDKfgjKR083RqIFB'
39
39
  access_secret 'Vy4HrnHHZdewCkeQ9pHeiN6repMUgzjeoP2mqzMCVY2Hbne0k4jlKzZ10unYIKo5'
40
- endpoint 'https://api-fake.dns.qihoo.net/apis/grpc/v2/ListThreatDetail'
40
+ endpoint 'https://xxx.net/apis/grpc/v2/ListThreatDetail'
41
41
  page_size 20
42
42
  scrape_interval 600
43
43
  ])
@@ -55,7 +55,7 @@ class SdnsApiListThreatDetailInputTest < Test::Unit::TestCase
55
55
  d = create_driver(%[
56
56
  access_key 'L2guCE9mRsuvUhNxUDKfgjKR083RqIFB'
57
57
  access_secret 'Vy4HrnHHZdewCkeQ9pHeiN6repMUgzjeoP2mqzMCVY2Hbne0k4jlKzZ10unYIKo5'
58
- endpoint 'https://api-fake.dns.qihoo.net/apis/grpc/v2/ListThreatDetail'
58
+ endpoint 'https://xxx.net/apis/grpc/v2/ListThreatDetail'
59
59
  page_size 100
60
60
  scrape_interval 600
61
61
  ])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-sdns-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - yinqiwei
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-29 00:00:00.000000000 Z
11
+ date: 2026-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  requirements: []
113
- rubygems_version: 3.4.10
113
+ rubygems_version: 3.1.2
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: Input Plugin for Fluentd.