[Bug]: dns-01 challenges should be validated against authoritative servers

Open
#2,619 0 comments 5 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@hslatman is already working on this.

Since Mar 31, 2026.

Assessment

This issue has not been assessed yet.

Description

bug needs triage
Steps to Reproduce

We experience intermittent failures in dns-01 challenge validation due to the fact that step ca is using caching resolvers to look up the TXT record. By default it uses the reolver configured in the os. If for some reason a query for the same record has been made before the TXT record was populated, a negative cache will linger for up to the lesser of the SOA TTL and the SOA minimum TTL, causing the validation to fail.

In some cases it might be possible to use -the "-resolver" option, but this would limit step ca to issue certifactes only to domains for which that server is authoritative.

Your Environment
  • OS - RHEL 10.1
  • step-ca Version - 0.30.1
Expected Behavior

Lookup of the TXT record with the challenge should be made against the authoritate servers for the challenge:

  1. find SOA
  2. find NS for the zone
  3. query each NS for the TXT
Actual Behavior

Lookup is using os default resolver which might hit a negative cache and cause validation to fail

Additional Context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Dominant language
Go
Stars
8.9k
Forks
599
Avg merge
21h 20m
Merged PRs (30d)
15

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from smallstep/certificates

All issues in smallstep/certificates

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.