Skip to content

Conversation

@spoore1
Copy link
Contributor

@spoore1 spoore1 commented Oct 18, 2025

No description provided.

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 adds a comprehensive suite of system tests for GDM Passkey login functionality. The tests cover various scenarios, including login with PIN, without PIN, with password fallback, multiple keys, and handling of unregistered or removed passkeys.

My review has identified a few critical and high-severity issues that should be addressed:

  • A pytest.set_trace() call needs to be removed.
  • The use of time.sleep() should be replaced with more robust polling mechanisms to avoid flaky tests.
  • Fragile shell commands for parsing ipa output should be replaced with more stable API calls.
  • There's an incorrect usage of assert with a custom assertion method, which could lead to misleading test failures.

Overall, this is a valuable addition for ensuring the quality of the GDM Passkey feature. Addressing these points will improve the reliability and maintainability of the new tests.

Copy link
Contributor

@ikerexxe ikerexxe left a 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

@ikerexxe
Copy link
Contributor

By the way, CI failures are related to your changes so review them as well

@pbrezina pbrezina force-pushed the master branch 2 times, most recently from f5d64b3 to b854636 Compare November 4, 2025 14:27
@justin-stephenson
Copy link
Contributor

justin-stephenson commented Nov 5, 2025

Hi @spoore1 would it be possible for you to add a GDM Passkey test with local (non-IPA) auth?

$ sssctl passkey-exec --register --username=alice --domain=ldap.test

Then on the ldap container 

$ vim user.ldif
# alice, ldap.test
# replace passkey data below
dn: uid=alice,dc=ldap,dc=test
mail: alice@ldap.test
uid: alice
givenName: Alice
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: posixAccount
objectClass: inetuser
objectClass: passkeyUser
sn: Moreau
cn: Alice Moreau
uidNumber: 2000
gidNumber: 2000
homeDirectory: /home/alice
loginShell: /bin/bash
gecos: alice
passkey: passkey:zSidKsavt3TudFuW9Hl4oEzif6SzPenk4LuWjQmUZB8USfhJW5NfA7faOOr9Z
 tarevL0GwKL9oytC7yPVIIPGg==,MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE+J5jOEO7E6qMa
 LA8n1oyYKVG3w0af+mrXAjybl3qdLEsSBCsk9SyuqXMbK1xnrBCyL5bgIX6ONeULx86YkP05w==

$ ldapadd -D "cn=Directory Manager" -w Secret123 -H ldap://localhost -x -f user.ldif


And on the client with `local_auth_policy = enable:passkey` set

 # su - alice@ldap.test

@justin-stephenson justin-stephenson self-assigned this Nov 5, 2025
@justin-stephenson justin-stephenson self-requested a review November 5, 2025 13:27
@spoore1 spoore1 force-pushed the test_gdm_passkey branch 5 times, most recently from c193edb to eea3a7e Compare November 8, 2025 16:43
@spoore1 spoore1 requested a review from ikerexxe November 8, 2025 16:48
Copy link
Contributor

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

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

What does the test_gdm_doc.py file do? Is it some sort of extra documentation?

Apart from that I left several comments inline

@spoore1 spoore1 force-pushed the test_gdm_passkey branch 3 times, most recently from 97ef4a5 to b3341f2 Compare November 10, 2025 15:23
@spoore1
Copy link
Contributor Author

spoore1 commented Nov 10, 2025

What does the test_gdm_doc.py file do? Is it some sort of extra documentation?

Apart from that I left several comments inline

Sorry about the confusion here. It seems I ran a git add . instead of the specific file I was updating and brought in some extra files/notes I didn't intend to include here. I've removed them again from the commit now.

@spoore1 spoore1 force-pushed the test_gdm_passkey branch 6 times, most recently from 034996a to 882fe7c Compare November 23, 2025 13:54
Copy link
Contributor

@jakub-vavra-cz jakub-vavra-cz left a comment

Choose a reason for hiding this comment

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

sss mhc.yaml comment

@spoore1 spoore1 force-pushed the test_gdm_passkey branch 4 times, most recently from dbb1690 to 398172a Compare November 24, 2025 15:54
Copy link
Contributor

@madhuriupadhye madhuriupadhye left a comment

Choose a reason for hiding this comment

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

Looks good to me; I plan to test this in IDM-CI.

Copy link
Contributor

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for your hard work getting passkey tests for this feature

Copy link
Contributor

@jakub-vavra-cz jakub-vavra-cz left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@justin-stephenson justin-stephenson left a comment

Choose a reason for hiding this comment

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

Ack, thank you.

@alexey-tikhonov
Copy link
Member

alexey-tikhonov commented Nov 25, 2025

@spoore1, does this depend on product patches / PRs, that were not merged yet?

@spoore1 spoore1 added Tests no-backport This should go to target branch only. labels Nov 25, 2025
@alexey-tikhonov
Copy link
Member

C10S CI is red due to known issue:

ERROR tests/test_feature.py::test_feature__presence[Fedora-39-0-2-9-passkey-True]
...
cat: \'/tmp/tmp.UDjJVryOAU/audit/audit.log*\': No such file or directory\n') [single exception in TeardownExceptionGroup]

The new "bare" topologies are missing from the system tests' mhc.yaml
file in provisioned_topologies.   These need to be there for upstream CI
tests to work with tests using those topologies.

Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
Reviewed-by: Jakub Vávra <jvavra@redhat.com>
Reviewed-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Madhuri Upadhye <mupadhye@redhat.com>
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
Reviewed-by: Jakub Vávra <jvavra@redhat.com>
Reviewed-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Madhuri Upadhye <mupadhye@redhat.com>
@sssd-bot
Copy link

The pull request was accepted by @alexey-tikhonov with the following PR CI status:


🟢 CodeFactor (success)
🟢 CodeQL (success)
🟢 osh-diff-scan:fedora-rawhide-x86_64:upstream (success)
🟢 rpm-build:centos-stream-10-x86_64:upstream (success)
🟢 rpm-build:fedora-41-x86_64:upstream (success)
🟢 rpm-build:fedora-42-x86_64:upstream (success)
🟢 rpm-build:fedora-43-x86_64:upstream (success)
🟢 rpm-build:fedora-rawhide-x86_64:upstream (success)
🟢 Analyze (target) / cppcheck (success)
🟢 ci / intgcheck (centos-10) (success)
🟢 ci / intgcheck (fedora-41) (success)
🟢 ci / intgcheck (fedora-42) (success)
🟢 ci / intgcheck (fedora-43) (success)
🟢 ci / intgcheck (fedora-44) (success)
🟢 ci / prepare (success)
🔴 ci / system (centos-10) (failure)
🟢 ci / system (fedora-41) (success)
🟢 ci / system (fedora-42) (success)
🟢 ci / system (fedora-43) (success)
🟢 ci / system (fedora-44) (success)
➖ Coverity scan / coverity (skipped)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@alexey-tikhonov alexey-tikhonov merged commit 05fa421 into SSSD:master Nov 26, 2025
9 of 14 checks passed
@ikerexxe ikerexxe mentioned this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted no-backport This should go to target branch only. passwordless-gdm PRs related to the Passwordless GDM feature Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants