-
Notifications
You must be signed in to change notification settings - Fork 218
Fix UPDB Authentication Lockout Logic and Improve Test Coverage #3273
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
base: main
Are you sure you want to change the base?
Conversation
|
Side note: |
|
Just noticed that the test run has failed. This is most likely due to me adding an additional The test |
b5ef7e3 to
8d897c0
Compare
|
@qrkourier |
|
On my fork of the ziti project all tests pass successfully. I cannot follow through, why they should fail here :( My fork is synced to the newest commit and the dev-branch is rebased on main... 😕 |
|
Hi there, See: https://github.com/jan94/ziti/actions/runs/18552220976 |
|
The error at the Fablab Smoketest is: Run $(go env GOPATH)/bin/ziti-ci configure-git
unable to read ssh key from env var gh_ci_key. Found? trueI did not do any changes regarding the actions nor any ssh keys. |
Hi Jan, I suspect this test will succeed only when the job is running under the upstream organization. The private key setup is a little complicated. I'll let the team know this is ready for review. Thank you for the pull! |
|
You are most welcome 👍 |
|
I have taken an initial look, but not to the level I needed in order to provide constructive feedback. I am in the middle of delivering another set of features and will circle back to this after I get those features up for review. |
|
Some bookkeeping needs to be done no matter what:
The above allows github to link the issuer, pr, and commits. Additionally, our change log tooling will add the issue to the fix line should it be released. |
make sure that login attempts are counted correctly and reset upon reaching the maxAttempts or successful authentication
adding test to validate updb login behavior
improve test description
make sure only failed attempt triggers lockout
adjust tests to code change and add test to ensure that a disabled identity cannot login
set expected authticators in Test_Authenticators_AdminUsingAdminEndpoints to four, as one additional authenticator for the TestUsers has been added to the context
change test description
|
All changed. Thank you for the hint(s)! |
Hi OpenZiti Devs!
I have noticed that there is bug in the way how UPDB logins are handled when
maxAttemptsandlockoutDurationMinutesis configured on the auth-policy attached to the respective identity. I have raised that issue in the discourse forum, but it has not yet received a response, so I investigated my self and implemented this fix. 🤓Please have a look and consider merging it! 🙂
Thank you and have a nice weekend
Jan
Summary of Changes
UPDB Authentication Logic (controller/model/authenticator_mod_updb.go):
Tests (tests/auth_updb_test.go):
Test Context (tests/context.go):
Impact
fix #3333