auth-centric-firewall 0.0.8 → 0.1.0
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/.rubocop.yml +6 -0
- data/CHANGELOG.md +5 -1
- data/lib/auth/centric/firewall/version.rb +1 -1
- data/lib/auth/centric/firewall.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 669fd19673965861241121a8c8a1744f298e19b7116b0d96a6c2337d9a9b6a0c
|
4
|
+
data.tar.gz: d13c16055743036a648bfe7a27844924da16c8a0099e0a45569b6da3752a1238
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d5efc53a5a8bb3dee51368aa9720282ea44ed7aea60c412fcdb007e93945f8f6907a0581d71b5f1cc29860323996161b52c9bb2f6bc058cdfcb734c829e566d
|
7
|
+
data.tar.gz: e85bacf437f529c59e17ad92518b2cc662d2516f943a38a30cd70493c843b3e3f6a4d701a27cb11bf2674b075aae09ecccc0be41e749f533e7b8a05d0db3acf3
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -13,7 +13,7 @@ module Auth
|
|
13
13
|
module Firewall
|
14
14
|
class Error < StandardError; end
|
15
15
|
|
16
|
-
def log_firewall(request, forced: false)
|
16
|
+
def log_firewall(request, forced: false, exception: nil)
|
17
17
|
return true unless enabled?
|
18
18
|
|
19
19
|
unless forced
|
@@ -22,7 +22,7 @@ module Auth
|
|
22
22
|
end
|
23
23
|
|
24
24
|
cr = CaptureRequest.new(request)
|
25
|
-
payload = { request: cr.as_json }
|
25
|
+
payload = { request: cr.as_json, exception: }
|
26
26
|
|
27
27
|
http = HTTP
|
28
28
|
.timeout(timeout_seconds)
|
@@ -34,11 +34,11 @@ module Auth
|
|
34
34
|
true
|
35
35
|
end
|
36
36
|
|
37
|
-
def valid_ip?(request)
|
37
|
+
def valid_ip?(request, forced: false)
|
38
38
|
return true unless enabled?
|
39
39
|
|
40
40
|
ip_address = request.env['HTTP_X_FORWARDED_FOR'] || request.remote_ip
|
41
|
-
return true if IGNORE_IP.include?(ip_address)
|
41
|
+
return true if !forced && IGNORE_IP.include?(ip_address)
|
42
42
|
|
43
43
|
http = HTTP
|
44
44
|
.timeout(timeout_seconds)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auth-centric-firewall
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saimon Lovell
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: http
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
|
-
rubygems_version: 3.6.
|
75
|
+
rubygems_version: 3.6.8
|
76
76
|
specification_version: 4
|
77
77
|
summary: Use artificial intelligence to find hackers.
|
78
78
|
test_files: []
|