- 
                Notifications
    You must be signed in to change notification settings 
- Fork 20
Adding support for virtual passkey functionality #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| Summary of ChangesHello @spoore1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the sssd_test_framework's capabilities by introducing robust support for testing virtual passkey functionality. It establishes a dedicated utility for programmatic control over virtual FIDO devices, seamlessly integrates this control into existing client and IPA roles, and provides advanced authentication methods to simulate diverse virtual passkey login scenarios. This foundational work enables automated and thorough validation of SSSD's interaction with passkey-based authentication mechanisms. Highlights
 Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either  
 Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a  Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
 | 
There was a problem hiding this 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 adds support for testing virtual passkey (vfido) functionality. It introduces a new Vfido utility class, and adds methods to IPAUser and SUAuthenticationUtils to handle passkey registration and authentication in tests. The changes are a good step forward, but I've found a few issues. There's a critical bug in vfido.py where pin_disable calls the wrong command, and another critical bug in authentication.py with incorrect match/case syntax that will prevent PIN validation from working. I've also left several medium-severity comments regarding hardcoded paths, magic strings, and inconsistencies in docstrings and messages. Please address these points to improve the robustness and maintainability of the new test utilities.
8c82ea5    to
    5f65046      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments inline.
Apart from that I have one question, do we need any kernel change for vfido to run?
| self._exec("remove-passkey", [passkey_mapping]) | ||
| return self | ||
|  | ||
| def vfido_passkey_add_register( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that the method begins with vfido to differentiate it from the umockdev version. I was to propose to use method overloading, but apparently this functionality isn't available in python 🤦
Can we manage this somehow so that the method is called the same way for vfido and umockdev?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into that closer. I did this here to be able to keep them separate while I was writing and testing the new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I made some changes to use the existing method names as wrappers to determine which function to run and just pass kwargs. Seems fairly straightforward but, I need to run more tests to make sure it's good with existing test_passkey.py tests.
| 
 It does require the vhci-hcd kernel module.   That will be taken care of in the sssd-ci-containers setup code here: I've updated the systemd unit file to modprobe that before starting the service. If it's not in the PR yet, it will be soon since I've updated my local repo already. | 
No description provided.