Skip to content

test: assert tpm_devid selectors and reject untrusted DevID CA - #7258

Merged
MarcosDY merged 2 commits into
spiffe:mainfrom
samuraixwandering:test/tpm-devid-selectors-untrusted-ca
Aug 29, 2026
Merged

MarcosDY merged 2 commits into
spiffe:mainfrom
samuraixwandering:test/tpm-devid-selectors-untrusted-ca

Conversation

@samuraixwandering

Copy link
Copy Markdown
Contributor

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality

tpm_devid integration suite (test/integration/suites/tpm-devid).

Description of change

Follow-up from review on #7203. The suite only checked that the agent ID from the provisioned DevID cert showed up in agent list.

After that, it now runs agent show and checks subject:cn, issuer:cn, and ca:fingerprint against the certs the provisioner wrote.

A second step points devid_ca_path at a CA that did not sign the DevID, recreates the server and agent (swtpm and the DevID blobs stay), and asserts attestation is rejected with unable to verify DevID signature.

ECC DevID and the password options are still out, as discussed on #7203.

Which issue this PR fixes

Fixes #7249

Test plan

  • SUITES=suites/tpm-devid make integration
  • make lint

After the agent attests, check subject:cn, issuer:cn, and
ca:fingerprint against the provisioned certs. Then recreate the
server with a DevID CA that did not sign the leaf and assert
attestation fails with unknown authority.

Refs spiffe#7249

Signed-off-by: samuraiXwandering <[email protected]>
provision writes devid-ca.pem as root inside the swtpm container.
On Linux that bind-mount file stays root-owned, so openssl on the
host cannot overwrite it.

Signed-off-by: samuraiXwandering <[email protected]>
@MarcosDY
MarcosDY added this pull request to the merge queue Aug 29, 2026
@MarcosDY MarcosDY added this to the 1.16.0 milestone Aug 29, 2026
Merged via the queue into spiffe:main with commit 4b3567d Aug 29, 2026
59 checks passed
@samuraixwandering
samuraixwandering deleted the test/tpm-devid-selectors-untrusted-ca branch August 30, 2026 02:54
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.

tpm-devid integration suite only proves the agent ID

2 participants