Skip to content

feat(swtpm): add swtpm to bcvk test image + wire systemd-tpm2-swtpm.service for CI VMs #3

Description

@foil-copy-overrate

Context

Tracks the bcvk-side implementation for BLOCKER-006 (yubiOS ADR-016 §Feature 1).

Related: yubi-OS/yubiOS#34 (yubiOS-side drop-in + spec committed)

Goal

Enable swtpm (IBM software TPM 2.0) in bcvk ephemeral CI VMs so:

  • /dev/tpm0 is available inside the VM
  • systemd-tpm2-swtpm.service starts successfully
  • ConditionSecurity=measured-os passes in yubiOS-enroll.service CI tests
  • TPM2 code paths (PCR measurements, LUKS PCR binding) are covered without physical hardware

yubiOS production trust anchor remains YubiKey FIDO2 (ADR-003). swtpm is for test coverage only.

Scope

  1. Add packages to bcvk test image:

    dnf install -y swtpm swtpm-tools
    
  2. Enable the service in the VM preset:

    systemctl enable systemd-tpm2-swtpm.service
    
  3. Add --feature tpm2-swtpm to bcvk run (or auto-detect from the drop-in presence in the image).

  4. Verify /dev/tpm0 before tests — bcvk should wait for the socket before handing control to the test harness.

Gate

Requires systemd >= 261 in the test image (systemd-tpm2-swtpm.service is a v261 addition). The yubiOS base image 45.20260625.0 carries systemd-261-2.fc45 ✅.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions