soar_auditor_api 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/soar_auditor_api/auditor_api.rb +10 -10
- data/lib/soar_auditor_api/version.rb +1 -1
- data/sanity/Gemfile +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a9ba1d77677113f3375191caebf327bfad36f1f
|
4
|
+
data.tar.gz: 9efa8269bab0e41e31cf15abecc2db0c7101dda4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce4b59f664afa5a328b908e2bd0ceff3024e64911299815ff0e364fa9617eeadd1ab56b2daa17ccd3023970aa5ad858cf6d41489db01674a6f2ac1feaf7df3a0
|
7
|
+
data.tar.gz: d2ba12493e66420f096e423d7aa78ae2e93e9176e95b0eaa1fca36fb730fdbc3355ae15648460ef701ae08895d2aa0369c49b10ce44c0c0ccd957956fa083949
|
data/README.md
CHANGED
@@ -4,7 +4,10 @@ This gem provides the auditor api for the SOAR architecture.
|
|
4
4
|
|
5
5
|
## State of the API
|
6
6
|
|
7
|
-
This API is still a work in progress but should be sufficient
|
7
|
+
This API is still a work in progress but should be sufficient for most auditors
|
8
|
+
|
9
|
+
Future work:
|
10
|
+
* The API should support the reformating of timestamps to a standardized ISO8601 format.
|
8
11
|
|
9
12
|
## Installation
|
10
13
|
|
@@ -13,7 +13,7 @@ module SoarAuditorApi
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def configure(configuration = nil)
|
16
|
-
raise ArgumentError, "Invalid configuration provided" unless configuration_is_valid(configuration)
|
16
|
+
raise ArgumentError, "Invalid configuration provided" unless configuration_is_valid?(configuration)
|
17
17
|
@configuration = configuration
|
18
18
|
end
|
19
19
|
|
@@ -23,32 +23,32 @@ module SoarAuditorApi
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def debug(data)
|
26
|
-
audit(DEBUG_PREFIX + data.to_s) if
|
26
|
+
audit(DEBUG_PREFIX + data.to_s) if audit_filtered_out?(:debug)
|
27
27
|
end
|
28
28
|
|
29
29
|
def <<(data)
|
30
|
-
audit(INFO_PREFIX + data.to_s) if
|
30
|
+
audit(INFO_PREFIX + data.to_s) if audit_filtered_out?(:info)
|
31
31
|
end
|
32
32
|
|
33
33
|
def info(data)
|
34
|
-
audit(INFO_PREFIX + data.to_s) if
|
34
|
+
audit(INFO_PREFIX + data.to_s) if audit_filtered_out?(:info)
|
35
35
|
end
|
36
36
|
|
37
37
|
def warn(data)
|
38
|
-
audit(WARN_PREFIX + data.to_s) if
|
38
|
+
audit(WARN_PREFIX + data.to_s) if audit_filtered_out?(:warn)
|
39
39
|
end
|
40
40
|
|
41
41
|
def error(data)
|
42
|
-
audit(ERROR_PREFIX + data.to_s) if
|
42
|
+
audit(ERROR_PREFIX + data.to_s) if audit_filtered_out?(:error)
|
43
43
|
end
|
44
44
|
|
45
45
|
def fatal(data)
|
46
|
-
audit(FATAL_PREFIX + data.to_s) if
|
46
|
+
audit(FATAL_PREFIX + data.to_s) if audit_filtered_out?(:fatal)
|
47
47
|
end
|
48
48
|
|
49
49
|
#Safety to ensure that the Auditor that extends this API implements this IOC method
|
50
|
-
def configuration_is_valid(configuration)
|
51
|
-
raise NotImplementedError, "Method must implement configuration_is_valid method in Auditor extending the API"
|
50
|
+
def configuration_is_valid?(configuration)
|
51
|
+
raise NotImplementedError, "Method must implement configuration_is_valid? method in Auditor extending the API"
|
52
52
|
end
|
53
53
|
|
54
54
|
#Safety to ensure that the Auditor that extends this API implements this IOC method
|
@@ -58,7 +58,7 @@ module SoarAuditorApi
|
|
58
58
|
|
59
59
|
private
|
60
60
|
|
61
|
-
def
|
61
|
+
def audit_filtered_out?(audit_level)
|
62
62
|
return @audit_levels.index(@minimum_audit_level) <= @audit_levels.index(audit_level)
|
63
63
|
end
|
64
64
|
end
|
data/sanity/Gemfile
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soar_auditor_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Barney de Villiers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|