Skip to content

build(docker): run the Server and BFF on aspnet:10.0-resolute for X25519MLKEM768 - #554

Merged
pdevito3 merged 1 commit into
mainfrom
build/pq-runtime-image
Dec 4, 2026
Merged

pdevito3 merged 1 commit into
mainfrom
build/pq-runtime-image

Conversation

@pdevito3

@pdevito3 pdevito3 commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Why

The outbound TLS of the Server and BFF containers should use the hybrid post-quantum key exchange X25519MLKEM768. aspnet:10.0 is Ubuntu 24.04.5 with OpenSSL 3.0.13, so .NET offers and negotiates only x25519. aspnet:10.0-resolute is Ubuntu 26.04.1 with OpenSSL 3.5.5, so .NET offers X25519MLKEM768 first.

What changed

  • FullstackTemplate.Server/Dockerfile and FullstackTemplate.Bff/Dockerfile: the runtime stage is aspnet:10.0-resolute, not aspnet:10.0.
  • The sdk:10.0 build stages stay. The publish is framework-dependent and portable, and both stages use runtime 10.0.15.

Tradeoffs

  • Alpine (10.0-alpine, OpenSSL 3.5.9) also negotiates X25519MLKEM768. It uses musl and a different base family, so resolute is the smaller step from the current glibc Ubuntu image.
  • The images are about 17 MB (6%) larger: Server 293.2 MB to 310.3 MB, BFF 284.0 MB to 301.1 MB (arm64).

Blast Radius

  • ICU goes from 74 to 78. .NET, tzdata (including tzdata-legacy), CA certificates, the app user, the environment, and the entrypoint do not change. TimeZoneId already handles the split into tzdata-legacy on 26.04.
  • The ClientHello carries a key share of about 1.2 KB. A very old middlebox can fail on a large hello. A server that does not support ML-KEM picks x25519, which is also offered.
  • No CI job, AppHost call, doc, or skill names the runtime image.

Verification

Measured on linux/arm64, with images built from main and from this branch. The evidence and the review-gate result are in a PR comment.

Check main this branch
kex probe in each image (dotnet kex.dll, cloudflare trace) kex=X25519 kex=X25519MLKEM768
Server and BFF in their own handshakes to accounts.google.com and www.googleapis.com (pcap, ServerHello group) 29 (x25519), 5 of 5 4588 (X25519MLKEM768), 5 of 5
Server /health, BFF /health, BFF /, BFF /bff/login 200, 200, 200, 302 200, 200, 200, 302
  • dotnet build FullstackTemplate.slnx: 0 warnings, 0 errors.
  • The reviewer ran the UnitTests (2449 of 2449 pass) and Bff.Tests (562 of 562 pass) in sdk:10.0-resolute.
  • Not covered: a full login against a real IdP, a Server API call with a valid token, and amd64. The resolute tag publishes amd64.

…519MLKEM768

The aspnet:10.0 image is Ubuntu 24.04 with OpenSSL 3.0.13, so the outbound
TLS of .NET offers and negotiates only X25519. The 10.0-resolute image is
Ubuntu 26.04 with OpenSSL 3.5.5, so .NET offers X25519MLKEM768 first and
negotiates it with servers that support it.
@pdevito3

pdevito3 commented Dec 4, 2026

Copy link
Copy Markdown
Owner Author

review-gate: passed b92786f

An independent thermo-nuclear-review (opus) read the diff at this SHA. It found no high or medium findings. These low findings stay open:

  • Low: nothing records why the tag is resolute, and no check would catch a revert to 10.0. Kept out of the diff on purpose, to keep the change at two lines. The reason is in the commit message and the PR body. A follow-up could add a comment above each FROM, or a CI check of the image.
  • Low: the ClientHello is larger (about 1.2 KB key share). This is in Blast Radius. Google accepted it in the capture.
  • Low: the images are about 17 MB larger. This is in Tradeoffs.

The reviewer also ran UnitTests (2449 of 2449 pass) and Bff.Tests (562 of 562 pass) in sdk:10.0-resolute.

Evidence (linux/arm64)

kex probe, dotnet kex.dll mounted into each built image:

ft-server:baseline  Ubuntu 24.04.5 LTS  libssl3t64 3.0.13-0ubuntu3.18  tls=TLSv1.3 kex=X25519
ft-server:resolute  Ubuntu 26.04.1 LTS  libssl3t64 3.5.5-1ubuntu3.7    tls=TLSv1.3 kex=X25519MLKEM768
ft-bff:baseline     Ubuntu 24.04.5 LTS  libssl3t64 3.0.13-0ubuntu3.18  tls=TLSv1.3 kex=X25519
ft-bff:resolute     Ubuntu 26.04.1 LTS  libssl3t64 3.5.5-1ubuntu3.7    tls=TLSv1.3 kex=X25519MLKEM768

The apps' own outbound handshakes, captured with tcpdump and filtered to the container IPs. Postgres, the Server, and the BFF ran with Auth__Authority=https://accounts.google.com. The BFF was restarted and /bff/login called. The Server got a request with a bearer token. Fields: container, ClientHello SNI, offered groups.

baseline  ClientHello: server accounts.google.com 29 | bff accounts.google.com 29 | bff www.googleapis.com 29 | server accounts.google.com 29 | server www.googleapis.com 29
baseline  ServerHello group: 29 29 29 29 29
resolute  ClientHello: server accounts.google.com 4588,29 | bff accounts.google.com 4588,29 | bff www.googleapis.com 4588,29 | server accounts.google.com 4588,29 | server www.googleapis.com 4588,29
resolute  ServerHello group: 4588 4588 4588 4588 4588   (4588 = 0x11EC = X25519MLKEM768)

HTTP checks, the same on both: Server /health 200 Healthy. BFF /health 200 Healthy. BFF / 200 with the SPA index.html. BFF /bff/login 302 to accounts.google.com/o/oauth2/v2/auth. BFF /api/v1/users/me with no session 401. Neither run logged an error. Both runs logged the same warning templates.

Image facts: ICU 74 to 78. tzdata-legacy is present on both. No curl on either. Size: Server 293.2 MB to 310.3 MB, BFF 284.0 MB to 301.1 MB.

@pdevito3

pdevito3 commented Dec 4, 2026

Copy link
Copy Markdown
Owner Author

PASS+NOTES - independent verification of head b92786f744658ca4184607d930dcce639f492a3f against base origin/main 864899a (linux/arm64, Docker Desktop, images built from the repo root).

  • kex (framework-dependent .NET 10 probe run on each image's own dotnet, cloudflare trace, 3 runs each): base Server and BFF kex=X25519 (Ubuntu 24.04.5, OpenSSL 3.0.13). Head Server and BFF kex=X25519MLKEM768 (Ubuntu 26.04.1, OpenSSL 3.5.5). Runtime is .NET 10.0.15 on both.
  • Stack on head images (docker compose, Postgres 17, Google as the authority): Server /health 200 Healthy. BFF /health 200. BFF / serves the SPA (title, index-*.js 200). /bff/login gives 302 to accounts.google.com/o/oauth2/v2/auth with PKCE, so the BFF fetched the discovery document over TLS. /bff/user gives 401. The logs have no exception and no Error or Fatal line. The warnings are the same kinds as on base.
  • ICU 78 and tzdata: on both images America/New_York, US/Eastern, Eastern Standard Time, and Asia/Calcutta resolve, and the de-DE and ja-JP dates format the same.
  • Image size: Server 293 to 310 MB. BFF 284 to 301 MB.
  • Note, idle memory (fresh stack, the same warm-up, 60 s idle, docker stats, runs head, base, head): Server about 112 MiB on base and 170 to 176 MiB on head. BFF about 85 MiB on base and 126 to 128 MiB on head. That is about +55 MiB (+50%) per app, and the PR does not state it. All of the gap is anonymous memory. File and shmem RSS are equal. On head, AnonHugePages is 80 MiB (Server) and 66 MiB (BFF). On base it is 4 MiB and 0. The host has THP always. A minimal .NET probe shows +14 MB anon at process start, also in invariant globalization mode, and MALLOC_ARENA_MAX and the glibc hugetlb tunable do not change it. Inferred: the 26.04 userland (glibc 2.43) lets the anonymous memory of the runtime be backed by transparent huge pages. On a host with THP madvise the gap is probably smaller. This was not measured. Not a blocker, but size memory limits for it, or mention it in the PR.
  • Not covered: amd64, a full login, and an authenticated Server call.

@pdevito3
pdevito3 merged commit c43bb23 into main Dec 4, 2026
23 checks passed
@pdevito3
pdevito3 deleted the build/pq-runtime-image branch December 4, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant