امنیت، هویت، استقرار و تابآوری · فصل ۴ — 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 لازم را برای یک سرویس محدود طراحی کند.
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.
OPS-005-S2 application
Complete Edge Request Trust Path Record v1 for a supplied synthetic request using only direct fixture evidence.
OPS-005-S3 diagnosis
Diagnose one changed DNS, certificate-name, proxy-route, or HSTS-transport fixture without blaming an unchanged layer.
OPS-005-S4 decision
Choose a bounded recovery check for the failed layer and identify the shortcut you rejected.
OPS-005-S5 transfer
Rebuild the record for a changed hostname, TTL, TLS name, path/upstream mapping and HSTS transport without copying baseline conclusions.
Assessment rubric
A sufficient submission must satisfy all critical dimensions:
- Layer-model correctness — DNS, TTL/cache, TLS transport, server identity, proxy route, upstream response, and HSTS remain distinct.
- Evidence quality — direct observations are traceable; inference and unknowns are labeled.
- Scope discipline — no claim turns reverse proxy into CDN/WAF, TLS into application authorization, or HSTS into universal security.
- Recovery proof — the selected failed layer is re-observed after a bounded repair.
- 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
Case studies
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.
Treat DNS success as proof of server identity; the certificate-name mismatch fixture falsifies the shortcut.
TLS and HTTP status succeed while proxy mapping selects the wrong upstream; route remains failed.
A second hostname, TTL, TLS name and path/upstream mapping requires a fresh evidence record.
Lesson visuals
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.
- Inspect
fixtures/cases.json. - Run
python run_checks.pyto verify fixture structure. - Implement
analyze(case)instarter.pyusing only supplied evidence. - For each case, fill Edge Request Trust Path Record v1.
- Keep DNS, TTL/cache, TLS transport, server identity, proxy route, upstream response, and HSTS policy separate.
- 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
Teaching files (download)