Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces system tests for multi-token smartcard authentication. It includes new helper functions for setting up tokens and authenticating, along with several test cases covering different scenarios with two tokens. A key change is updating the sssd-test-framework dependency to a personal fork to support these new tests. My review focuses on the risk associated with this dependency and on improving the maintainability and robustness of the new test code by addressing magic numbers and polling logic.
| 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/krishnavema/sssd-test-framework@multi-token-smart-card-support |
There was a problem hiding this comment.
This change introduces a dependency on a personal fork (krishnavema/sssd-test-framework). While this might be acceptable for development, it poses a security and maintenance risk for the main branch. The changes from this fork should be merged into the upstream SSSD/sssd-test-framework repository, and the dependency should point to an official release or commit from the upstream repository before this pull request is merged.
git+https://github.com/SSSD/sssd-test-framework
| TOKEN1_LABEL = "SC_Token_1" | ||
| TOKEN2_LABEL = "SC_Token_2" | ||
| TOKEN_PIN = "123456" |
There was a problem hiding this comment.
To improve readability and maintainability of the polling loop in authenticate_with_smartcard, it's good practice to define the magic numbers used there as constants here.
TOKEN1_LABEL = "SC_Token_1"
TOKEN2_LABEL = "SC_Token_2"
TOKEN_PIN = "123456"
# Constants for the user resolvability polling loop
USER_RESOLVABLE_ATTEMPTS = 15
USER_RESOLVABLE_INTERVAL_S = 2
USER_RESOLVABLE_CACHE_EXPIRY_ATTEMPT = 3
spoore1
left a comment
There was a problem hiding this comment.
This is a good start. I've run into a couple snags with testing but basics are working so here's a start for review.
2592a18 to
1322416
Compare
No description provided.