Skip to content

test: fix timing issue in device CA rendezvous trust test - #17

Merged
knecasov merged 1 commit into
fido-device-onboard:mainfrom
mmartinv:fix-device-ca-test-timing
Jun 23, 2026
Merged

test: fix timing issue in device CA rendezvous trust test#17
knecasov merged 1 commit into
fido-device-onboard:mainfrom
mmartinv:fix-device-ca-test-timing

Conversation

@mmartinv

Copy link
Copy Markdown
Collaborator

Summary

Fix timing issue in test-device-ca-rendezvous-trust.sh that prevented proper validation of device CA certificate verification.

Problem

The test was adding the wrong Device CA certificate to the rendezvous server after the owner had already performed TO0 (voucher registration). This meant:

  1. Owner receives the ownership voucher and automatically starts TO0
  2. At TO0 time, rendezvous has no Device CA certificates configured
  3. Rendezvous accepts the voucher registration (no verification required)
  4. Test then adds the wrong certificate
  5. Device performs TO1 - succeeds because voucher was already registered
  6. Test incorrectly passes

Solution

Move the "add wrong Device CA cert to rendezvous" step before sending the ownership voucher to the owner. Now:

  1. Rendezvous has wrong certificate in its trust store
  2. Owner receives voucher and performs TO0
  3. Rendezvous verifies device cert chain against wrong CA → rejects
  4. Test correctly fails as expected

Changes

  • Reorder test steps in test/ci/test-device-ca-rendezvous-trust.sh
  • No functional code changes, only test sequencing

Test Plan

  • Run test-device-ca-rendezvous-trust.sh - should now fail correctly when wrong cert is used
  • Verify test passes after correct cert is added

🤖 Assisted-by: Claude Code

Move the "add wrong Device CA cert to rendezvous" step before sending
the ownership voucher to the owner. This ensures the rendezvous server
has the wrong certificate in its trust store when the owner performs
TO0 (voucher registration).

Previously, the wrong cert was added AFTER the owner had already
successfully registered the voucher with the rendezvous (which had
no Device CA requirements at that point). This allowed TO0 to succeed
when it should have failed, making the test ineffective.

With this fix, when the owner performs TO0, the rendezvous will verify
the voucher's device certificate chain against the wrong CA and
correctly reject it.

Signed-off-by: Miguel Martín <mmartinv@redhat.com>
Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>

@knecasov knecasov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, all tests passed (go-fdo-ci ref = refs/pull/17/head, go-fdo-server ref = refs/pull/193/head), see here.

@knecasov
knecasov merged commit be3e76b into fido-device-onboard:main Jun 23, 2026
29 of 50 checks passed
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.

2 participants