-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DANE Support #8
Comments
I believe that the current status of the dns resolver is that in order to get DNSSEC validation we:
That's an obviously untenable situation for us. An alternative might be to explicitly configure a separate DNSSEC-only resolver instance and use that for DANE. If we can do that without exposing the bifurcation to the user that might work. |
The current status of my analysis is:
The best way forward for us and the ecosystem is for trust-dns-resolver and rustls to be extended to support those things. An alternative way forward is to source an alternative resolver (perhaps by embedding one via FFI) and switching to openssl for the transport security. It is unclear whether that would be faster to implement, but would have the advantage that the verification logic could then be borrowed from eg: postfix's implementation approach. |
This is set to true when the MX was resolved with DNSSEC validated. refs: #8
Will try getting this into the rust openssl wrapper and tackling it that way. |
This code isn't currently reachable (defaults to false), but allows for a runtime selection between rustls and openssl-based tls. refs: #8
Adds the ability to enable DANE verification for SMTP. It is disabled by default because correct operation also requires working DNSSEC which in turns requires the use of the unbound resolver. When enabled, the SMTP client will use the OpenSSL DANE implementation to verify the peer certificate. refs: #8 ```lua local kumo = require 'kumo' -- Called on startup to initialize the system kumo.on('init', function() kumo.configure_accounting_db_path '/tmp/acct.db' kumo.dns.configure_unbound_resolver { options = { validate = true, -- enable DNSSEC validation }, -- name_servers = { '1.1.1.1:53' }, } kumo.set_diagnostic_log_filter 'rfc5321=trace,kumod::ready_queue=trace,kumod::smtp_dispatcher=trace,info' kumo.start_esmtp_listener { listen = '0.0.0.0:2025', relay_hosts = { '127.0.0.1', '192.168.1.0/24' }, } kumo.configure_local_logs { log_dir = '/var/tmp/kumo-logs', max_segment_duration = '1s', } kumo.start_http_listener { listen = '0.0.0.0:8000', trusted_hosts = { '127.0.0.1', '::1' }, } kumo.define_spool { name = 'data', path = '/var/tmp/kumo-spool/data', kind = 'RocksDB', } kumo.define_spool { name = 'meta', path = '/var/tmp/kumo-spool/meta', kind = 'RocksDB', } end) kumo.on('get_egress_pool', function(pool_name) if pool_name == 'pool0' then return kumo.make_egress_pool { name = 'pool0', entries = { { name = 'source0' }, }, } end error("I don't know how to configure pool " .. pool_name) end) kumo.on('get_egress_source', function(source_name) return kumo.make_egress_source { name = source_name, socks5_proxy_server = '127.0.0.1:5000', socks5_proxy_source_address = '0.0.0.0', } end) kumo.on( 'get_egress_path_config', function(routing_domain, egress_source, site_name) print('get_egress_path_config', routing_domain, egress_source, site_name) return kumo.make_egress_path { enable_tls = 'Disabled', enable_dane = true, idle_timeout = '5s', data_timeout = '10s', data_dot_timeout = '15s', prohibited_hosts = {}, } end ) kumo.on('get_queue_config', function(domain, tenant, campaign) return kumo.make_queue_config { egress_pool = 'pool0', } end) ```
DANE for SMTP: https://datatracker.ietf.org/doc/html/rfc7672
DANE in General: https://datatracker.ietf.org/doc/html/rfc6698
TLSA resolution psuedocode: https://datatracker.ietf.org/doc/html/rfc6698#appendix-B.2
Implementing this requires solid DNSSEC support, and I'm not sure whether it currently exists.
Relevant issues in the upstream resolver library:
In addition, rustls doesn't have first-class support for DANE in general:
and it isn't clear how/if we can adapt the data and feed it into it verifier implementation
The text was updated successfully, but these errors were encountered: