Skip to content

[autobackport: sssd-2-9] Pkcs11 soft ocsp tests#8756

Draft
sssd-bot wants to merge 1 commit into
SSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8557-to-sssd-2-9
Draft

[autobackport: sssd-2-9] Pkcs11 soft ocsp tests#8756
sssd-bot wants to merge 1 commit into
SSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8557-to-sssd-2-9

Conversation

@sssd-bot

@sssd-bot sssd-bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

This is an automatic backport of PR#8557 Pkcs11 soft ocsp tests to branch sssd-2-9, created by @krishnavema.

Caution

@krishnavema The patches did not apply cleanly. It is necessary to resolve conflicts before merging this pull request. Commits that introduced conflict are marked with CONFLICT!.

You can push changes to this pull request

git remote add sssd-bot git@github.com:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr8557-to-sssd-2-9
git checkout SSSD-sssd-backport-pr8557-to-sssd-2-9
git push sssd-bot SSSD-sssd-backport-pr8557-to-sssd-2-9 --force

Original commits
47f67f0 - Add default timeout handling for soft_ocsp and regression tests for smart card authentication (resolves: RHEL-5043)

Backported commits

  • 5759598 - CONFLICT! Add default timeout handling for soft_ocsp and regression tests for smart card authentication (resolves: RHEL-5043)

Conflicting Files Information (check for deleted and re-added files)

  • CONFLICT! Add default timeout handling for soft_ocsp and regression tests for smart card authentication (resolves: RHEL-5043)
On branch SSSD-sssd-backport-pr8557-to-sssd-2-9
You are currently cherry-picking commit 47f67f025.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/tests/system/tests/test_smartcard.py

no changes added to commit (use "git add" and/or "git commit -a")

Original Pull Request Body

Add optional label parameter for pkcs11 support

…ests for smart card authentication (resolves: RHEL-5043)

Reviewed-by: Scott Poore <spoore@redhat.com>
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
(cherry picked from commit 47f67f0)

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

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 helper functions and regression tests for smart card authentication, covering multi-token matching and soft OCSP verification under various network conditions. However, the changes contain unresolved Git conflict markers and missing imports or definitions for IPA, TOKEN_PIN, and setup_two_tokens, which will cause syntax and runtime errors.

Comment on lines +71 to +72
<<<<<<< HEAD
=======

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

Unresolved Git conflict markers (<<<<<<< HEAD and =======) are present in the code. These must be removed to prevent syntax errors and ensure the test suite can be parsed and executed.

assert (
"PIN" not in result.stderr or result.rc != 0
), f"Expected authentication to fail without soft_ocsp when OCSP is unreachable! rc={result.rc}"
>>>>>>> 47f67f025 (Add default timeout handling for soft_ocsp and regression tests for smart card authentication (resolves: RHEL-5043))

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

Unresolved Git conflict marker (>>>>>>> 47f67f025...) is present at the end of the file. This must be removed to prevent syntax errors.

@@ -11,6 +11,44 @@
from sssd_test_framework.topology import KnownTopology

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The types/variables IPA, TOKEN_PIN, and setup_two_tokens are used in the new tests but are neither imported nor defined in this file. This will cause NameError exceptions at runtime when the tests are executed. Please import IPA and setup_two_tokens from their respective modules (e.g., sssd_test_framework), and define TOKEN_PIN (e.g., TOKEN_PIN = "123456").

from sssd_test_framework.topology import KnownTopology
from sssd_test_framework.roles.ipa import IPA

TOKEN_PIN = "123456"

result = client.host.conn.run("su - localuser1 -c 'su - localuser1 -c whoami'", input="123456")
assert "PIN" in result.stderr, "String 'PIN' was not found in stderr!"
assert "localuser1" in result.stdout, "'localuser1' not found in 'whoami' output!"
<<<<<<< HEAD

@spoore1 spoore1 left a comment

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.

At a minimum, I think the conflict diff stuff needs to be resolved.

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.

5 participants