From 183be671d836687a4aa3ad6fa54b5a35500134a8 Mon Sep 17 00:00:00 2001 From: denisonbarbosa Date: Fri, 1 Dec 2023 11:40:52 -0400 Subject: [PATCH] Regenerating golden files --- ...authenticate_user_and_offer_password_reset | 98 +------ .../authenticate_user_and_reset_password | 109 +------- .../golden/authenticate_user_successfully | 76 +---- .../authenticate_user_switching_auth_mode | 152 ++-------- .../golden/authenticate_user_switching_broker | 208 ++++++++++++++ .../authenticate_user_switching_username | 208 ++++++++++++++ ...thenticate_user_with_form_mode_with_button | 124 ++------- .../golden/authenticate_user_with_mfa | 164 ++--------- .../golden/authenticate_user_with_qr_code | 260 ++++++++++++++++++ ...eny_authentication_if_max_attempts_reached | 122 ++------ ...deny_authentication_if_user_does_not_exist | 130 +++++++++ .../exit_authd_if_local_broker_is_selected | 67 +---- .../golden/exit_authd_if_user_sigints | 156 +++++++++++ .../remember_last_successful_broker_and_mode} | 208 +++----------- 14 files changed, 1122 insertions(+), 960 deletions(-) rename pam/integration-tests/testdata/{TestIntegration => TestCLIIntegration}/golden/authenticate_user_and_offer_password_reset (83%) rename pam/integration-tests/testdata/{TestIntegration => TestCLIIntegration}/golden/authenticate_user_and_reset_password (83%) rename pam/integration-tests/testdata/{TestIntegration => TestCLIIntegration}/golden/authenticate_user_successfully (81%) rename pam/integration-tests/testdata/{TestIntegration => TestCLIIntegration}/golden/authenticate_user_switching_auth_mode (80%) create mode 100644 pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_broker create mode 100644 pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_username rename pam/integration-tests/testdata/{TestIntegration => TestCLIIntegration}/golden/authenticate_user_with_form_mode_with_button (82%) rename pam/integration-tests/testdata/{TestIntegration => TestCLIIntegration}/golden/authenticate_user_with_mfa (85%) create mode 100644 pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_with_qr_code rename pam/integration-tests/testdata/{TestIntegration => TestCLIIntegration}/golden/deny_authentication_if_max_attempts_reached (78%) create mode 100644 pam/integration-tests/testdata/TestCLIIntegration/golden/deny_authentication_if_user_does_not_exist rename pam/integration-tests/testdata/{TestIntegration => TestCLIIntegration}/golden/exit_authd_if_local_broker_is_selected (73%) create mode 100644 pam/integration-tests/testdata/TestCLIIntegration/golden/exit_authd_if_user_sigints rename pam/integration-tests/testdata/{TestIntegration/golden/remember_last_successful_auth_mode => TestCLIIntegration/golden/remember_last_successful_broker_and_mode} (68%) diff --git a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_and_offer_password_reset b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_and_offer_password_reset similarity index 83% rename from pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_and_offer_password_reset rename to pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_and_offer_password_reset index a09500ca52..52e6cef274 100644 --- a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_and_offer_password_reset +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_and_offer_password_reset @@ -1,14 +1,5 @@ -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name @@ -33,7 +24,7 @@ ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Username: user-can-reset @@ -48,15 +39,6 @@ Username: user-can-reset - - - - - - - - - @@ -68,7 +50,7 @@ Username: user-can-reset ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -84,15 +66,6 @@ Username: user-can-reset - - - - - - - - - @@ -103,7 +76,7 @@ Username: user-can-reset ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > @@ -118,15 +91,6 @@ Gimme your password - - - - - - - - - @@ -138,7 +102,7 @@ Gimme your password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your new password (3 days until mandatory) > > @@ -155,15 +119,6 @@ Enter your new password (3 days until mandatory) - - - - - - - - - @@ -173,7 +128,7 @@ Enter your new password (3 days until mandatory) ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your new password (3 days until mandatory) > > @@ -190,15 +145,6 @@ Enter your new password (3 days until mandatory) - - - - - - - - - @@ -208,13 +154,13 @@ Enter your new password (3 days until mandatory) ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your new password (3 days until mandatory) > > -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -227,15 +173,6 @@ Acct mgmt return: 25 - - - - - - - - - @@ -243,13 +180,13 @@ Acct mgmt return: 25 ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your new password (3 days until mandatory) > > -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -262,15 +199,6 @@ Acct mgmt return: 25 - - - - - - - - - diff --git a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_and_reset_password b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_and_reset_password similarity index 83% rename from pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_and_reset_password rename to pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_and_reset_password index 5941669c25..d2dd9b338b 100644 --- a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_and_reset_password +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_and_reset_password @@ -1,14 +1,5 @@ -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name @@ -33,7 +24,7 @@ ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Username: user-needs-reset @@ -48,15 +39,6 @@ Username: user-needs-reset - - - - - - - - - @@ -68,7 +50,7 @@ Username: user-needs-reset ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -84,15 +66,6 @@ Username: user-needs-reset - - - - - - - - - @@ -103,7 +76,7 @@ Username: user-needs-reset ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > @@ -118,15 +91,6 @@ Gimme your password - - - - - - - - - @@ -138,7 +102,7 @@ Gimme your password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your new password > > @@ -153,15 +117,6 @@ Enter your new password - - - - - - - - - @@ -173,7 +128,7 @@ Enter your new password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your new password > ******* > @@ -188,15 +143,6 @@ Enter your new password - - - - - - - - - @@ -208,7 +154,7 @@ Enter your new password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your new password > ******* > ******* @@ -223,15 +169,6 @@ Enter your new password - - - - - - - - - @@ -243,11 +180,11 @@ Enter your new password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your new password > ******* -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -260,15 +197,6 @@ Acct mgmt return: 25 - - - - - - - - - @@ -278,11 +206,11 @@ Acct mgmt return: 25 ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your new password > ******* -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -295,15 +223,6 @@ Acct mgmt return: 25 - - - - - - - - - diff --git a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_successfully b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_successfully similarity index 81% rename from pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_successfully rename to pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_successfully index 26195c6c26..faf3d1fffa 100644 --- a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_successfully +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_successfully @@ -1,14 +1,5 @@ -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name @@ -33,7 +24,7 @@ ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Username: user1 @@ -48,15 +39,6 @@ Username: user1 - - - - - - - - - @@ -68,7 +50,7 @@ Username: user1 ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -84,15 +66,6 @@ Username: user1 - - - - - - - - - @@ -103,7 +76,7 @@ Username: user1 ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > @@ -118,15 +91,6 @@ Gimme your password - - - - - - - - - @@ -138,10 +102,10 @@ Gimme your password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -154,15 +118,6 @@ Acct mgmt return: 25 - - - - - - - - - @@ -173,10 +128,10 @@ Acct mgmt return: 25 ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -189,15 +144,6 @@ Acct mgmt return: 25 - - - - - - - - - diff --git a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_switching_auth_mode b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_auth_mode similarity index 80% rename from pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_switching_auth_mode rename to pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_auth_mode index 332c30c923..c081465230 100644 --- a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_switching_auth_mode +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_auth_mode @@ -1,14 +1,5 @@ -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name @@ -33,17 +24,8 @@ ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock -Username: user-switch-mode - - - - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-integration-switch-mode @@ -68,7 +50,7 @@ Username: user-switch-mode ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -84,15 +66,6 @@ Username: user-switch-mode - - - - - - - - - @@ -103,7 +76,7 @@ Username: user-switch-mode ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > @@ -118,15 +91,6 @@ Gimme your password - - - - - - - - - @@ -138,11 +102,11 @@ Gimme your password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your authentication method > 1. Password authentication - 2. Send URL to user-switch-mode@gmail.com + 2. Send URL to user-integration-switch-mode@gmail.com 3. Use your fido device foo 4. Use your phone +33… 5. Use your phone +1… @@ -159,22 +123,13 @@ Gimme your password - - - - - - - - - ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock -Click on the link received at user-switch-mode@gmail.com or enter the code: +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Click on the link received at user-integration-switch-mode@gmail.com or enter the code: > @@ -188,15 +143,6 @@ Click on the link received at user-switch-mode@gmail.com or enter the code: - - - - - - - - - @@ -208,11 +154,11 @@ Click on the link received at user-switch-mode@gmail.com or enter the code: ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your authentication method 1. Password authentication -> 2. Send URL to user-switch-mode@gmail.com +> 2. Send URL to user-integration-switch-mode@gmail.com 3. Use your fido device foo 4. Use your phone +33… 5. Use your phone +1… @@ -229,21 +175,12 @@ Click on the link received at user-switch-mode@gmail.com or enter the code: - - - - - - - - - ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Plug your fido device and press with your thumb @@ -258,15 +195,6 @@ Plug your fido device and press with your thumb - - - - - - - - - @@ -278,11 +206,11 @@ Plug your fido device and press with your thumb ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your authentication method 1. Password authentication - 2. Send URL to user-switch-mode@gmail.com + 2. Send URL to user-integration-switch-mode@gmail.com > 3. Use your fido device foo 4. Use your phone +33… 5. Use your phone +1… @@ -299,21 +227,12 @@ Plug your fido device and press with your thumb - - - - - - - - - ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > @@ -328,15 +247,6 @@ Gimme your password - - - - - - - - - @@ -348,10 +258,10 @@ Gimme your password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -364,15 +274,6 @@ Acct mgmt return: 25 - - - - - - - - - @@ -383,10 +284,10 @@ Acct mgmt return: 25 ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -399,15 +300,6 @@ Acct mgmt return: 25 - - - - - - - - - diff --git a/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_broker b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_broker new file mode 100644 index 0000000000..6cb3abf92e --- /dev/null +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_broker @@ -0,0 +1,208 @@ +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-integration-switch-broker + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + +> 1. local + 2. ExampleBroker + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Gimme your password +> + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your authentication method + +> 1. Password authentication + 2. Send URL to user-integration-switch-broker@gmail.com + 3. Use your fido device foo + 4. Use your phone +33… + 5. Use your phone +1… + 6. Use a QR code + 7. Authentication code + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + + 1. local +> 2. ExampleBroker + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + +> 1. local + 2. ExampleBroker + + + + + + + + + + + + + + + + + +Auth return: The return value should be ignored by PAM dispatch: +Acct mgmt return: The return value should be ignored by PAM dispatch +> +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + +> 1. local + 2. ExampleBroker + + + + + + + + + + + + + + + + + +Auth return: The return value should be ignored by PAM dispatch: +Acct mgmt return: The return value should be ignored by PAM dispatch +> +──────────────────────────────────────────────────────────────────────────────── diff --git a/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_username b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_username new file mode 100644 index 0000000000..32e7141009 --- /dev/null +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_switching_username @@ -0,0 +1,208 @@ +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user1 + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + +> 1. local + 2. ExampleBroker + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-integration-switch-name + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + +> 1. local + 2. ExampleBroker + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Gimme your password +> + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Gimme your password +Auth return: +Acct mgmt return: +> + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Gimme your password +Auth return: +Acct mgmt return: +> + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── diff --git a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_with_form_mode_with_button b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_with_form_mode_with_button similarity index 82% rename from pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_with_form_mode_with_button rename to pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_with_form_mode_with_button index 6527b7ca03..c1f22372db 100644 --- a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_with_form_mode_with_button +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_with_form_mode_with_button @@ -1,14 +1,5 @@ -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name @@ -33,17 +24,8 @@ ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock -Username: user-form-with-button - - - - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-integration-form-w-button @@ -68,7 +50,7 @@ Username: user-form-with-button ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -84,15 +66,6 @@ Username: user-form-with-button - - - - - - - - - @@ -103,7 +76,7 @@ Username: user-form-with-button ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > @@ -118,15 +91,6 @@ Gimme your password - - - - - - - - - @@ -138,11 +102,11 @@ Gimme your password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your authentication method > 1. Password authentication - 2. Send URL to user-form-with-button@gmail.com + 2. Send URL to user-integration-form-w-button@gmail.com 3. Use your fido device foo 4. Use your phone +33… 5. Use your phone +1… @@ -159,21 +123,12 @@ Gimme your password - - - - - - - - - ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > @@ -189,15 +144,6 @@ Enter your one time credential - - - - - - - - - @@ -208,7 +154,7 @@ Enter your one time credential ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > @@ -224,15 +170,6 @@ Enter your one time credential - - - - - - - - - @@ -243,7 +180,7 @@ Enter your one time credential ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > @@ -259,15 +196,6 @@ Enter your one time credential - - - - - - - - - @@ -278,12 +206,12 @@ Enter your one time credential ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > temporary pass00 -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -296,15 +224,6 @@ Acct mgmt return: 25 - - - - - - - - - @@ -313,12 +232,12 @@ Acct mgmt return: 25 ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > temporary pass00 -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -331,15 +250,6 @@ Acct mgmt return: 25 - - - - - - - - - diff --git a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_with_mfa b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_with_mfa similarity index 85% rename from pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_with_mfa rename to pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_with_mfa index bba27be14e..5cba43b5bb 100644 --- a/pam/integration-tests/testdata/TestIntegration/golden/authenticate_user_with_mfa +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_with_mfa @@ -1,14 +1,5 @@ -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name @@ -33,7 +24,7 @@ ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Username: user-mfa @@ -48,15 +39,6 @@ Username: user-mfa - - - - - - - - - @@ -68,7 +50,7 @@ Username: user-mfa ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -84,15 +66,6 @@ Username: user-mfa - - - - - - - - - @@ -103,7 +76,7 @@ Username: user-mfa ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > @@ -118,15 +91,6 @@ Gimme your password - - - - - - - - - @@ -138,7 +102,7 @@ Gimme your password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your authentication method > 1. Password authentication @@ -159,21 +123,12 @@ Gimme your password - - - - - - - - - ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > @@ -188,15 +143,6 @@ Gimme your password - - - - - - - - - @@ -208,7 +154,7 @@ Gimme your password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Plug your fido device and press with your thumb @@ -223,15 +169,6 @@ Plug your fido device and press with your thumb - - - - - - - - - @@ -243,7 +180,7 @@ Plug your fido device and press with your thumb ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your authentication method > 1. Use your fido device foo @@ -260,15 +197,6 @@ Plug your fido device and press with your thumb - - - - - - - - - @@ -278,7 +206,7 @@ Plug your fido device and press with your thumb ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Plug your fido device and press with your thumb @@ -293,15 +221,6 @@ Plug your fido device and press with your thumb - - - - - - - - - @@ -313,7 +232,7 @@ Plug your fido device and press with your thumb ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Unlock your phone +33… or accept request on web interface: @@ -328,15 +247,6 @@ Unlock your phone +33… or accept request on web interface: - - - - - - - - - @@ -348,7 +258,7 @@ Unlock your phone +33… or accept request on web interface: ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your authentication method > 1. Use your phone +33… @@ -364,15 +274,6 @@ Unlock your phone +33… or accept request on web interface: - - - - - - - - - @@ -383,7 +284,7 @@ Unlock your phone +33… or accept request on web interface: ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Unlock your phone +33… or accept request on web interface: @@ -398,15 +299,6 @@ Unlock your phone +33… or accept request on web interface: - - - - - - - - - @@ -418,9 +310,9 @@ Unlock your phone +33… or accept request on web interface: ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock -Auth return: 0 -Acct mgmt return: 25 +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Auth return: +Acct mgmt return: > @@ -433,15 +325,6 @@ Acct mgmt return: 25 - - - - - - - - - @@ -453,9 +336,9 @@ Acct mgmt return: 25 ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock -Auth return: 0 -Acct mgmt return: 25 +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Auth return: +Acct mgmt return: > @@ -468,15 +351,6 @@ Acct mgmt return: 25 - - - - - - - - - diff --git a/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_with_qr_code b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_with_qr_code new file mode 100644 index 0000000000..cbba71f405 --- /dev/null +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/authenticate_user_with_qr_code @@ -0,0 +1,260 @@ +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-integration-qr-code + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + +> 1. local + 2. ExampleBroker + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Gimme your password +> + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your authentication method + +> 1. Password authentication + 2. Send URL to user-integration-qr-code@gmail.com + 3. Use your fido device foo + 4. Use your phone +33… + 5. Use your phone +1… + 6. Use a QR code + 7. Authentication code + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Enter the following code after flashing the address: 1337 + +█████████████████████████████████ +█████████████████████████████████ +████ ▄▄▄▄▄ █ ▀▀█▄██ █ ▄▄▄▄▄ ████ +████ █ █ █▀▄██ ▄▄▄██ █ █ ████ +████ █▄▄▄█ ██▄ █ ▄ ▄▄█ █▄▄▄█ ████ +████▄▄▄▄▄▄▄█ ▀▄▀▄▀ ▀▄█▄▄▄▄▄▄▄████ +████▄█ ▄█ ▄ ▀█▄▀▀▄▄█ █▄▀█▄█ ▄████ +█████▀█▀▄ ▄ ▄▀█▀▀▀ ▀█▄▀▄▄▀▀██████ +████▄ █▀█▄▄▄██ █▀█▀█▄ █▄▄ ████ +████▀▄ ▀▄▄█ ▄▄█ ▀▄▀▀ ▀▀ █▄▄▀████ +███████▄▄█▄█ ▀▄▀▀█▀ ▄▄▄ ▄ ▄ ████ +████ ▄▄▄▄▄ █ █▄ ██▀ █▄█ █▄ ████ +████ █ █ █▀▄ ▄ ▀▀▄ ▄ ▀▀▀████ +████ █▄▄▄█ █▄█▄▄▄▄█ █ █ █ ▄█████ +████▄▄▄▄▄▄▄█▄█▄█▄█▄████▄▄▄▄▄▄████ +█████████████████████████████████ +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + + + [ regenerate QR code ] + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Enter the following code after flashing the address: 1337 + +█████████████████████████████████ +█████████████████████████████████ +████ ▄▄▄▄▄ █ ▀▀█▄██ █ ▄▄▄▄▄ ████ +████ █ █ █▀▄██ ▄▄▄██ █ █ ████ +████ █▄▄▄█ ██▄ █ ▄ ▄▄█ █▄▄▄█ ████ +████▄▄▄▄▄▄▄█ ▀▄▀▄▀ ▀▄█▄▄▄▄▄▄▄████ +████▄█ ▄█ ▄ ▀█▄▀▀▄▄█ █▄▀█▄█ ▄████ +█████▀█▀▄ ▄ ▄▀█▀▀▀ ▀█▄▀▄▄▀▀██████ +████▄ █▀█▄▄▄██ █▀█▀█▄ █▄▄ ████ +████▀▄ ▀▄▄█ ▄▄█ ▀▄▀▀ ▀▀ █▄▄▀████ +███████▄▄█▄█ ▀▄▀▀█▀ ▄▄▄ ▄ ▄ ████ +████ ▄▄▄▄▄ █ █▄ ██▀ █▄█ █▄ ████ +████ █ █ █▀▄ ▄ ▀▀▄ ▄ ▀▀▀████ +████ █▄▄▄█ █▄█▄▄▄▄█ █ █ █ ▄█████ +████▄▄▄▄▄▄▄█▄█▄█▄█▄████▄▄▄▄▄▄████ +█████████████████████████████████ +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + + + [ regenerate QR code ] + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Enter the following code after flashing the address: 1337 + +█████████████████████████████████ +█████████████████████████████████ +████ ▄▄▄▄▄ █ ▀▀█▄██ █ ▄▄▄▄▄ ████ +████ █ █ █▀▄██ ▄▄▄██ █ █ ████ +████ █▄▄▄█ ██▄ █ ▄ ▄▄█ █▄▄▄█ ████ +████▄▄▄▄▄▄▄█ ▀▄▀▄▀ ▀▄█▄▄▄▄▄▄▄████ +████▄█ ▄█ ▄ ▀█▄▀▀▄▄█ █▄▀█▄█ ▄████ +█████▀█▀▄ ▄ ▄▀█▀▀▀ ▀█▄▀▄▄▀▀██████ +████▄ █▀█▄▄▄██ █▀█▀█▄ █▄▄ ████ +████▀▄ ▀▄▄█ ▄▄█ ▀▄▀▀ ▀▀ █▄▄▀████ +███████▄▄█▄█ ▀▄▀▀█▀ ▄▄▄ ▄ ▄ ████ +████ ▄▄▄▄▄ █ █▄ ██▀ █▄█ █▄ ████ +████ █ █ █▀▄ ▄ ▀▀▄ ▄ ▀▀▀████ +████ █▄▄▄█ █▄█▄▄▄▄█ █ █ █ ▄█████ +████▄▄▄▄▄▄▄█▄█▄█▄█▄████▄▄▄▄▄▄████ +█████████████████████████████████ +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + + + [ regenerate QR code ] + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Enter the following code after flashing the address: 1337 + +█████████████████████████████████ +█████████████████████████████████ +████ ▄▄▄▄▄ █ ▀▀█▄██ █ ▄▄▄▄▄ ████ +████ █ █ █▀▄██ ▄▄▄██ █ █ ████ +████ █▄▄▄█ ██▄ █ ▄ ▄▄█ █▄▄▄█ ████ +████▄▄▄▄▄▄▄█ ▀▄▀▄▀ ▀▄█▄▄▄▄▄▄▄████ +████▄█ ▄█ ▄ ▀█▄▀▀▄▄█ █▄▀█▄█ ▄████ +█████▀█▀▄ ▄ ▄▀█▀▀▀ ▀█▄▀▄▄▀▀██████ +████▄ █▀█▄▄▄██ █▀█▀█▄ █▄▄ ████ +████▀▄ ▀▄▄█ ▄▄█ ▀▄▀▀ ▀▀ █▄▄▀████ +███████▄▄█▄█ ▀▄▀▀█▀ ▄▄▄ ▄ ▄ ████ +████ ▄▄▄▄▄ █ █▄ ██▀ █▄█ █▄ ████ +████ █ █ █▀▄ ▄ ▀▀▄ ▄ ▀▀▀████ +████ █▄▄▄█ █▄█▄▄▄▄█ █ █ █ ▄█████ +████▄▄▄▄▄▄▄█▄█▄█▄█▄████▄▄▄▄▄▄████ +█████████████████████████████████ +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + + +Auth return: +Acct mgmt return: +> +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Enter the following code after flashing the address: 1337 + +█████████████████████████████████ +█████████████████████████████████ +████ ▄▄▄▄▄ █ ▀▀█▄██ █ ▄▄▄▄▄ ████ +████ █ █ █▀▄██ ▄▄▄██ █ █ ████ +████ █▄▄▄█ ██▄ █ ▄ ▄▄█ █▄▄▄█ ████ +████▄▄▄▄▄▄▄█ ▀▄▀▄▀ ▀▄█▄▄▄▄▄▄▄████ +████▄█ ▄█ ▄ ▀█▄▀▀▄▄█ █▄▀█▄█ ▄████ +█████▀█▀▄ ▄ ▄▀█▀▀▀ ▀█▄▀▄▄▀▀██████ +████▄ █▀█▄▄▄██ █▀█▀█▄ █▄▄ ████ +████▀▄ ▀▄▄█ ▄▄█ ▀▄▀▀ ▀▀ █▄▄▀████ +███████▄▄█▄█ ▀▄▀▀█▀ ▄▄▄ ▄ ▄ ████ +████ ▄▄▄▄▄ █ █▄ ██▀ █▄█ █▄ ████ +████ █ █ █▀▄ ▄ ▀▀▄ ▄ ▀▀▀████ +████ █▄▄▄█ █▄█▄▄▄▄█ █ █ █ ▄█████ +████▄▄▄▄▄▄▄█▄█▄█▄█▄████▄▄▄▄▄▄████ +█████████████████████████████████ +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + + +Auth return: +Acct mgmt return: +> +──────────────────────────────────────────────────────────────────────────────── diff --git a/pam/integration-tests/testdata/TestIntegration/golden/deny_authentication_if_max_attempts_reached b/pam/integration-tests/testdata/TestCLIIntegration/golden/deny_authentication_if_max_attempts_reached similarity index 78% rename from pam/integration-tests/testdata/TestIntegration/golden/deny_authentication_if_max_attempts_reached rename to pam/integration-tests/testdata/TestCLIIntegration/golden/deny_authentication_if_max_attempts_reached index a7fd3cfd27..5e8b11dc93 100644 --- a/pam/integration-tests/testdata/TestIntegration/golden/deny_authentication_if_max_attempts_reached +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/deny_authentication_if_max_attempts_reached @@ -1,14 +1,5 @@ -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name @@ -33,17 +24,8 @@ ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock -Username: user-max-attempts - - - - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-integration-max-attempts @@ -68,7 +50,7 @@ Username: user-max-attempts ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -84,15 +66,6 @@ Username: user-max-attempts - - - - - - - - - @@ -103,7 +76,7 @@ Username: user-max-attempts ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > @@ -118,15 +91,6 @@ Gimme your password - - - - - - - - - @@ -138,7 +102,7 @@ Gimme your password ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > invalid password, should be goodpass @@ -153,15 +117,6 @@ invalid password, should be goodpass - - - - - - - - - @@ -173,7 +128,7 @@ invalid password, should be goodpass ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > invalid password, should be goodpass @@ -188,15 +143,6 @@ invalid password, should be goodpass - - - - - - - - - @@ -208,7 +154,7 @@ invalid password, should be goodpass ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > invalid password, should be goodpass @@ -223,15 +169,6 @@ invalid password, should be goodpass - - - - - - - - - @@ -243,7 +180,7 @@ invalid password, should be goodpass ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > invalid password, should be goodpass @@ -258,15 +195,6 @@ invalid password, should be goodpass - - - - - - - - - @@ -278,12 +206,11 @@ invalid password, should be goodpass ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > -Error: authentication: invalid password, should be goodpass -Auth return: 7 -Acct mgmt return: 25 +Auth return: Authentication failure: invalid password, should be goodpass +Acct mgmt return: The return value should be ignored by PAM dispatch > @@ -297,14 +224,6 @@ Acct mgmt return: 25 - - - - - - - - @@ -313,12 +232,11 @@ Acct mgmt return: 25 ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Gimme your password > -Error: authentication: invalid password, should be goodpass -Auth return: 7 -Acct mgmt return: 25 +Auth return: Authentication failure: invalid password, should be goodpass +Acct mgmt return: The return value should be ignored by PAM dispatch > @@ -332,14 +250,6 @@ Acct mgmt return: 25 - - - - - - - - diff --git a/pam/integration-tests/testdata/TestCLIIntegration/golden/deny_authentication_if_user_does_not_exist b/pam/integration-tests/testdata/TestCLIIntegration/golden/deny_authentication_if_user_does_not_exist new file mode 100644 index 0000000000..82a488d2c1 --- /dev/null +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/deny_authentication_if_user_does_not_exist @@ -0,0 +1,130 @@ +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-non-existent + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + +> 1. local + 2. ExampleBroker + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + + 1. local +> 2. ExampleBroker + + + + + + + + + + + + + + + + + +Auth return: System error: can't select broker: rpc error: code = Unknown desc = can't start authentication transaction: user "user-non-existent" d +oes not exist +Acct mgmt return: The return value should be ignored by PAM dispatch +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + + 1. local +> 2. ExampleBroker + + + + + + + + + + + + + + + + + +Auth return: System error: can't select broker: rpc error: code = Unknown desc = can't start authentication transaction: user "user-non-existent" d +oes not exist +Acct mgmt return: The return value should be ignored by PAM dispatch +──────────────────────────────────────────────────────────────────────────────── diff --git a/pam/integration-tests/testdata/TestIntegration/golden/exit_authd_if_local_broker_is_selected b/pam/integration-tests/testdata/TestCLIIntegration/golden/exit_authd_if_local_broker_is_selected similarity index 73% rename from pam/integration-tests/testdata/TestIntegration/golden/exit_authd_if_local_broker_is_selected rename to pam/integration-tests/testdata/TestCLIIntegration/golden/exit_authd_if_local_broker_is_selected index 98e0170a31..fa5b536fb2 100644 --- a/pam/integration-tests/testdata/TestIntegration/golden/exit_authd_if_local_broker_is_selected +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/exit_authd_if_local_broker_is_selected @@ -1,14 +1,5 @@ -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name @@ -33,17 +24,8 @@ ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock -Username: user-local - - - - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-local-broker @@ -68,7 +50,7 @@ Username: user-local ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -84,15 +66,6 @@ Username: user-local - - - - - - - - - @@ -103,7 +76,7 @@ Username: user-local ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -125,20 +98,11 @@ Username: user-local - - - - - - - - - -Auth return: 25 -Acct mgmt return: 25 +Auth return: The return value should be ignored by PAM dispatch: +Acct mgmt return: The return value should be ignored by PAM dispatch > ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -160,16 +124,7 @@ Acct mgmt return: 25 - - - - - - - - - -Auth return: 25 -Acct mgmt return: 25 +Auth return: The return value should be ignored by PAM dispatch: +Acct mgmt return: The return value should be ignored by PAM dispatch > ──────────────────────────────────────────────────────────────────────────────── diff --git a/pam/integration-tests/testdata/TestCLIIntegration/golden/exit_authd_if_user_sigints b/pam/integration-tests/testdata/TestCLIIntegration/golden/exit_authd_if_user_sigints new file mode 100644 index 0000000000..962223c08a --- /dev/null +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/exit_authd_if_user_sigints @@ -0,0 +1,156 @@ +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-integration-sigint + + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock + Select your provider + +> 1. local + 2. ExampleBroker + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Gimme your password +> + + + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Gimme your password +Auth return: Critical error - immediate abort: cancel requested +Acct mgmt return: The return value should be ignored by PAM dispatch +> + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Gimme your password +Auth return: Critical error - immediate abort: cancel requested +Acct mgmt return: The return value should be ignored by PAM dispatch +> + + + + + + + + + + + + + + + + + + + + +──────────────────────────────────────────────────────────────────────────────── diff --git a/pam/integration-tests/testdata/TestIntegration/golden/remember_last_successful_auth_mode b/pam/integration-tests/testdata/TestCLIIntegration/golden/remember_last_successful_broker_and_mode similarity index 68% rename from pam/integration-tests/testdata/TestIntegration/golden/remember_last_successful_auth_mode rename to pam/integration-tests/testdata/TestCLIIntegration/golden/remember_last_successful_broker_and_mode index 196c407a7b..119f69019f 100644 --- a/pam/integration-tests/testdata/TestIntegration/golden/remember_last_successful_auth_mode +++ b/pam/integration-tests/testdata/TestCLIIntegration/golden/remember_last_successful_broker_and_mode @@ -1,14 +1,5 @@ -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name @@ -33,17 +24,8 @@ ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock -Username: user-remember-mode - - - - - - - - - +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-integration-remember-mode @@ -68,7 +50,7 @@ Username: user-remember-mode ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your provider > 1. local @@ -84,15 +66,6 @@ Username: user-remember-mode - - - - - - - - - @@ -103,11 +76,11 @@ Username: user-remember-mode ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Select your authentication method > 1. Password authentication - 2. Send URL to user-remember-mode@gmail.com + 2. Send URL to user-integration-remember-mode@gmail.com 3. Use your fido device foo 4. Use your phone +33… 5. Use your phone +1… @@ -124,21 +97,12 @@ Username: user-remember-mode - - - - - - - - - ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > @@ -154,15 +118,6 @@ Enter your one time credential - - - - - - - - - @@ -173,12 +128,12 @@ Enter your one time credential ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > temporary pass0 -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -195,71 +150,18 @@ Acct mgmt return: 25 - - - - - - - - - - - - -──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock -Enter your one time credential -> temporary pass0 - -Auth return: 0 -Acct mgmt return: 25 -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - - - - - - - - - - - - - - - ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > temporary pass0 -Auth return: 0 -Acct mgmt return: 25 -> ./pam_authd socket=/tmp/authd.sock -Username: user-remember-mode - - - - - - - - - +Auth return: +Acct mgmt return: +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user name @@ -278,23 +180,14 @@ Username: user-remember-mode ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > temporary pass0 -Auth return: 0 -Acct mgmt return: 25 -> ./pam_authd socket=/tmp/authd.sock - Select your provider - -> 1. local - 2. ExampleBroker - - - - - - +Auth return: +Acct mgmt return: +> ./pam_authd socket=/tmp/pam-cli-tests.sock +Username: user-integration-remember-mode @@ -313,13 +206,13 @@ Acct mgmt return: 25 ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > temporary pass0 -Auth return: 0 -Acct mgmt return: 25 -> ./pam_authd socket=/tmp/authd.sock +Auth return: +Acct mgmt return: +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > @@ -335,31 +228,22 @@ Enter your one time credential - - - - - - - - - ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > temporary pass0 -Auth return: 0 -Acct mgmt return: 25 -> ./pam_authd socket=/tmp/authd.sock +Auth return: +Acct mgmt return: +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > temporary pass0 -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -372,29 +256,20 @@ Acct mgmt return: 25 - - - - - - - - - ──────────────────────────────────────────────────────────────────────────────── -> ./pam_authd socket=/tmp/authd.sock +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > temporary pass0 -Auth return: 0 -Acct mgmt return: 25 -> ./pam_authd socket=/tmp/authd.sock +Auth return: +Acct mgmt return: +> ./pam_authd socket=/tmp/pam-cli-tests.sock Enter your one time credential > temporary pass0 -Auth return: 0 -Acct mgmt return: 25 +Auth return: +Acct mgmt return: > @@ -407,14 +282,5 @@ Acct mgmt return: 25 - - - - - - - - - ────────────────────────────────────────────────────────────────────────────────