Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
3v1n0 committed Oct 15, 2024
1 parent 78e4e86 commit ec1ce44
Show file tree
Hide file tree
Showing 76 changed files with 373 additions and 3,568 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: QA & sanity checks
on:
push:
branches:
- main
- "*"
tags:
- "*"
pull_request:
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
- name: Install VHS and ttyd for integration tests
run: |
set -eu
go install github.com/charmbracelet/vhs@latest
go install github.com/charmbracelet/vhs@9624cda
# VHS requires ttyd >= 1.7.2 to work properly.
wget https://github.com/tsl0922/ttyd/releases/download/1.7.4/ttyd.x86_64
Expand Down
13 changes: 11 additions & 2 deletions pam/integration-tests/ssh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ func testSSHAuthenticate(t *testing.T, sharedSSHd bool) {
"Authenticate user switching to local broker": {
tape: "switch_local_broker",
ignoreUserCheck: true,
tapeSettings: []tapeSetting{{vhsHeight, 900}},
tapeSettings: []tapeSetting{
{vhsHeight, 900},
{vhsWaitPattern, "/Password:/"},
},
},
"Authenticate user and add it to local group": {
tape: "local_group",
Expand All @@ -153,12 +156,16 @@ func testSSHAuthenticate(t *testing.T, sharedSSHd bool) {
tape: "local_user_preset",
user: "root",
ignoreUserCheck: true,
tapeSettings: []tapeSetting{{vhsHeight, 200}},
tapeSettings: []tapeSetting{
{vhsHeight, 200},
{vhsWaitPattern, "/Password:/"},
},
},

"Deny authentication if max attempts reached": {
tape: "max_attempts",
ignoreUserCheck: true,
tapeSettings: []tapeSetting{{vhsWaitPattern, "/Select broker:/"}},
},
"Deny authentication if user does not exist": {
tape: "unexistent_user",
Expand All @@ -184,12 +191,14 @@ func testSSHAuthenticate(t *testing.T, sharedSSHd bool) {
"Exit authd if local broker is selected": {
tape: "local_broker",
ignoreUserCheck: true,
tapeSettings: []tapeSetting{{vhsWaitPattern, "/Password:/"}},
},
"Exit if user is not pre-checked on ssh service": {
tape: "local_ssh",
user: "user-integration-ssh-service",
pamServiceName: "sshd",
ignoreUserCheck: true,
tapeSettings: []tapeSetting{{vhsWaitPattern, "/Password:/"}},
},
"Exit authd if user sigints": {
tape: "sigint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,44 +214,11 @@ Enter your new password (3 days until mandatory):
PAM Authenticate() for user "user-can-reset-integration-accept" exited with success
PAM AcctMgmt() exited with success
>
>













────────────────────────────────────────────────────────────────────────────────
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true
== Broker selection ==
1 - local
2 - ExampleBroker
Select broker: 2
Insert 'r' to cancel the request and go back
Gimme your password:
== Password Update (use 'r' to go back) ==
1 - Proceed with password update
2 - Skip
Select action: 1
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
Repeat the previously inserted password or insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
PAM Authenticate() for user "user-can-reset-integration-accept" exited with success
PAM AcctMgmt() exited with success
>
>







Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,51 +561,4 @@ PAM AcctMgmt() exited with success



────────────────────────────────────────────────────────────────────────────────
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true
== Broker selection ==
1 - local
2 - ExampleBroker
Select broker: 2
Insert 'r' to cancel the request and go back
Gimme your password:
== Authentication mode selection (use 'r' to go back) ==
1 - Password authentication
2 - Send URL to [email protected]
3 - Use your fido device foo
4 - Use your phone +33...
5 - Use your phone +1...
6 - Pin code
7 - Use a QR code
8 - Authentication code
Select authentication mode: 1
Insert 'r' to cancel the request and go back
Gimme your password:
Leave the input field empty to wait for the authentication method or insert 'r' to go back
Plug your fido device and press with your thumb: r
== Authentication mode selection (use 'r' to go back) ==
1 - Use your fido device foo
2 - Use your phone +33...
3 - Authentication code
Select authentication mode: 1
Leave the input field empty to wait for the authentication method or insert 'r' to go back
Plug your fido device and press with your thumb: r
== Authentication mode selection (use 'r' to go back) ==
1 - Use your fido device foo
2 - Use your phone +33...
3 - Authentication code
Select authentication mode: 2
Leave the input field empty to wait for the authentication method or insert 'r' to go back
Unlock your phone +33... or accept request on web interface:
Leave the input field empty to wait for the authentication method or insert 'r' to go back
Plug your fido device and press with your thumb:
PAM Authenticate() for user "user-mfa-integration-auth" exited with success
PAM AcctMgmt() exited with success
>






────────────────────────────────────────────────────────────────────────────────
Original file line number Diff line number Diff line change
Expand Up @@ -91,39 +91,6 @@ Gimme your password:








────────────────────────────────────────────────────────────────────────────────
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true
== Broker selection ==
1 - local
2 - ExampleBroker
Select broker: 2
Insert 'r' to cancel the request and go back
Gimme your password:























Expand Down Expand Up @@ -360,72 +327,6 @@ Enter your new password (3 days until mandatory):



────────────────────────────────────────────────────────────────────────────────
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true
== Broker selection ==
1 - local
2 - ExampleBroker
Select broker: 2
Insert 'r' to cancel the request and go back
Gimme your password:
Leave the input field empty to wait for the authentication method or insert 'r' to go back
Plug your fido device and press with your thumb:
== Password Update (use 'r' to go back) ==
1 - Proceed with password update
2 - Skip
Select action: 1
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
PAM Error Message: The password is the same as the old one
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
PAM Error Message: The password fails the dictionary check - it is based on a dictionary word
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
PAM Error Message: The password is the same as the old one
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
PAM Error Message: The password is shorter than 8 characters
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):





────────────────────────────────────────────────────────────────────────────────
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true
== Broker selection ==
1 - local
2 - ExampleBroker
Select broker: 2
Insert 'r' to cancel the request and go back
Gimme your password:
Leave the input field empty to wait for the authentication method or insert 'r' to go back
Plug your fido device and press with your thumb:
== Password Update (use 'r' to go back) ==
1 - Proceed with password update
2 - Skip
Select action: 1
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
PAM Error Message: The password is the same as the old one
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
PAM Error Message: The password fails the dictionary check - it is based on a dictionary word
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
PAM Error Message: The password is the same as the old one
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
PAM Error Message: The password is shorter than 8 characters
Insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):
Repeat the previously inserted password or insert 'r' to cancel the request and go back
Enter your new password (3 days until mandatory):



────────────────────────────────────────────────────────────────────────────────
> ./pam_authd login socket=${AUTHD_TESTS_CLI_AUTHENTICATE_TESTS_SOCK} force_native_client=true
== Broker selection ==
Expand Down
Loading

0 comments on commit ec1ce44

Please sign in to comment.