-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pam/integration-tests/native: Check that the user 'r' is accepted
This is something that was manually tested, but since 'r' is a special string in the native model, let's add an explicit check, ensuring that a such user can work properly. And no, we won't support a 'r' secret, even though we could just wait for a broker refusal before using it as a "go back" command.
- Loading branch information
Showing
3 changed files
with
242 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
198 changes: 198 additions & 0 deletions
198
...tiveAuthenticate/golden/deny_authentication_if_user_does_not_exist_and_matches_cancel_key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true | ||
Username: | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
──────────────────────────────────────────────────────────────────────────────── | ||
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true | ||
Username: r | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
──────────────────────────────────────────────────────────────────────────────── | ||
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true | ||
Username: r | ||
== Broker selection (use 'r' to go back) == | ||
1 - local | ||
2 - ExampleBroker | ||
Select broker: | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
──────────────────────────────────────────────────────────────────────────────── | ||
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true | ||
Username: r | ||
== Broker selection (use 'r' to go back) == | ||
1 - local | ||
2 - ExampleBroker | ||
Select broker: 2 | ||
Insert 'r' to cancel the request and go back | ||
Gimme your password: | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
──────────────────────────────────────────────────────────────────────────────── | ||
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true | ||
Username: r | ||
== Broker selection (use 'r' to go back) == | ||
1 - local | ||
2 - ExampleBroker | ||
Select broker: 2 | ||
Insert 'r' to cancel the request and go back | ||
Gimme your password: | ||
user not found | ||
user not found | ||
PAM Authenticate() for user "r" exited with error (PAM exit code: 7): Authentication failure | ||
acct=incomplete | ||
PAM AcctMgmt() exited with error (PAM exit code: 25): The return value should be ignored by PAM | ||
dispatch | ||
> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
──────────────────────────────────────────────────────────────────────────────── | ||
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true | ||
Username: r | ||
== Broker selection (use 'r' to go back) == | ||
1 - local | ||
2 - ExampleBroker | ||
Select broker: 2 | ||
Insert 'r' to cancel the request and go back | ||
Gimme your password: | ||
user not found | ||
user not found | ||
PAM Authenticate() for user "r" exited with error (PAM exit code: 7): Authentication failure | ||
acct=incomplete | ||
PAM AcctMgmt() exited with error (PAM exit code: 25): The return value should be ignored by PAM | ||
dispatch | ||
> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
──────────────────────────────────────────────────────────────────────────────── |
43 changes: 43 additions & 0 deletions
43
pam/integration-tests/testdata/tapes/native/cancel_key_user.tape
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Output cancel_key_user.txt | ||
Output cancel_key_user.gif # If we don't specify a .gif output, it will create a default out.gif file. | ||
|
||
# Configuration header to standardize the output. | ||
# Does not work with the "Source" command. | ||
Set Width 800 | ||
Set Height 500 | ||
# TODO: Ideally, we should use Ubuntu Mono. However, the github runner is still on Jammy, which does not have it. | ||
# We should update this to use Ubuntu Mono once the runner is updated. | ||
Set FontFamily "Monospace" | ||
Set FontSize 13 | ||
Set Padding 0 | ||
Set Margin 0 | ||
Set Shell bash | ||
|
||
Hide | ||
Type "./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true" | ||
Enter | ||
Sleep 300ms | ||
Show | ||
|
||
Hide | ||
Type "r" | ||
Sleep 300ms | ||
Show | ||
|
||
Hide | ||
Enter | ||
Sleep 300ms | ||
Show | ||
|
||
Hide | ||
Type "2" | ||
Enter | ||
Sleep 500ms | ||
Show | ||
|
||
Hide | ||
Enter | ||
Sleep 500ms | ||
Show | ||
|
||
Sleep 300ms |