Skip to content
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

Switch to simple stub resolver for DNS lookups #1378

Open
mxsasha opened this issue Apr 3, 2024 · 2 comments
Open

Switch to simple stub resolver for DNS lookups #1378

mxsasha opened this issue Apr 3, 2024 · 2 comments
Assignees
Labels

Comments

@mxsasha
Copy link
Collaborator

mxsasha commented Apr 3, 2024

We currently integrate libunbound to run unbound queries from our own code. This adds unnecessarily complexity in the app, and has caused issues like #1376 and confusion like #1340. Now that we have a properly managed validating and non-validating resolver, as part of our code repository, we should switch to using a simple stub resolver in our code.

The obvious choice is dnspython which we already use for other things. It supports EDE, as mentioned in this historical context of our unbound integration.

@mxsasha mxsasha added the debt label Apr 3, 2024
@bwbroersma
Copy link
Collaborator

That would also the magic value of internet.nl here:

# fire an initial DNS query to start unbound background worker and prevent race conditions that can occur
_ub_ctx.resolve_async("internet.nl", {}, lambda x, y, z: None, unbound.RR_TYPE_A, unbound.RR_CLASS_IN)

@gthess
Copy link
Collaborator

gthess commented Apr 5, 2024

As per my comment on #1358 (comment)

If all the contexts will be replaced by a stub, the stub needs to make sure to activate the CD flag (Checking Disabled) on its queries so that it gets also the bogus data back for other tests to work (like the prechecks and the mail auth test). The AD flag on the response would indicate if DNSSEC validation succeeded or failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants