Skip to content

fix: comment out airgap-only secrets by default in values-secret template - #136

Merged
butler54 merged 1 commit into
validatedpatterns:mainfrom
butler54:fix/values-secret-airgap-defaults
Aug 31, 2026
Merged

fix: comment out airgap-only secrets by default in values-secret template#136
butler54 merged 1 commit into
validatedpatterns:mainfrom
butler54:fix/values-secret-airgap-defaults

Conversation

@butler54

Copy link
Copy Markdown
Collaborator

Problem

values-secret.yaml.template unconditionally enables airgap-only secrets
(registryCaCert, bootstrap_secrets/mirror-registry-helm-oci), so
connected deployments (Azure, connected bare metal) hit make load-secrets
failures because the referenced local files
(~/.coco-pattern/mirror-registry-ca-cert.pem,
~/.coco-pattern/mirror-registry-password) only exist for disconnected-mirror
deployments.

Separately, pcrStash (Azure) and firmwareReferenceValues (bare metal) are
both enabled unconditionally so the same template works on either topology,
but nothing ensured the unused platform's local reference-value file
existed — so make load-secrets could fail on whichever platform you aren't
actively deploying to (this exact issue was previously worked around
manually with an empty {} placeholder during earlier testing).

Changes

  • Comment out registryCaCert and bootstrap_secrets in
    values-secret.yaml.template by default, wrapped in
    AIRGAP-MIRROR-SECRETS-START/-END markers.
  • Add scripts/enable-airgap-secrets.sh + make enable-airgap-secrets to
    uncomment both blocks together for airgap deployments in one step; wired
    into airgap/DEPLOY-RUNBOOK.md step D-3 so the automated runbook keeps
    working unattended.
  • Also comment out tdxCollateral by default for consistency — it was
    labeled # Optional in its section header but was active unconditionally,
    the same class of bug (bare-metal-TDX-only, would fail on Azure / AMD
    SEV-SNP bare metal).
  • Keep pcrStash and firmwareReferenceValues active by default (no
    per-topology template editing required). To prevent make load-secrets
    from failing on whichever platform's file is missing:
    • gen-secrets.sh now pre-touches both ~/.coco-pattern/measurements.json
      and ~/.coco-pattern/firmware-reference-values.json with an empty {}
      placeholder if they don't already exist.
    • collect-firmware-refvals.sh also touches the sibling platform's file
      after a real collection run, in case gen-secrets.sh wasn't re-run.
    • Real collected data always overwrites the placeholder; nothing is ever
      clobbered.
  • Update README.md and docs/firmware-reference-values.md, which had
    stale instructions to manually uncomment firmwareReferenceValues (it was
    never actually commented in the template).

Verification

  • bash -n on all touched shell scripts.
  • Manually simulated gen-secrets.sh end-to-end (stubbed jose): confirmed
    both refval placeholders are created and the printed instructions match
    the new defaults.
  • Verified values-secret.yaml.template parses as valid YAML in both its
    default (commented) state and after running enable-airgap-secrets.sh
    (confirmed registryCaCert + bootstrap_secrets appear correctly, and
    the script is idempotent on repeated runs).
  • make help picks up the new enable-airgap-secrets target correctly.

…l/azure refvals

values-secret.yaml.template unconditionally enabled airgap-only secrets
(registryCaCert, bootstrap_secrets/mirror-registry-helm-oci), so connected
deployments (Azure, connected bare metal) hit 'make load-secrets' failures
for local files that only exist on disconnected-mirror deployments
(mirror-registry-ca-cert.pem, mirror-registry-password).

- Comment out registryCaCert and bootstrap_secrets by default, wrapped in
  AIRGAP-MIRROR-SECRETS markers.
- Add scripts/enable-airgap-secrets.sh + 'make enable-airgap-secrets' to
  uncomment both blocks together for airgap deployments; wired into
  airgap/DEPLOY-RUNBOOK.md D-3.
- Also comment out tdxCollateral by default for consistency: it was labeled
  '# Optional' but active unconditionally, same class of bug.
- pcrStash (Azure) and firmwareReferenceValues (bare metal) remain active by
  default so the same values-secret file works on either topology without
  editing. To keep 'make load-secrets' from failing on whichever platform's
  file is missing, gen-secrets.sh now pre-touches both
  ~/.coco-pattern/measurements.json and firmware-reference-values.json with
  an empty '{}' placeholder, and collect-firmware-refvals.sh also touches
  the sibling platform's file after a real collection run. Real collected
  data always overwrites the placeholder.
- Update README.md and docs/firmware-reference-values.md, which had stale
  instructions to manually uncomment firmwareReferenceValues.
@butler54
butler54 requested a review from a team August 31, 2026 11:37
@butler54
butler54 merged commit 745eed6 into validatedpatterns:main Aug 31, 2026
5 checks passed
@butler54
butler54 deleted the fix/values-secret-airgap-defaults branch August 31, 2026 11:41
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