From b7e1d7cf782427ed319da378f25f6d152330118c Mon Sep 17 00:00:00 2001
From: Justin Stephenson <jstephen@redhat.com>
Date: Mon, 10 Jan 2022 12:37:38 -0500
Subject: [PATCH] INTG: Restrict smartcard in sc auth tests

Smartcard auth related tests can fail when integration tests are run
on a machine(F34) with a yubikey inserted. Add a p11_uri option to filter
only the softhsm2-used integration test cards.
---
 src/tests/intg/test_pam_responder.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tests/intg/test_pam_responder.py b/src/tests/intg/test_pam_responder.py
index 866a79267c..db6a7e1315 100644
--- a/src/tests/intg/test_pam_responder.py
+++ b/src/tests/intg/test_pam_responder.py
@@ -134,6 +134,7 @@ def format_pam_cert_auth_conf(config):
         pam_p11_allowed_services = +pam_sss_service, +pam_sss_sc_required, \
                                    +pam_sss_try_sc, +pam_sss_allow_missing_name
         pam_cert_db_path = {config.PAM_CERT_DB_PATH}
+        p11_uri = pkcs11:manufacturer=SoftHSM%20project;token=SSSD%20Test%20Token
         p11_child_timeout = 5
         p11_wait_for_card_timeout = 5
         debug_level = 10
@@ -164,6 +165,7 @@ def format_pam_cert_auth_conf_name_format(config):
         pam_p11_allowed_services = +pam_sss_service, +pam_sss_sc_required, \
                                    +pam_sss_try_sc, +pam_sss_allow_missing_name
         pam_cert_db_path = {config.PAM_CERT_DB_PATH}
+        p11_uri = pkcs11:manufacturer=SoftHSM%20project;token=SSSD%20Test%20Token
         p11_child_timeout = 5
         p11_wait_for_card_timeout = 5
         debug_level = 10
