wazuh-ruby-client 0.2.8 → 0.2.9
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -0
- data/lib/wazuh-ruby-client/version.rb +1 -1
- data/lib/wazuh/config.rb +4 -0
- data/lib/wazuh/sawyer/connection.rb +2 -0
- data/lib/wazuh/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d112a0cd50547b2e1884a85c76754903fe0e425b1eea395a88d2073ef940e484
|
|
4
|
+
data.tar.gz: 875c1f5079579d1a29b9a34bff59a721c614447770696d8a7e50fd9efbf82383
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfe8b91a45b82511920cd43eb8ed477b2694560ef8d5215f93c4dc4d04792295336e9051d90d99c87d17d5e4611b7a2c52677670ef40da7358cd204af6a17582
|
|
7
|
+
data.tar.gz: 112107a8acdc5f84714932e84c207d95c1b07a685a91ae83cabb5cbbdf5849f088e6e0d9cdb0c1fca9a1c96ad24b37abe1db26a0e67bfdc224783de9ce1390c6
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.9]
|
|
11
|
+
|
|
12
|
+
- Adds availability to ignore env proxy settings [#25](https://github.com/mrtc0/wazuh-ruby-client/pull/25). Thanks @falegk
|
|
13
|
+
- Add the `ca_file` option to Wazuh.Config to specify a CA file [#26](https://github.com/mrtc0/wazuh-ruby-client/pull/26). Thanks @k1LoW
|
|
14
|
+
|
|
10
15
|
## [0.2.8]
|
|
11
16
|
|
|
12
17
|
- fix bug. return with response body.
|
data/README.md
CHANGED
|
@@ -63,6 +63,7 @@ The following global settings are supported via `Wazuh.configure` .
|
|
|
63
63
|
| setting | description |
|
|
64
64
|
|:--------|:------------|
|
|
65
65
|
| user_agent | User-Agent |
|
|
66
|
+
| ca_file | CA file (if use Client Certificate Authentication and specify CA file) |
|
|
66
67
|
| client_cert | Client certificate (if use Client Certificate Authentication) |
|
|
67
68
|
| client_key | Client Key (if use Client Certificate Authentication) |
|
|
68
69
|
| basic_user | Basic Authentication user name |
|
|
@@ -70,6 +71,7 @@ The following global settings are supported via `Wazuh.configure` .
|
|
|
70
71
|
| verify_ssl | Skip the SSL/TLS verify |
|
|
71
72
|
| logger | loggeer object |
|
|
72
73
|
| endpoint | Wazuh API endpoint URL |
|
|
74
|
+
| ignore_env_proxy | Ignores ENV proxy settings |
|
|
73
75
|
|
|
74
76
|
|
|
75
77
|
### Agents
|
data/lib/wazuh/config.rb
CHANGED
|
@@ -5,6 +5,7 @@ module Wazuh
|
|
|
5
5
|
|
|
6
6
|
ATTRIBUTES = %i[
|
|
7
7
|
user_agent
|
|
8
|
+
ca_file
|
|
8
9
|
client_cert
|
|
9
10
|
client_key
|
|
10
11
|
basic_user
|
|
@@ -12,6 +13,7 @@ module Wazuh
|
|
|
12
13
|
verify_ssl
|
|
13
14
|
logger
|
|
14
15
|
endpoint
|
|
16
|
+
ignore_env_proxy
|
|
15
17
|
].freeze
|
|
16
18
|
|
|
17
19
|
attr_accessor(*Config::ATTRIBUTES)
|
|
@@ -19,12 +21,14 @@ module Wazuh
|
|
|
19
21
|
def reset
|
|
20
22
|
self.endpoint = nil
|
|
21
23
|
self.user_agent = "Wazuh Ruby Client/#{Wazuh::VERSION}"
|
|
24
|
+
self.ca_file = nil
|
|
22
25
|
self.client_cert = nil
|
|
23
26
|
self.client_key = nil
|
|
24
27
|
self.basic_user = nil
|
|
25
28
|
self.basic_password = nil
|
|
26
29
|
self.verify_ssl = true
|
|
27
30
|
self.logger = nil
|
|
31
|
+
self.ignore_env_proxy = false
|
|
28
32
|
end
|
|
29
33
|
end
|
|
30
34
|
|
|
@@ -14,6 +14,7 @@ module Wazuh
|
|
|
14
14
|
|
|
15
15
|
options[:headers]['User-Agent'] = user_agent if user_agent
|
|
16
16
|
options[:ssl].merge!({ client_cert: client_cert, client_key: client_key }) if client_cert || client_key
|
|
17
|
+
options[:ssl][:ca_file] = ca_file if ca_file
|
|
17
18
|
|
|
18
19
|
if basic_user || basic_password
|
|
19
20
|
authorization_header = "Basic " + Base64.encode64(basic_user + ':' + basic_password).strip
|
|
@@ -27,6 +28,7 @@ module Wazuh
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
opts[:faraday] = ::Faraday.new(options)
|
|
31
|
+
opts[:faraday].proxy = nil if ignore_env_proxy
|
|
30
32
|
|
|
31
33
|
::Sawyer::Agent.new(endpoint, opts)
|
|
32
34
|
end
|
data/lib/wazuh/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wazuh-ruby-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- mrtc0
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-09-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|