auth_dns_check 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/docker/dns1-internal.domain.db +5 -0
- data/docker/dns2-internal.domain.db +5 -0
- data/lib/auth_dns_check/client.rb +16 -4
- data/lib/auth_dns_check/version.rb +1 -1
- metadata +1 -2
- data/Gemfile.lock +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22c37a6683b09a94fca8de172138b353213f34db8ef4cff9ca5dc0c0235e13bc
|
4
|
+
data.tar.gz: b90bc601c6fc5683829e0dd11353410b1a7ad97fef481dee7bc75e67f1aee43e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82db5eb1fe0e5e9b0a4a85ade3327823ea0ab1e6c976081652f7795e08a88c13fdd72cde8094426fa7c805716fda193c49ac0d441ae7e701c0a972218ad4983e
|
7
|
+
data.tar.gz: 9c6d450d60076a196fa3867e027ba96c3ec5383cc74bf2c6e14bcf145e47ca057a7e7abf05484be3625c1f7bc7d25a2ed0198187de7cca0e31991369cd105375
|
data/.gitignore
CHANGED
@@ -9,9 +9,12 @@ $TTL 86400
|
|
9
9
|
;
|
10
10
|
NS dns1
|
11
11
|
NS dns2
|
12
|
+
;
|
12
13
|
dns1 IN A 10.0.0.251
|
13
14
|
dns2 IN A 10.0.0.252
|
14
15
|
;
|
16
|
+
@ IN A 127.0.0.1
|
17
|
+
;
|
15
18
|
same IN A 127.0.0.1
|
16
19
|
different IN A 127.0.0.1
|
17
20
|
;
|
@@ -20,3 +23,5 @@ multi-same IN A 127.0.0.3
|
|
20
23
|
;
|
21
24
|
multi-different IN A 127.0.0.1
|
22
25
|
multi-different IN A 127.0.0.3
|
26
|
+
;
|
27
|
+
same.dotted IN A 127.0.0.1
|
@@ -9,9 +9,12 @@ $TTL 86400
|
|
9
9
|
;
|
10
10
|
NS dns1
|
11
11
|
NS dns2
|
12
|
+
;
|
12
13
|
dns1 IN A 10.0.0.251
|
13
14
|
dns2 IN A 10.0.0.252
|
14
15
|
;
|
16
|
+
@ IN A 127.0.0.1
|
17
|
+
;
|
15
18
|
same IN A 127.0.0.1
|
16
19
|
different IN A 127.0.0.2
|
17
20
|
;
|
@@ -20,3 +23,5 @@ multi-same IN A 127.0.0.1
|
|
20
23
|
;
|
21
24
|
multi-different IN A 127.0.0.3
|
22
25
|
multi-different IN A 127.0.0.2
|
26
|
+
;
|
27
|
+
same.dotted IN A 127.0.0.1
|
@@ -28,13 +28,25 @@ module AuthDnsCheck
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def get_authoritatives(fqdn)
|
31
|
-
|
32
|
-
|
31
|
+
find_zone(fqdn) { |zone| overridden_authoritatives_for(zone) } or
|
32
|
+
overridden_authoritatives_for(:default) or
|
33
|
+
find_zone(fqdn) { |zone| default_authoritatives_for(zone) } or
|
34
|
+
raise Error.new("no name servers found for #{fqdn}")
|
35
|
+
end
|
36
|
+
|
37
|
+
def find_zone(fqdn)
|
38
|
+
zone = fqdn
|
39
|
+
while zone
|
40
|
+
auths = yield(zone)
|
41
|
+
if auths and auths.any?
|
42
|
+
break auths
|
43
|
+
else
|
44
|
+
_, zone = zone.split(".", 2)
|
45
|
+
end
|
33
46
|
end
|
34
47
|
end
|
35
48
|
|
36
|
-
def authoritatives_for(
|
37
|
-
zone = fqdn.gsub(/\A[^.]+\./, '')
|
49
|
+
def authoritatives_for(zone)
|
38
50
|
overridden_authoritatives_for(zone) || overridden_authoritatives_for(:default) || default_authoritatives_for(zone)
|
39
51
|
end
|
40
52
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auth_dns_check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sheldon Hearn
|
@@ -64,7 +64,6 @@ files:
|
|
64
64
|
- ".travis.yml"
|
65
65
|
- Dockerfile
|
66
66
|
- Gemfile
|
67
|
-
- Gemfile.lock
|
68
67
|
- LICENSE.txt
|
69
68
|
- README.md
|
70
69
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
auth_dns_check (0.1.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
diff-lcs (1.3)
|
10
|
-
rake (13.0.1)
|
11
|
-
rspec (3.9.0)
|
12
|
-
rspec-core (~> 3.9.0)
|
13
|
-
rspec-expectations (~> 3.9.0)
|
14
|
-
rspec-mocks (~> 3.9.0)
|
15
|
-
rspec-core (3.9.2)
|
16
|
-
rspec-support (~> 3.9.3)
|
17
|
-
rspec-expectations (3.9.2)
|
18
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
19
|
-
rspec-support (~> 3.9.0)
|
20
|
-
rspec-mocks (3.9.1)
|
21
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
-
rspec-support (~> 3.9.0)
|
23
|
-
rspec-support (3.9.3)
|
24
|
-
|
25
|
-
PLATFORMS
|
26
|
-
ruby
|
27
|
-
|
28
|
-
DEPENDENCIES
|
29
|
-
auth_dns_check!
|
30
|
-
bundler (< 3)
|
31
|
-
rake (~> 13.0)
|
32
|
-
rspec (~> 3.0)
|
33
|
-
|
34
|
-
BUNDLED WITH
|
35
|
-
2.0.1
|