DNSSEC

DNSSEC adds signatures to DNS answers. It’s like HTTPS for DNS, without the encryption. Our Kubernetes stack supports it for your cluster’s domain (for example production.eks.example.com). It’s off by default.

The problem it solves

Normal DNS answers can be faked. An attacker who poisons a DNS server’s cache can send your users to their own server for your hostname, and nobody notices. With DNSSEC, DNS servers that check signatures (Google’s, Cloudflare’s, Quad9’s and others) reject the fake answer. The user gets an error instead of the fake address.

How it works

  • Each domain signs its records with its own key.
  • The parent domain vouches for that key with a DS record. A DS record is a fingerprint of the key. example.com vouches for production.eks.example.com, .com vouches for example.com, and so on up to the root of DNS. That’s the chain.
  • A DNS server that checks signatures follows the chain from the root down. If every link matches, it trusts the answer.
  • If a link is wrong, it rejects every name under that domain with SERVFAIL, an error that means “I can’t trust this answer”.
    flowchart TD
    root["Root of DNS"] -- "DS record for .com" --> com[".com"]
    com -- "DS record for example.com" --> parent["example.com<br>your parent domain"]
    parent -- "DS record for production.eks.example.com" --> cluster["production.eks.example.com<br>your cluster domain"]
  
    flowchart LR
    user["User"] --> resolver["DNS server that checks signatures<br>Google, Cloudflare, Quad9"]
    resolver --> check{"Every link in<br>the chain matches?"}
    check -- yes --> ok["The user gets the answer"]
    check -- no --> fail["SERVFAIL<br>the user gets an error"]
  

Example: the cluster domain production.eks.example.com is signed, and so is its parent example.com.

$ dig DS example.com +short
12345 13 2 <digest of the example.com key>

$ dig DS production.eks.example.com +short
54321 13 2 <digest of the production.eks.example.com key>

The first DS record is stored in .com and vouches for example.com. The second is stored in example.com and vouches for the cluster domain.

Pros and cons

Pros:

  • Stops fake DNS answers for users behind DNS servers that check signatures.
  • Protects plain HTTP and other traffic that has no certificate to catch a fake server.
  • Clears the DNSSEC finding in pentests and security scanners.

Cons:

  • Protects nothing when the parent domain isn’t signed.
  • A broken chain takes your domain down for those same DNS servers.
  • It doesn’t cover the hop between the user’s device and their DNS server, and it doesn’t encrypt anything.

Is it worth it for you?

It depends on your parent domain. If example.com isn’t signed, the chain is broken from the start and signing the cluster domain adds nothing. Sign the parent domain first, at your registrar or DNS provider.

To check if your parent domain is signed:

$ dig DS example.com +short

No output means it isn’t signed.

Traffic over HTTPS is already protected against fake answers, because a fake server has no valid certificate for your domain. DNSSEC adds most for plain HTTP, other protocols, and audit requirements. Many large sites, like google.com and github.com, don’t use DNSSEC.

Risks

One wrong DS record takes your cluster domain down for every user behind a DNS server that checks signatures. Fixing it takes as long as DNS servers cache the old record. Slack had exactly this in 2021, on Route53: part of their users couldn’t reach slack.com for about a day (write-up).

The same goes for turning it off or removing a cluster. The DS record has to go first, then signing can stop.

To keep this safe:

  • When your parent domain is in Route53 and we manage it, we add the DS record with a 5-minute cache time, so a mistake can be fixed in minutes.
  • When your parent domain is at another DNS provider, the DS record is yours to add and remove. We give you the value, and its cache time is what you set there.
  • We start with a staging or test cluster, and move to production only after that runs fine.

How to get it

Reach out to us. We’ll look at where your domains are hosted and check with you if and how DNSSEC fits your setup.

    flowchart TD
    q1{"Is your parent domain signed?"} -- no --> a1["Sign it first at your<br>registrar or DNS provider"]
    q1 -- yes --> q2{"Is your parent domain in Route53<br>and managed by us?"}
    q2 -- yes --> a2["We add the DS record"]
    q2 -- no --> a3["We give you the DS value<br>to add at your DNS provider"]
  

If it fits, we set up:

  • A signing key in AWS KMS (AWS’s key management service), in your cluster’s AWS account.
  • Signing on your cluster’s Route53 zone.
  • The DS record in your parent domain, or its value for you to add.

Signing goes live first, then the DS record, in the same rollout. That order matters: a DS record added before signing is active breaks your domain. Your domain keeps resolving during the rollout.

Check it

# The DS record is published in your parent domain
$ dig DS production.eks.example.com +short

# The domain validates: look for "ad" in the flags
$ dig +dnssec SOA production.eks.example.com @8.8.8.8 | grep -E "status|flags:"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44758
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

ad means the DNS server checked the signatures. status: SERVFAIL means the chain is broken. Reach out to us right away.

Last updated on