ADR-0045: A TLS 1.2 exhibit on a second distribution, serving only /api/whoami#
- Status: accepted. Builds the alternative ADR-0004 deferred.
- Date: 2026-12-01
Context#
ADR-0004 put the site on TLSv1.3_2025 and deferred a legacy. subdomain on TLSv1.2_2021 as a side-by-side exhibit. The trade-off it records is visible only as a failure: a TLS 1.2 client gets a handshake failure from the apex, and nothing shows what that client would otherwise have been given.
CloudFront sets the viewer security policy per distribution, not per host or path, so a second policy needs a second distribution. The constraints: the apex must not change, and an experiment must not be able to take it down (principle 6); the exhibit should add the least attack surface that does the job (principle 10); the Certificate Transparency check compares every logged certificate's names with the served certificate's (ADR-0033); and ADR-0022 left open how a second host's failures are reported.
Decision#
legacy.testz.devis a second distribution onTLSv1.2_2021, built by thetls-exhibitmodule whileenable_tls_exhibitis true. The policy is a constant in the module, not a variable.- Its only origin is the
/api/whoamifunction, reached through the edge API's origin access control, with its cache and origin request policies. Every path answers with the visitor's own connection. GET and HEAD only, HTTPS only. It has no access to the site bucket, whose policy still trusts the site's distribution alone. The function gains two grants, each scoped to the exhibit's distribution by its ARN. - One certificate. The host is added to the site's certificate rather than given one of its own, so Certificate Transparency shows one current certificate for the domain and the CT check needs no change.
- Everything else is the site's: the response headers policy, HTTP/2 and HTTP/3, IPv6 and the price class, with no access logs and no WAF. So the policy is the difference a visitor compares. Its records are A and AAAA.
- The health check's exhibit lines fail into the same issue as the rest. The exhibit must accept TLS 1.2, negotiate TLS 1.3 with a client that offers it, and answer
/api/whoamiover TLS 1.2 with a report ofTLSv1.2. The TLS page says the exhibit is there, so a broken one makes the page untrue. This answers ADR-0022's open question. - The TLS page renders the exhibit from state, and says when it is not built.
Alternatives considered#
Serve the whole site on the exhibit too. Every page would then be readable over TLS 1.2 at another name, so the apex's refusal would be a formality, and the bucket policy would have to trust a second distribution.
TLSv1.2_2025. CloudFront's newer TLS 1.2 policy drops ChaCha20-Poly1305 and SHA-224 signatures. The clients that most need TLS 1.2 are old devices, which are also the ones without AES instructions that prefer ChaCha20. ADR-0004 names TLSv1.2_2021 as right for almost any site with real users, and that is the configuration worth showing.
A certificate of its own. The CT check would fail on a certificate naming a host the served certificate does not, until taught to read a second one: more code, for two certificates where one does.
A static page in the bucket. It cannot show the negotiated version, which is the point, and it needs the bucket.
Consequences#
Positive: curl --tls-max 1.2 against the two hosts shows ADR-0004's trade-off directly: a handshake failure from the apex, and from the exhibit a JSON answer naming TLSv1.2 and its cipher. The apex is unchanged, and the tests assert that.
Negative:
- A second distribution and a second caller of the function: more to keep right, and more for the health check to watch. Every path on the exhibit invokes the function, as every
/api/path on the apex already does. - The exhibit shares the site's certificate, so adding its host replaces that certificate, once. The new one is validated before either distribution moves to it, so a failed validation stops the apply with the apex on its old certificate. Turning the exhibit off replaces it again, and the CT check then fails until the certificate naming the host expires, as for any name removed (limitations).
- A TLS 1.2 handshake has no post-quantum key exchange: CloudFront offers it with TLS 1.3 only.
- It is no fallback for an old client: it serves nothing of the site.
Neutral: no cost: CloudFront's free tier is per account.
Revisit when#
- CloudFront retires
TLSv1.2_2021, or the apex leavesTLSv1.3_2025. - The function starts accepting input. The exhibit would then also be a path to that input over an older protocol.
- The CT check comes to read more than one served certificate, which would let the exhibit have its own.