-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: authentication, adding generic password policy tests #7728
base: master
Are you sure you want to change the base?
test: authentication, adding generic password policy tests #7728
Conversation
danlavu
commented
Nov 30, 2024
•
edited
Loading
edited
- depends on roles, adding default domain password policy management sssd-test-framework#139
- added generic password change tests
- removed generic password change tests in test_ldap and made them only ppolicy tests, since generic now covers ldap
- renamed test_ldap names.
bfc5ed5
to
aea7f4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of places missing ()'s I think.
aea7f4e
to
1242992
Compare
1242992
to
20248d2
Compare
Will post the test_authentication runs when they are done, but all the test are passing with SSSD/sssd-test-framework#139 |
bf3564c
to
a1a7718
Compare
This is ready for review. |
* user is forced to changed password at login * user logins and issues a password change
a1a7718
to
28554ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly comment/wording changes suggested with a few questions mixed in. Looks like a good set of tests for password policy.
provider: GenericProvider, | ||
): | ||
""" | ||
:title: User logins and issues a password change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wording for the title seems difficult to read to me. Maybe something like user logs in and issues a password change
? Or maybe just user authenticates and issues a password change
? Or User issues a password change after login
? I'm not sure which makes the most sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the last one, it clear on what it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me.
29bec62
to
1da3edb
Compare
* few scenarios have been removed * ppolicy tests have been made into ppolicy tests only, since normal ldap is covered by the generic provider now * renamed some of the test cases * removed su from a password change test * removed some test cases that are now covered by the new test cases
1da3edb
to
922826c
Compare
1. User is authenticated | ||
2. Password change is unsuccessful | ||
3. Password change is successful | ||
4. User cannot log in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the required topology is AnyProvider
, so, if I understood correctly, this test could be run against an AD.
If I remember correctly, AD will allow you to log in with your old password during 1 hour (this is the default but configurable) after you changed it. In this situation this check (and thus the test) will fail.
I think this behavior should be disabled if the provider is AD. Or is it already done by the framework?
provider: GenericProvider, | ||
): | ||
""" | ||
:title: User issues a password change after login with password policy complexity enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any difference with the previous test? The previous test also has complexity enabled.
|
||
# 389ds 'Must change password' needs to be triggered by an administrative password reset first. | ||
if isinstance(provider, LDAP): | ||
user.modify(password=old_pass) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be part of the LDAPUser.password_change_at_logon()
method if this is required by the LDAP server?
:steps | ||
1. Login as user | ||
2. Offline, login as user | ||
3. Offline, login as user with bad password | ||
3. Offline user authentication with incorrect password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two lines with number 3
.