Skip to content

Commit

Permalink
pam/integration-tests: Remove unused tapes for mismatching user
Browse files Browse the repository at this point in the history
This is something that we don't support anymore as per commit
e91ab76 and if we'd do it, it wouldn't work well anyways since it
would imply changing the PAM user, which as we know may lead to
logging-in wrongly as CVE-2024-9313 taught us
  • Loading branch information
3v1n0 committed Oct 10, 2024
1 parent 87bef26 commit b458ad9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 75 deletions.
28 changes: 12 additions & 16 deletions examplebroker/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,18 @@ type userInfoBroker struct {
var (
exampleUsersMu = sync.RWMutex{}
exampleUsers = map[string]userInfoBroker{
"user1": {Password: "goodpass"},
"user2": {Password: "goodpass"},
"user3": {Password: "goodpass"},
"user-mfa": {Password: "goodpass"},
"user-mfa-with-reset": {Password: "goodpass"},
"user-needs-reset": {Password: "goodpass"},
"user-needs-reset2": {Password: "goodpass"},
"user-can-reset": {Password: "goodpass"},
"user-can-reset2": {Password: "goodpass"},
"user-local-groups": {Password: "goodpass"},
"user-pre-check": {Password: "goodpass"},
"user-sudo": {Password: "goodpass"},
"user-mismatching-name": {Password: "goodpass"},
"user1": {Password: "goodpass"},
"user2": {Password: "goodpass"},
"user3": {Password: "goodpass"},
"user-mfa": {Password: "goodpass"},
"user-mfa-with-reset": {Password: "goodpass"},
"user-needs-reset": {Password: "goodpass"},
"user-needs-reset2": {Password: "goodpass"},
"user-can-reset": {Password: "goodpass"},
"user-can-reset2": {Password: "goodpass"},
"user-local-groups": {Password: "goodpass"},
"user-pre-check": {Password: "goodpass"},
"user-sudo": {Password: "goodpass"},
}
)

Expand Down Expand Up @@ -896,9 +895,6 @@ func userInfoFromName(name string) string {

case "user-sudo":
user.Groups = append(user.Groups, groupJSONInfo{Name: "sudo", UGID: ""}, groupJSONInfo{Name: "admin", UGID: ""})

case "user-mismatching-name":
user.Name = "mismatching-username"
}

// only used for tests, we can ignore the template execution error as the returned data will be failing.
Expand Down
30 changes: 0 additions & 30 deletions pam/integration-tests/testdata/tapes/cli/mismatch_username.tape

This file was deleted.

29 changes: 0 additions & 29 deletions pam/integration-tests/testdata/tapes/native/mismatch_username.tape

This file was deleted.

0 comments on commit b458ad9

Please sign in to comment.