Skip to content

feat: Run the controllers on an empty base image - #34

Merged
ecv merged 1 commit into
mainfrom
feat/scratch-image
Oct 21, 2026
Merged

ecv merged 1 commit into
mainfrom
feat/scratch-image

Conversation

@ecv

@ecv ecv commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Summary

The VPC and fabric identity controllers still trust the eMudhra emSign ECC Root CA G3, because the Debian distroless base they run on has not dropped it yet.

Each CA change has reached these controllers only through a Debian package update and a rebuild.

This change runs both controllers on an empty base and takes the trusted roots from the Go project's maintained bundle, compiled into each binary, which already excludes the distrusted eMudhra roots. Renovate's weekly Go update now carries future root removals.

Test plan

  • Image builds and unit tests pass in CI
  • Both controllers reach the API server and their TLS peers from the new image, with e2e green
  • A server chaining to emSign ECC Root CA G3 fails verification from the new image

Fixes #33
Related to datum-cloud/infra#7436

The image ran on Debian's distroless base, so a CA distrust such as the
eMudhra removal reached the controllers only through a rebuild against a
new Debian package. Debian still trusts emSign ECC Root CA G3 today.

Key features/changes:
- Build the runtime stage FROM scratch, keeping USER 65532:65532
- Blank-import golang.org/x/crypto/x509roots/fallback in vpc-controller
  and fabric-identity-controller, at the 20 Oct 2026 version that drops
  emSign ECC Root CA G3, C1 and C3
- Copy no CA file into the image; Go uses the embedded bundle because
  scratch has no system pool, and Renovate's gomod manager moves it

Neither binary loads time zones or looks up users, so the image carries no
tzdata or passwd file.
@ecv
ecv marked this pull request as ready for review October 21, 2026 17:31
@ecv
ecv requested a review from a team as a code owner October 21, 2026 17:31
@ecv
ecv requested a review from kevwilliams October 21, 2026 17:31

@kevwilliams kevwilliams left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go's 2026-10-20 fallback bundle carries no emSign ECC G3, and the scratch image keeps both binaries under user 65532.

@ecv
ecv merged commit a76f93f into main Oct 21, 2026
8 checks passed
@ecv
ecv deleted the feat/scratch-image branch October 21, 2026 18:48
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.

Build the Go image from scratch instead of Debian

2 participants