fix: ship CA bundle in layered image for kms-client TLS#159
Open
mpjunior92 wants to merge 2 commits into
Open
Conversation
The kms-client binary copied into the layered image makes HTTPS calls to userapi-compute*.eigencloud.xyz/v2/attestation, but the layered image only inherits whatever CA store the user's base image happens to ship. Minimal bases (alpine without ca-certificates, scratch, distroless, custom slim images) lack one, causing kms-client to fail the TLS handshake with x509: certificate signed by unknown authority. Attestation upload is silently abandoned (29 retries, then logged as ERROR but non-fatal); the workload still starts but its attestation never reaches the user API and the verify dashboard shows "No attestations available." Parity with the compute-tee and ecloud-platform fixes landing in parallel. Fix: copy alpine 3.20.10's CA bundle to /usr/local/share/eigenx-ca-certs.crt in the layered image, and prefix the kms-client invocation in compute-source-env.sh with SSL_CERT_FILE pointing at that path. The user's /etc/ssl/ is never touched; the env-var override is scoped to the single kms-client process. Alpine pinned to 3.20.10 for reproducibility.
Contributor
Author
Local end-to-end validationBuilt a real Go binary using the same Test matrix
The error string in the bug repro is identical to what's in mainnet/sepolia-prod kms-client boot logs for affected vTPM apps. Confirms
Go's Earlier validation layers (also passing)
Real sepolia-dev redeploy still recommended as a final smoke test post-merge but no longer load-bearing. |
Per code review: the layered Dockerfile comment says the bundle is for both kms-client and tls-client, but only the kms-client invocation got the SSL_CERT_FILE prefix. tls-client/tls-keygen makes ACME calls and HTTPS callbacks to the user API for cert persistence, which would hit the same x509 failure on minimal user base images. Apply the same process-scoped override to that invocation.
mcclurejt
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The kms-client binary copied into the layered image makes HTTPS calls to
userapi-compute*.eigencloud.xyz/v2/attestation, but the layered image only inherits whatever CA store the user's base image happens to ship. Minimal bases (alpine without ca-certificates, scratch, distroless, custom slim images) lack one, causing kms-client to fail the TLS handshake withx509: certificate signed by unknown authority. Attestation upload is silently abandoned (29 retries, then logged as ERROR but non-fatal); the workload still starts but its attestation never reaches the user API and the verify dashboard shows "No attestations available."Confirmed live: a vTPM app on mainnet (
0x751847d2c430e3b5a843d017ea8d0a3d453377d0) — built with this CLI/SDK — has 36 releases, status=Running, butv2_count=0. Boot logs show 30 retries against the userapi/v2/attestationURL all failing withx509: certificate signed by unknown authority.Parity with the compute-tee and ecloud-platform fixes landing in parallel.
Fix
3.20.10's CA bundle to/usr/local/share/eigenx-ca-certs.crtin the layered image (non-standard path, does NOT touch the user's/etc/ssl/).compute-source-env.shwithSSL_CERT_FILE=pointing at that path. The env-var override is scoped to the single kms-client process — the user's runtime never sees it.3.20.10for build determinism.Files changed
packages/sdk/src/client/common/templates/Dockerfile.layered.tmplpackages/sdk/src/client/common/templates/compute-source-env.sh.tmplTest plan
ca-certificates(e.g.alpinewith no extras, orscratch/distroless) and confirm/usr/local/share/eigenx-ca-certs.crtis present. (verified locally — see comment below)/etc/ssl/is unchanged inside the running container, andSSL_CERT_FILEis not set in the user workload's environment. (verified locally — see comment below)ca-certificatescontinue to work unchanged. (verified locally — see comment below)