Bug 52192 - Password is only updated if pwdLastSet is changed (sync to ucs)
Password is only updated if pwdLastSet is changed (sync to ucs)
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: AD Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0-2-errata
Assigned To: Juan Carlos
Arvid Requate
https://git.knut.univention.de/univen...
:
Depends on: 51904
Blocks:
  Show dependency treegraph
 
Reported: 2020-10-07 12:23 CEST by Julia Bremer
Modified: 2022-09-08 11:43 CEST (History)
10 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.091
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julia Bremer univentionstaff 2020-10-07 12:23:21 CEST
+++ This bug was initially created as a clone of Bug #51904 +++

At Bug #51904 we found out that changing ONLY the password attribute in AD does not trigger a synchronization.

This has been introduced with Bug #51518, where the UCR Variable connector/ad/mapping/attributes/irrelevant has been created.
This Variable is used to ignore changes to certain attributes to reduce load created by the ad connector. These attributes change almost every time anything is changed in AD and it makes sense to ignore these.

But the password attributes are not attributes we can see in the LDAP and changes to the password are only checked as a post_con_modify_function, which happens after the "normal" sync.

With a normal password change, the synchronization still works, since 'pwdLastSet' usually changes with the password. This attribute is not on the 'irrelevant' list, the sync is triggered, the password change is detected and the password is synced. 

There is one case though where a password change is undetected. 
That is, when the flag 'pwdChangeNextLogin' is set on the user object and the password is resetted while keeping the 'pwdChangeNextLogin' flag.
PwdLastSet is set to '0' in this case, to indicate that the password should be changed at next login. The password is resetted, but pwdLastSet is kept at value '0'.
Now the only detected changed attributes are 'uSNChanged', 'whenChanged', which are on the 'irrelevant' list. 

Even though this problem exists, we decided to leave the default behavior for now, since most environment will profit more from the reduced load and not run into this issue.

There might be other corner cases in which a synchronization is skipped because of this problem, but we haven't found any yet. 



The current workaround is unsetting the UCR var connector/ad/mapping/attributes/irrelevant.
Comment 2 Marc Schwarz univentionstaff 2021-07-12 15:27:12 CEST
small update regarding the workaround:

Do not simply unset die UCRV, as it will maybe reset.

Just set it to something like:

ucr get connector/ad/mapping/attributes/irrelevant
DoNotUnsetThisUCR
Comment 4 Juan Carlos univentionstaff 2022-08-30 10:40:39 CEST
Changes:

Do not ignore changes in users when pwdLastSet is 0 even if all the modified attributes are set in connector/ad/mapping/attributes/irrelevant.

Packages:

Package: univention-ad-connector
Version: 14.0.10-5A~5.0.0.202208301031
Branch: ucs_5.0-0
Scope: errata5.0-2

Package: ucs-test
Version: 10.0.7-19A~5.0.0.202208301034
Branch: ucs_5.0-0
Scope: errata5.0-2

Commits: 

59e2fc7ba2ad | Bug #52192: changelog and advisory
01f9537dde30 | Bug #52192: Update test to not unset irrelevant attributes
7d8e191d9401 | Bug #52192: Check if pwdChangeNextLogin is set in users before skipping the object
Comment 5 Arvid Requate univentionstaff 2022-08-31 22:07:30 CEST
Verified:
* Code review
* Functional test
* No collateral regressions expected for non-updated systems
* Test case
* Documentation update not required
* Advisory