Skip to content

tests: migrate passkey tests from umockdev to vfido#8510

Draft
ikerexxe wants to merge 23 commits intoSSSD:masterfrom
ikerexxe:test-passkey-vfido
Draft

tests: migrate passkey tests from umockdev to vfido#8510
ikerexxe wants to merge 23 commits intoSSSD:masterfrom
ikerexxe:test-passkey-vfido

Conversation

@ikerexxe
Copy link
Contributor

Migrate all passkey system tests from umockdev based hardware mocking to vfido virtual FIDO2 device. The change involves converting around 20 passkey test cases to use the new vfido approach, removing approximately 100 umockdev recording files that are no longer needed and updating the test infrastructure to work with virtual FIDO2 devices. Additionally, unused passkey fixtures and references have been cleaned up.

ikerexxe added 23 commits March 10, 2026 15:13
Transform `test_passkey__register_sssctl()` to use vfido instead of
umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__register_ipa()` to use vfido instead of
umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user()` to use vfido instead of umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_with_failed_pin()` to use vfido instead
of umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_with_incorrect_mapping()` to use vfido
instead of umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_when_server_is_not_resolvable()` to use
vfido instead of umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_when_offline()` to use vfido instead of
umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__lookup_user_from_cache()` to use vfido instead
of umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_with_multiple_keys()` to use vfido
instead of umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_same_key_for_other_users()` to use vfido
instead of umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
…y_only()`

Transform `test_passkey__check_passkey_mapping_token_as_ssh_key_only()`
to use vfido instead of umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
…ping()`

Transform `test_passkey__su_user_when_add_with_ssh_key_and_mapping()` to
use vfido instead of umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_fips_fido_key()` to use vfido instead of
umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__check_tgt()` to use vfido instead of
umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__ipa_server_offline()` to use vfido instead of
umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_with_12_mappings()` to use vfido instead of
umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_no_pin_set()` to use vfido instead of
umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__prompt_options()` to use vfido instead of
umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_fallback_to_password()` to use vfido instead
of umockdev

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Now that passkey tests are using vfido this fixture was unnecessary

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Using this commit for testing purposes

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
@ikerexxe
Copy link
Contributor Author

This PR depends on SSSD/sssd-ci-containers#167 and SSSD/sssd-test-framework#237

@ikerexxe ikerexxe added the Tests label Mar 10, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully migrates the passkey system tests from umockdev to the more dynamic vfido framework. This is a significant improvement, making the tests more robust and self-contained by removing a large number of static test data files. However, there are two critical points to address before merging. The requirements.txt file has been updated to point to a personal fork, which must be reverted to an official repository. Additionally, a test case for FIPS-compliant keys appears to have lost its FIPS-specific validation, which could be a regression in test coverage.

git+https://github.com/next-actions/pytest-tier
git+https://github.com/next-actions/pytest-output
git+https://github.com/SSSD/sssd-test-framework
git+https://github.com/ikerexxe/sssd-test-framework@test-passkey-vfido

Choose a reason for hiding this comment

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

critical

The sssd-test-framework dependency points to a personal fork (ikerexxe/sssd-test-framework). For merging, this should be changed to point to the official repository. Please ensure the necessary changes from the test-passkey-vfido branch are merged into the official sssd-test-framework repository and update this dependency accordingly.

@pytest.mark.builtwith(client=["passkey", "umockdev"], provider="passkey")
def test_passkey__su_fips_fido_key(client: Client, provider: GenericProvider, moduledatadir: str, testdatadir: str):
@pytest.mark.builtwith(client=["passkey", "vfido"], provider="passkey")
def test_passkey__su_fips_fido_key(client: Client, provider: GenericProvider):

Choose a reason for hiding this comment

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

high

This test was previously named test_passkey__su_fips_fido_key and used umockdev recordings created on a FIPS-enabled host with a FIPS FIDO key. The new implementation uses the standard vfido setup without any specific FIPS configuration. This might result in a loss of test coverage for FIPS-specific scenarios. Please verify if vfido is configured to simulate a FIPS-compliant key, or update the test to reflect that it's no longer FIPS-specific. If vfido supports FIPS simulation, it should be enabled for this test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant