Fix Borken UUID Attribute Detection#3521
Conversation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
|
@blizzz, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nickvergessen, @LukasReschke and @MorrisJobke to be potential reviewers. |
|
@karlitschek @LukasReschke I would love to see this fixed in 11.0.2. Otherwise moving users in the LDAP tree would not be detected properly. I would avoid the risk of delaying this for the next release. |
|
backport ia fine |
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Codecov Report
@@ Coverage Diff @@
## master #3521 +/- ##
============================================
+ Coverage 54.15% 54.15% +<.01%
- Complexity 21039 21040 +1
============================================
Files 1306 1306
Lines 80292 80292
Branches 1250 1250
============================================
+ Hits 43479 43481 +2
+ Misses 36813 36811 -2
Continue to review full report at Codecov.
|
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
…size. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
|
We should be complete now. Reviews welcome, @MorrisJobke @LukasReschke @rullzer @nextcloud/ldap |
Fix integration test by not relying on Fake instances Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> Fix determining the UUID attribute, default of the override is null Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> add integration test for uuid attr detection Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> Add repair steps Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> Background jobs can take 4k of characters only. We find a good batch size. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> add tests to DB group Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
|
Now, the reproducing the issue is harder than it seemed to be first. On the classical way, via the LDAP wizard, it is very very tough if not impossible to get into this scenario. It seems rather to happen when a more programmatic approach is being used to configure LDAP (e.g. occ commands, or the OCS API). Thus, the possible impact (as affected instances) is far smaller than thought first. |
MorrisJobke
left a comment
There was a problem hiding this comment.
Code looks good and didn't destroyed my existing setup 👍
[stable11] Backport of Fix Broken UUID Attribute Detection #3521
With #1729 (downstreamed…) UUID detection got broken. On default installations, the LDAP backend would figure out the correct UUID attribute fetch the value accordingly. Because an empty was replaced wrongly in one place, detection was never really done, instead the UUID was indeed written for users, but falsely using the username.
The UUID is used to recognize users on the directory even when they were moved within the LDAP tree and have a different DN. A fix could lead to the point that this detection will fail, if the wrong value was written.
Affects master and 11.
Also fixes a faulty test.
fyi @MorrisJobke