Skip to content
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

hosts: add passkey feature detection in client and IPA #41

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

ikerexxe
Copy link
Contributor

@ikerexxe ikerexxe commented Sep 5, 2023

Description

This allows to skip passkey tests when the functionality isn't provided.

Requires: next-actions/pytest-mh#15 and #42 to work.

How to test

I have created a new branch, ikerexxe/testmarker2, that contains all the changes necessary from this project to test.

In the sssd project, where your test lies, edit the requirements.txt file to point to the revision that we'd like to test:

pytest
git+https://github.com/next-actions/pytest-importance
git+https://github.com/pbrezina/pytest-mh/@require
git+https://github.com/next-actions/pytest-ticket
git+https://github.com/next-actions/pytest-tier
git+https://github.com/next-actions/pytest-output
git+https://github.com/ikerexxe/sssd-test-framework/@testmarker2

Create a new test case that depends on the passkey functionality:

@pytest.mark.topology(KnownTopology.IPA)
@pytest.mark.builtwith(client="passkey", ipa="passkey")
def test_files_provider__example(client: Client, ipa: IPA):
    pass

Run the test and check that it works as expected.

@ikerexxe ikerexxe marked this pull request as ready for review September 6, 2023 07:23
@ikerexxe ikerexxe requested review from pbrezina and justin-stephenson and removed request for pbrezina September 6, 2023 07:24
@pbrezina
Copy link
Member

pbrezina commented Sep 6, 2023

Does this work? I think this should be run on the IPA server. You want to detect "user-add-passkey" on IPA server and passkey_child or something on the client.

@pbrezina
Copy link
Member

pbrezina commented Sep 6, 2023

For client, we can use "builtwith" marker. For IPA server, we can either use the pytest-mh require or extend "builtwith" to also get an optional role parameter which would default to client.

@ikerexxe
Copy link
Contributor Author

ikerexxe commented Sep 6, 2023

In PRCI our limiting factor is FreeIPA, as only the latest versions of Fedora include the passkey changes. This was the easiest approach to check that both client and server contain the necessary changes.

I checked in the container client that the bash script works, but I've never run the python script that includes it.

Is it necessary to create the server infrastructure when the client one is already done?

@pbrezina
Copy link
Member

pbrezina commented Sep 6, 2023

ipa user-add-passkey command is run on the server during the passkey tests, not on the client. So to check that IPA server has the bits, we need to run it there.

@andreboscatto andreboscatto marked this pull request as draft September 7, 2023 12:44
@ikerexxe ikerexxe marked this pull request as ready for review September 8, 2023 10:35
@ikerexxe ikerexxe changed the title markers: add passkey hosts: add passkey feature detection in client and IPA Sep 8, 2023
Copy link
Member

@pbrezina pbrezina left a comment

Choose a reason for hiding this comment

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

Hi, I merged the marker PR. Please rebase.

sssd_test_framework/hosts/ipa.py Show resolved Hide resolved
sssd_test_framework/hosts/ipa.py Outdated Show resolved Hide resolved
@ikerexxe ikerexxe force-pushed the passkey_marker branch 2 times, most recently from 0b93f56 to e86c077 Compare September 12, 2023 10:26
@ikerexxe
Copy link
Contributor Author

This PR is ready for review again.

This allows to skip passkey tests when the functionality isn't provided.

Signed-off-by: Iker Pedrosa <[email protected]>
This allows to skip passkey tests when the functionality isn't provided.

Signed-off-by: Iker Pedrosa <[email protected]>
@pbrezina pbrezina merged commit 7e1584a into SSSD:master Sep 14, 2023
2 checks passed
@ikerexxe ikerexxe deleted the passkey_marker branch September 18, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants