امنیت، هویت، استقرار و تاب‌آوری · فصل ۴ — Linux/Windows، Container، DNS، CDN و Storage · 98

DNS, TLS, Reverse Proxy and HSTS

Build an evidence path from DNS name to resolved endpoint, TLS connection/server identity, reverse-proxy route/upstream and HSTS policy, then diagnose layer-specific failures without treating any one layer as proof of the others. می‌تواند برای «DNS, TLS, Reverse Proxy و HSTS» run/release model و signals/recovery checks لازم را برای یک سرویس محدود طراحی کند.

DNS, TLS, Reverse Proxy و HSTS — fa-IR

Lesson summary

Build an evidence path from DNS name to resolved endpoint, TLS connection/server identity, reverse-proxy route/upstream and HSTS policy, then diagnose layer-specific failures without treating any one layer as proof of the others.

می‌تواند برای «DNS, TLS, Reverse Proxy و HSTS» run/release model و signals/recovery checks لازم را برای یک سرویس محدود طراحی کند.

This lesson produces

می‌تواند برای «DNS, TLS, Reverse Proxy و HSTS» run/release model و signals/recovery checks لازم را برای یک سرویس محدود طراحی کند.

Who it is for

Foundation

Worked runtime map, explicit evidence table, local fixture and one guided failure probe.

Repair

Reduce to one broken runtime/configuration assumption, observe it, repair it, then restore the full case.

Experienced

Compress introductory syntax; require independent diagnosis, negative evidence and bounded recovery decision.

Prerequisites

1. The problem: “HTTPS opens” is not layered evidence

A web request crosses independent layers: the DNS name and answer, the resolved endpoint, TLS transport, certificate/name identity, reverse-proxy routing, the selected upstream, and HSTS policy. A request can return 200 while reaching the wrong upstream, or DNS can resolve correctly while the certificate identity is wrong.

The owned artifact is Edge Request Trust Path Record v1. It records observation, inference, unknowns, and recovery evidence separately instead of collapsing them into one vague verdict.

2. DNS answers “where,” not “who”

DNS maps names to records such as addresses. A resolver may obtain data from cache or from name servers. Successful resolution proves that a DNS answer was obtained for the name; it does not prove TLS server identity, application health, or application authorization.

Record the hostname, answer, and resolved endpoint first. Evaluate TLS independently afterward.

3. TTL is a time boundary on cached data

TTL limits how long an RR can remain cached; it is not permanent identity evidence. If TTL has expired or the fixture shows that the authoritative answer changed, the old cached conclusion must not be carried forward without re-resolution.

One lab case contains an old cached answer and a changed authoritative answer. The correct diagnosis is that DNS evidence requires re-query, not that TLS or the proxy is automatically at fault.

4. TLS 1.3 has a current specification

At lesson publication time, RFC 9846 is the current IETF TLS 1.3 specification and obsoletes RFC 8446. TLS establishes protected transport between endpoints, but it does not by itself decide every application-authorization or application-correctness question.

Record the TLS version and transport result without turning them into an application-level verdict.

5. Transport success is not the same as server identity

A synthetic handshake can be transport-successful while the expected server name does not match the supplied certificate-name evidence. TLS_CONNECTED and SERVER_IDENTITY_MATCH are therefore distinct conclusions.

In the mismatch case, DNS resolution succeeds and TLS transport is available, but identity must remain mismatched. This rejects the shortcut “DNS and TLS are green, therefore the endpoint is correct.”

6. SNI and the expected name are part of connection context

For multi-name services, the name presented in connection context influences certificate selection and identity checks. This lesson records SNI and certificate-name evidence as fixture facts; it does not teach CA operation or public PKI issuance.

Every identity conclusion must stay tied to the expected name and the evidence for that connection.

7. A reverse proxy is a routing boundary

In NGINX, proxy_pass is a concrete mechanism for forwarding requests to an upstream, and URI/path/header behavior depends on configuration. TLS success therefore says nothing about whether /api was routed to the intended upstream.

Keep the incoming Host/Path and the selected upstream in the same evidence row.

8. A 200 from the wrong upstream is still a failure

Suppose /api/orders should reach orders-service, but a bad rule sends it to admin-service, which also returns 200. A status-only check hides the failure.

The lab includes exactly this case. The proxy-route state must be a mismatch even though transport and HTTP status appear successful.

9. Do not confuse forwarded context with route proof

A proxy can modify or add Host and forwarding headers. The presence of a header alone is not route proof; configuration intent and observed upstream evidence must be compared.

The lesson treats headers only as bounded fixture evidence and does not claim one universal reverse-proxy policy.

10. HSTS is a UA/server policy received over secure transport

RFC 6797 defines HSTS through the Strict-Transport-Security response header and the associated user-agent policy. The header is processed as HSTS policy when received over secure transport.

Seeing the same header on insecure HTTP is not equivalent to establishing HSTS policy. The lab tests this as a separate failure probe.

11. HSTS does not replace TLS validation or application security

HSTS can constrain a user agent to secure transport for a known HSTS host. It does not generally solve phishing, malware, a wrong proxy route, invalid server identity, or application authorization.

Record HSTS as one layer state, not as a global security verdict.

12. Separate observation, inference, and unknowns

DNS answer = 192.0.2.10 is an observation. This is the intended service endpoint may be an inference. TLS identity has not yet been checked is a valid unknown.

Edge Request Trust Path Record keeps these categories separate so a local success cannot silently expand into an unsupported claim.

13. Recovery must re-prove the failed layer

If TTL is expired, re-querying and comparing the answer is recovery evidence. For a certificate-name mismatch, repair the fixture identity and rerun that identity check. For a proxy-route mismatch, correct the route and observe the selected upstream again.

A generic restart, indiscriminate cache clearing, or simultaneous changes to several layers are not strong recovery proof.

14. Lab and transfer

The lab is fully offline and synthetic. Eight local fixtures carry hostname, DNS answer/TTL, TLS version, certificate-name evidence, path/upstream mapping, response state, and HSTS transport. No public DNS, certificate authority, production host, credential, or external network request is used.

The transfer case changes the hostname, TTL, TLS name, proxy path, and upstream mapping. All eight states must be recomputed from changed evidence; baseline verdicts cannot be copied.

15. Sources, freshness, and claim boundaries

This package uses RFC 1034/1035 only for foundational DNS and cache/TTL concepts, RFC 9846 for current TLS 1.3 status and transport scope, RFC 6797 for HSTS, and the official NGINX proxy module documentation for proxy_pass behavior. NGINX is not presented as the only reverse proxy, and the original DNS RFCs are not presented as covering every modern DNS extension.

The volatile NGINX source is due for re-review on 2026-10-17, with earlier requalification required after material documentation or fixture changes.

Assessment

There is no answer key in this lesson pack; answer it yourself and mark honestly. "Needs review" sends the lesson to your review queue.

OPS-005-S1 retrieval

State the bounded trust-path model and one non-goal.

lesson ✗AI ✗notes ✗

OPS-005-S2 application

Complete Edge Request Trust Path Record v1 for a supplied synthetic request using only direct fixture evidence.

lesson ✗AI ✗notes ✗

OPS-005-S3 diagnosis

Diagnose one changed DNS, certificate-name, proxy-route, or HSTS-transport fixture without blaming an unchanged layer.

lesson ✗AI ✗notes ✗

OPS-005-S4 decision

Choose a bounded recovery check for the failed layer and identify the shortcut you rejected.

lesson ✗AI ✗notes ✗

OPS-005-S5 transfer

Rebuild the record for a changed hostname, TTL, TLS name, path/upstream mapping and HSTS transport without copying baseline conclusions.

lesson ✗AI ✗notes ✗
Assessment rubric

A sufficient submission must satisfy all critical dimensions:

  1. Layer-model correctness — DNS, TTL/cache, TLS transport, server identity, proxy route, upstream response, and HSTS remain distinct.
  2. Evidence quality — direct observations are traceable; inference and unknowns are labeled.
  3. Scope discipline — no claim turns reverse proxy into CDN/WAF, TLS into application authorization, or HSTS into universal security.
  4. Recovery proof — the selected failed layer is re-observed after a bounded repair.
  5. Transfer independence — the changed-context case is recomputed from its own evidence.

Blocking failure occurs when a critical layer is collapsed into another, the final conclusion depends only on happy-path output, or transfer copies a baseline verdict.

References & freshness

RFC 1034 — Domain Names: Concepts and Facilities
·
RFC 1035 — Domain Names: Implementation and Specification
·
RFC 9846 — The Transport Layer Security (TLS) Protocol Version 1.3
·
RFC 6797 — HTTP Strict Transport Security (HSTS)
·
NGINX ngx_http_proxy_module
·
MAKNOW instructional evidence design
·

Case studies

SIMPLE

DNS resolves expected endpoint, TLS 1.3 transport succeeds, certificate-name evidence matches, proxy routes the path to the intended upstream, and HSTS is observed on secure transport.

WRONG_APPROACH

Treat DNS success as proof of server identity; the certificate-name mismatch fixture falsifies the shortcut.

EDGE_OR_FAILURE

TLS and HTTP status succeed while proxy mapping selects the wrong upstream; route remains failed.

TRANSFER_NEAR

A second hostname, TTL, TLS name and path/upstream mapping requires a fresh evidence record.

Lesson visuals

OPS005-V1

Lab files

This lab is offline and synthetic. It does not modify public DNS, contact a certificate authority, probe a production host, or use credentials.

  1. Inspect fixtures/cases.json.
  2. Run python run_checks.py to verify fixture structure.
  3. Implement analyze(case) in starter.py using only supplied evidence.
  4. For each case, fill Edge Request Trust Path Record v1.
  5. Keep DNS, TTL/cache, TLS transport, server identity, proxy route, upstream response, and HSTS policy separate.
  6. For the transfer case, recompute every conclusion from changed evidence.

Do not infer a layer from another layer's success. A 200 response, DNS resolution, or TLS connection is never a universal proof token.

Lesson media & slides

MAKNOW_OPS-005_DECISION_EVIDENCE_TABLE_v1.0.0.svg
DECISION EVIDENCE TABLE v1.0.0.svg
MAKNOW_OPS-005_FAILURE_REPAIR_v1.0.0.svg
FAILURE REPAIR v1.0.0.svg
MAKNOW_OPS-005_PRIMARY_MODEL_v1.0.0.svg
PRIMARY MODEL v1.0.0.svg
MAKNOW_OPS-005_WORKED_EXAMPLE_v1.0.0.svg
WORKED EXAMPLE v1.0.0.svg

Teaching files (download)

XLSXEdge Request Trust Path Record v1 v1.0.0.xlsxTeaching files (download)
DOCXEdge Request Trust Path Record v1 WORKSHEET v1.0.0.docxTeaching files (download)
PDFEdge Request Trust Path Record v1 WORKSHEET v1.0.0.pdfTeaching files (download)