Skip to content

Pass through unmodeled top-level stemcell.MF keys - #65

Merged
selzoc merged 2 commits into
masterfrom
preserve-unknown-manifest-fields
Oct 9, 2026
Merged

selzoc merged 2 commits into
masterfrom
preserve-unknown-manifest-fields

Conversation

@selzoc

@selzoc selzoc commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Why

The light builder reads stemcell.MF into a fixed struct and writes it back, so it silently drops any top-level key it doesn't model. Stemcells now advertise agent_features (cloudfoundry/bosh-linux-stemcell-builder#761), and bosh-cli reads it to decide whether to put a hashed agent mbus password in VM metadata (cloudfoundry/bosh-cli#742). If the key is dropped, Directors on AWS light stemcells keep a plaintext password in user data.

What

  • Adds Extra map[string]interface{} with yaml:",inline" to manifest.Manifest. Top-level keys the struct doesn't model, now and in the future, survive the rewrite.
  • cloud_properties is still rebuilt from scratch as infrastructure + ami, as before.

Release ordering

Release this before the first stemcell that lists http-password-hmac-sha256. If it ships later, AWS light stemcells just won't advertise the feature, which fails safe: the old plaintext behavior.

Tests

$ go test ./manifest/...
ok  light-stemcell-builder/manifest
$ scripts/lint
0 issues.

New specs cover:

  • agent_features and an arbitrary unknown key survive a read/write round trip.
  • No modeled field is duplicated.
  • agent_features isn't added when the input has none.

Related

🤖 Generated with Claude Code

Comment thread manifest/manifest.go Outdated
Comment thread manifest/manifest.go Outdated
@selzoc
selzoc marked this pull request as ready for review October 9, 2026 20:15
Comment thread manifest/manifest_test.go Outdated
@selzoc
selzoc force-pushed the preserve-unknown-manifest-fields branch from 60119b4 to 6686d96 Compare October 9, 2026 20:21
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Alphasite / name: Nishad Mathur (9c24d94)
  • ✅ login: selzoc / name: Chris Selzo (d48d203)

selzoc and others added 2 commits October 9, 2026 13:23
The light stemcell builder reads stemcell.MF into a fixed struct and
writes it back, so any top-level key the struct does not model is
silently dropped. Stemcells now advertise agent_features, which
bosh-cli reads to decide whether to put a hashed agent mbus password
in VM metadata. Dropping that key leaves light-stemcell Directors with
a plaintext password.

Keep unmodeled top-level keys in an inline map so they survive the
rewrite. cloud_properties is still rebuilt from scratch, because the
builder deliberately replaces it with the AMI mapping.

ai-assisted=yes
TNZ-129825

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@selzoc
selzoc force-pushed the preserve-unknown-manifest-fields branch from 6686d96 to 9c24d94 Compare October 9, 2026 20:23
@github-project-automation github-project-automation Bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Oct 9, 2026
@selzoc
selzoc merged commit 48b6a17 into master Oct 9, 2026
8 checks passed
@selzoc
selzoc deleted the preserve-unknown-manifest-fields branch October 9, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants