Join our Newsletter — 33% off our NHI Course

DNS caching

DNS caching is the practice of storing lookup results temporarily in browsers, operating systems, and resolvers. It improves performance, but it also means record updates do not take effect everywhere at once, so change windows and propagation checks are necessary.

Expanded Definition

DNS caching is the temporary retention of name resolution answers by recursive resolvers, operating systems, and client applications so later requests can be answered faster. In NHI and IAM operations, it affects how quickly changes to records for service endpoints, token services, and control-plane dependencies become visible across distributed systems. The practical meaning is broader than simple performance tuning: cached data also shapes failure modes, propagation timing, and the blast radius of a mistaken record change.

Definitions vary across vendors on how much weight to give browser caches versus recursive resolver caches, but the operational concept is consistent: once a DNS response is cached, the time-to-live value governs when fresh data can be fetched again. For security teams, that means a changed record does not instantly invalidate every prior path, which matters during secret rotation, failover, and incident response. NIST guidance on monitoring and response controls, including NIST SP 800-53 Rev 5 Security and Privacy Controls, reinforces the need to account for stale infrastructure state in change management.

The most common misapplication is assuming a DNS update is globally effective the moment a zone file is changed, which occurs when teams ignore cached responses and TTL-based delay.

Examples and Use Cases

Implementing DNS caching rigorously often introduces a tradeoff between faster lookups and slower propagation of urgent changes, requiring organisations to weigh user experience against control over update timing.

  • A service account endpoint is moved to a new region, but some clients still resolve the old address until cache expiry, so rollback planning must include TTL awareness.
  • During API key rotation, a dependency continues to call the previous authentication endpoint because its resolver has not yet refreshed, making overlap windows necessary.
  • An incident responder lowers a record’s TTL before a planned cutover, then validates propagation across major resolvers and client stacks to confirm the new record is being used.
  • Security teams compare cached DNS answers against authoritative records while investigating suspicious traffic patterns, using Ultimate Guide to NHIs as a reference for how non-human dependencies accumulate risk.
  • Engineering teams align caching behavior with cache-control and identity assurance expectations described in NIST SP 800-53 Rev 5 Security and Privacy Controls when record changes affect authentication paths.

Why It Matters in NHI Security

DNS caching matters because NHI systems often depend on machine-to-machine endpoints that must change safely under pressure. If a resolver, host, or application keeps an old address, a supposedly revoked or migrated dependency may continue operating longer than expected. That creates exposure during secret rotation, incident containment, and failover testing, especially when teams assume the network has already “taken” the change. NHI Mgmt Group reports that 91.6% of secrets remain valid five days after notification, underscoring how slow remediation can be when infrastructure state and identity state are not coordinated. That delay is amplified when DNS caches keep stale paths alive.

This is why DNS behavior belongs in NHI governance, not just networking. It affects whether a rotated credential actually stops being usable, whether a compromised endpoint is still reachable, and whether a service discovery update lands cleanly across distributed clients. The same operational reality appears in the Ultimate Guide to NHIs, which ties visibility and rotation discipline to reducing identity risk. Organisations typically encounter cache-related exposure only after a record change fails to isolate a compromised path, at which point DNS caching becomes operationally unavoidable to address.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5, NIST Zero Trust (SP 800-207) and NIST SP 800-63 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-09 DNS cache staleness can keep compromised NHI endpoints reachable after changes.
NIST CSF 2.0 PR.IP-1 Change management must account for cached DNS state during updates and recovery.
NIST SP 800-53 Rev 5 CM-3 Configuration change control must consider DNS caches that delay effective enforcement.
NIST Zero Trust (SP 800-207) Zero Trust depends on current routing and identity state, not stale cached resolution.
NIST SP 800-63 Identity assurance can be undermined when cached DNS points clients to old auth services.

Ensure authentication endpoints are reachable through updated DNS before decommissioning old paths.