Bug 1784592

Summary: When one IdM server in a domain locks/unlocks an account, all IdM servers in the domain should lock/unlock that account
Product: Red Hat Enterprise Linux 8 Reporter: Greg Scott <gscott>
Component: ipaAssignee: Thomas Woerner <twoerner>
Status: CLOSED DEFERRED QA Contact: ipa-qe <ipa-qe>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.0CC: afarley, cheimes, dpal, fcami, pasik, pcech, rcritten, tscherf
Target Milestone: rc   
Target Release: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 08:50:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Greg Scott 2019-12-17 19:31:33 UTC
Description of problem:

After a number of (usually three) failed login attempts to an application server managed by a group of IDM/LDAP servers, the authentication server handling this user session locks the user account. But it does not replicate this lockout to other authentication servers in the domain. And so users experience inconsistent behavior during login, depending on which server handles any login attempt.

When the IdM infrastructure gets into this inconsistent state, the only fix is to check each IdM server,  login as admin to any server where the user account is locked, and unlock it for that IdM server only.

Version-Release number of selected component (if applicable):
RHEL 7, RHEL 8

How reproducible:
At will

Steps to Reproduce:
1. Set up an IdM environment with a number of IdM servers. Set up a user account with a policy to lock that account after three login failures.
2. Try three times to login as that user with an incorrect password.
3. The IdM server handling the logins locks the user account.
4. The other IdM servers do not lock the user account.

Actual results:
See above - the IdM server handling the failed login attempts eventually locks the user account. But it does not replicate.

Expected results:
When an authentication server decides to lock a user account, *all* authentication servers in the domain should lock that user account.

Additional info:
The article at https://access.redhat.com/articles/3327351 makes a case that it's impractical to replicate login failure counts across authentication servers. Fair enough. However, it is still necessary to replicate actions such as account lockouts and password updates. Perhaps instead of replicating individual events, it might make sense to replicate overall state periodically. This is how other domain authentication systems handle these situations.

Comment 1 Rob Crittenden 2019-12-17 19:51:18 UTC
Seems like a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=971087

Lockout is calculated based on failed logins over a period of time. This requires the number of failed attempts to be replicated.

Comment 2 Greg Scott 2019-12-17 20:46:57 UTC
I just looked at that other bugzilla - it's more than 6 years old! 

> Lockout is calculated based on failed logins over a period of time. This requires the number of failed attempts to be replicated.

So maybe don't replicate every failure attempt. When one server decides to lock an account, replicate what you need so all IdM servers are up to date. Or maybe don't replicate events, other than a few important ones like password updates. Instead of replicating individual events, maybe replicate an overall state periodically.

However you do it, we can't force admins to manually check every single IdM server to find the one that locks a user. Other domain authentication systems handle this issue automatically. IdM should too.

Comment 6 Petr Čech 2020-03-31 08:48:01 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/8250

Comment 7 Petr Čech 2020-03-31 08:50:26 UTC
Once the upstream community implements this feature (https://pagure.io/freeipa/issue/8250) it will be pulled into a corresponding Red Hat Enterprise Linux release following the corresponding schedules.
From now on this issue will be tracked in the community issue tracker only.
Closing this BZ.