Skip to content

tests: migrate passkey tests from umockdev to vfido#8510

Draft
ikerexxe wants to merge 28 commits into
SSSD:masterfrom
ikerexxe:test-passkey-vfido
Draft

tests: migrate passkey tests from umockdev to vfido#8510
ikerexxe wants to merge 28 commits into
SSSD:masterfrom
ikerexxe:test-passkey-vfido

Conversation

@ikerexxe
Copy link
Copy Markdown
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
Copy link
Copy Markdown
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
Copy Markdown

@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
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is for testing purposes only. Keeping it open until SSSD/sssd-test-framework#237 is merged

Comment thread src/tests/system/tests/test_passkey.py
@ikerexxe ikerexxe force-pushed the test-passkey-vfido branch 4 times, most recently from 47fe31a to 1b4589e Compare March 17, 2026 10:46
@ikerexxe ikerexxe force-pushed the test-passkey-vfido branch from 1b4589e to fa2d86e Compare May 8, 2026 12:55
ikerexxe and others added 2 commits May 12, 2026 15:36
Add comprehensive TMT plan for testing SSSD passkey functionality across
IPA, LDAP, and Samba identity providers using containerized environments.

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
Enable automated passkey testing on pull requests after COPR builds
complete. Tests run on fedora-all and centos-stream-10 targets using
the TMT plan.

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
ikerexxe added 19 commits May 14, 2026 12:24
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
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>
ikerexxe added 7 commits May 14, 2026 12:24
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>
@jakub-vavra-cz
Copy link
Copy Markdown
Contributor

While refactoring, please make sure that this is gone:

$ ruff check src/tests/system/tests/
E713 [*] Test for membership should be not in
--> src/tests/system/tests/test_passkey.py:738:13
|
736 | assert "Ticket cache" in output, "Failed to get the TGT"
737 | assert (
738 | not (
| _____________^
739 | | "No Kerberos TGT granted as the server does not support this method. "
740 | | "Your single-sign on(SSO) experience will be affected"
741 | | )
742 | | in output
| |_________________^
743 | ), "Get the console message about TGT"
|
help: Convert to not in

E713 [*] Test for membership should be not in
--> src/tests/system/tests/test_passkey.py:785:9
|
783 | assert "Ticket cache" in output, "Failed to get the TGT"
784 | assert not (
785 | / (
786 | | "No Kerberos TGT granted as the server does not support this method. "
787 | | "Your single-sign on(SSO) experience will be affected"
788 | | )
789 | | in output
| |_________________^
790 | ), "Got the console message about No Kerberos TGT granted"
|
help: Convert to not in

E713 [*] Test for membership should be not in
--> src/tests/system/tests/test_passkey.py:838:13
|
836 | assert "Ticket cache" in output, "Failed to get the TGT"
837 | assert (
838 | not (
| _____________^
839 | | "No Kerberos TGT granted as the server does not support this method."
840 | | "Your single-sign on(SSO) experience will be affected"
841 | | )
842 | | in output
| |_________________^
843 | ), "Got the console message about No Kerberos TGT granted"
|
help: Convert to not in

E713 [*] Test for membership should be not in
--> src/tests/system/tests/test_passkey.py:884:13
|
882 | assert "Ticket cache" in output, "Failed to get the TGT"
883 | assert (
884 | not (
| _____________^
885 | | "No Kerberos TGT granted as the server does not support this method."
886 | | " Your single-sign on(SSO) experience will be affected"
887 | | )
888 | | in output
| |_________________^
889 | ), "Got the console message about No Kerberos TGT granted"
|
help: Convert to not in

Found 4 errors.
[*] 4 fixable with the --fix option.

Copy link
Copy Markdown
Contributor

@spoore1 spoore1 left a comment

Choose a reason for hiding this comment

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

First quick review. I think you need to restore the data/test_ipa directory to fix the failing system tests.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is still needed for other tests.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is needed as well still.

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.

3 participants