Bug 785877

Summary: on reconnect we need to detect that a ipa/ds server has been reinitialized
Product: Red Hat Enterprise Linux 7 Reporter: Stephen Gallagher <sgallagh>
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED CURRENTRELEASE QA Contact: Kaushik Banerjee <kbanerje>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.0CC: grajaiya, jgalipea, jzeleny, ksiddiqu, nkarandi, pbrezina, prc
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.10.0-1.el7.alpha1 Doc Type: Bug Fix
Doc Text:
Cause: when reconnecting to an LDAP server going online, SSSD didn't check if it was re-initialized during the downtime Consequence: if during the downtime server was reinitialized and filled with completely different data, SSSD wouldn't update its database, This was problematic in combination with enumeration - user could get some information from SSSD which would not be valid. Fix: LDAP provider is now checking for max USN if the server supports it. If USN is lower than ti was before server went down, the entire database is refreshed. Result: in LDAP server supports USN, its reinitialization is detected at least when possible and the possibility of having cached invalid data is reduced Result: Workaround: stop the SSSD before reconnecting to re-initialized server; clear the SSSD caches manually before reconnecting; start the SSSD
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:02:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Stephen Gallagher 2012-01-30 20:15:24 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/734

When a DS replica is reinitialized the USNs are reset to 0 for all imported entries, and the counter is also reset to 0.
When connecting to the same server therefore it is not sufficient to check the name we also need to verify that the highest USN value of the server is not lower than what we have recorded. If so we need to reset the enumeration counters just like if we were connecting to a new server.

Comment 1 Jenny Severance 2012-01-31 14:38:36 UTC
Please provide steps to reproduce/verify this issue. Thanks.

Comment 2 Stephen Gallagher 2012-01-31 14:43:41 UTC
1. Set up a 389 DS server
2. Populate it with some data.
3. Set up a client with enumeration = True
4. Verify the data on the client.
5. Uninstall and reinstall the 389 DS server
6. Populate it with different data
7. Verify the data on the client.

Comment 4 Jan Zeleny 2012-04-04 11:20:10 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: when reconnecting to an LDAP server going online, SSSD didn't check if it was re-initialized during the downtime
Consequence: if during the downtime server was reinitialized and filled with completely different data, SSSD wouldn't update its database, This was problematic in combination with enumeration - user could get some information from SSSD which would not be valid.
Fix: LDAP provider is now checking for max USN if the server supports it. If USN is lower than ti was before server went down, the entire database is refreshed.
Result: in LDAP server supports USN, its reinitialization is detected at least when possible and the possibility of having cached invalid data is reduced
Result:

Comment 6 Jenny Severance 2012-05-22 13:55:48 UTC
Do not think this is a RHEL 6.3 blocker moving to RHEL 6.4.

Comment 10 Jakub Hrozek 2013-03-26 18:17:20 UTC
Fixed upstream.

Comment 11 Jakub Hrozek 2013-10-04 13:24:53 UTC
Temporarily moving bugs to MODIFIED to work around errata tool bug

Comment 13 Nirupama Karandikar 2014-03-06 10:20:15 UTC
Tested with sssd-1.11.2-42.el7.x86_64

1. Add sssduser1/2 in 389 DS. Configured sssd and checked whether users authentication works ok.

2. # getent passwd sssduser1
sssduser1:*:10011:10011:example sssduser1:/home/sssduser1:/bin/bash
# getent passwd sssduser2
sssduser2:*:10012:10012:example sssduser2:/home/sssduser2:/bin/bash

3. On 389 DS remove and add DS instance again.

4. Add sssduser3/4 on newly installed DS.

# getent passwd sssduser3
sssduser3:*:10013:10013:example sssduser3:/home/sssduser3:/bin/bash
# getent passwd sssduser4
sssduser4:*:10014:10014:example sssduser4:/home/sssduser4:/bin/bash

Comment 14 Nirupama Karandikar 2014-03-06 10:46:49 UTC
Tested with sssd-1.11.2-42.el7.x86_64

Setting enumerate = True.

1. # getent passwd | grep sssd
sssduser1:*:10011:10011:example sssduser1:/home/sssduser1:/bin/bash
sssduser2:*:10012:10012:example sssduser2:/home/sssduser2:/bin/bash

2. On 389 DS remove and add DS instance again.

3. Add sssduser3/4 on newly installed DS.

4. Restart sssd to trigger enumration.

# getent passwd | grep sssd
sssduser1:*:10011:10011:example sssduser1:/home/sssduser1:/bin/bash
sssduser2:*:10012:10012:example sssduser2:/home/sssduser2:/bin/bash
sssduser3:*:10013:10013:example sssduser3:/home/sssduser3:/bin/bash
sssduser4:*:10014:10014:example sssduser4:/home/sssduser4:/bin/bash

Comment 16 Ludek Smid 2014-06-13 11:02:47 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.