diff --git a/app/models/dnskey.rb b/app/models/dnskey.rb index 1194e6c907..7b674870cc 100644 --- a/app/models/dnskey.rb +++ b/app/models/dnskey.rb @@ -27,7 +27,7 @@ class Dnskey < ApplicationRecord PROTOCOLS = %w(3) FLAGS = %w(0 256 257) # 256 = ZSK, 257 = KSK DS_DIGEST_TYPE = [1,2] - + RESOLVERS = ENV['dnssec_validation_resolver_ips'].to_s.strip.split(', ').freeze self.ignored_columns = %w[legacy_domain_id] def epp_code_map diff --git a/app/models/domain.rb b/app/models/domain.rb index 9f9d558692..971fde6cbb 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -171,8 +171,7 @@ def status_is_consistant def dnssec_security_level(stubber: nil) Dnsruby::Dnssec.reset - - resolver = Dnsruby::Resolver.new(nameserver: ['8.8.8.8', '8.8.4.4']) + resolver = Dnsruby::Resolver.new(nameserver: Dnskey::RESOLVERS) resolver.do_validation = true resolver.do_caching = false resolver.dnssec = true diff --git a/config/application.yml.sample b/config/application.yml.sample index 63e9a648d0..02396aad3c 100644 --- a/config/application.yml.sample +++ b/config/application.yml.sample @@ -41,6 +41,7 @@ ca_key_password: 'your-root-key-password' directo_invoice_url: 'https://domain/ddddd.asp' cdns_scanner_input_file: '/opt/cdns/input.txt' cdns_scanner_output_file: '/opt/cdns/output.txt' +dnssec_resolver_ips: 8.8.8.8, 8.8.4.4 # # EPP # @@ -195,6 +196,7 @@ test: lhv_keystore_alias: 'testtest' cdns_scanner_input_file: 'tmp/cdns_input.txt' cdns_scanner_output_file: 'test/fixtures/files/cdns_output.txt' + dnssec_resolver_ips: 8.8.8.8, 8.8.4.4 legal_documents_dir: 'test/fixtures/files' # Airbrake // Errbit: