MatrixAI / Polykey-CLI

Polykey CLI - Open Source Decentralized Secret Sharing System for Zero Trust Workflows
https://polykey.com
GNU General Public License v3.0
5 stars 3 forks source link

Add user provided DNS option to `Agent start` #202

Closed tegefaulkes closed 20 hours ago

tegefaulkes commented 3 weeks ago

Specification

We should allow the user to specify what DNS servers they want to use as an option of agent start. This could be a --dns-servers -dns option. It should take a varidic length of Host | Hostname.

This list of servers needs to be passed all the way down to the resolve call within Polykey.

Additional context

Tasks

  1. Add a dns option to agent start that will take a varidic length list of DNS server addresses. This needs to be parsed and validated.
  2. We pass this list down into the nodes domain as a configuration option.
  3. The resolve method needs to make use of this list when resolving addresses.
linear[bot] commented 3 weeks ago

ENG-338 Add user provided DNS option to `Agent start`

CMCDragonkai commented 3 weeks ago

Log messages should express the fact that custom DNS (and what they are) are being used. Remember to be able to take IPv4 and IPv6 servers. Remember that this also affects how our IPv6 works.

As of now I don't think we support DoT or DoH. But that would be something to look into the future.

tegefaulkes commented 2 days ago

Providing the DNS servers to the resolver will override the default ones being used. To we want that behaviour because we have some leeway here.

  1. We just set the DNS servers with our list so override what servers are used.
  2. We combine our list with the default. So we add on extra options.
  3. Order checked is the array order of the DNS servers. If we combine would the provided servers have higher priority of less?

For now I'll just do option 1 where we fully override the server list.

tegefaulkes commented 1 day ago

Mostly completed, just requires the changes in polykey to be released. So we're currently blocked on that. @brynblack is working on it.