Page MenuHomekolab.org

Changes required for pykolab to work with AD
ClosedPublic

Authored by adomaitis on Mar 5 2019, 3:17 PM.

Details

Summary

These changes basically are to remove referrals from the ldapsearch results. The change is cache sqlite DB schema is required to allow objectGUID AD attribute to work as unique attribute to track LDAP objects.

Diff Detail

Repository
rP pykolab
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

adomaitis created this revision.Mar 5 2019, 3:17 PM
adomaitis edited the summary of this revision. (Show Details)Mar 5 2019, 3:21 PM
adomaitis added a project: PyKolab.
adomaitis added a subscriber: PyKolab Developers.
adomaitis updated this revision to Diff 1647.Mar 19 2019, 1:23 PM
  • Use python UUID to convert binary objectGUID to string. This way dont need to chage cache db format. It doesn't look like value of uniqueid returned by from cache is used anywhere (needs to double check), so only forward conversion is needed.
adomaitis updated this revision to Diff 1658.Apr 1 2019, 1:14 PM
  • Use python UUID to convert binary objectGUID to string. It doesn't look like value of uniqueid returned by from cache is used anywhere (needs to double check), so only forward conversion is needed.
  • Also do not strip anything from bytestring attributes (objectGUID) because after stripping conversion to UUID string is not possible.
Harbormaster completed remote builds in B23366: Diff 1658.
machniak requested changes to this revision.Apr 2 2019, 3:27 PM
machniak added inline comments.
pykolab/auth/ldap/__init__.py
1250

s/_entry_id/_entry_dn/, but...

This revision now requires changes to proceed.Apr 2 2019, 3:27 PM
machniak added inline comments.Apr 2 2019, 3:42 PM
pykolab/auth/ldap/__init__.py
1252

... but, didn't you change the returned value format? Maybe you meant _entry_dns.append(_result) in the loop above?

adomaitis updated this revision to Diff 1664.Apr 3 2019, 7:50 AM
  • Use python UUID to convert binary objectGUID to string. It doesn't look like value of uniqueid returned by from cache is used anywhere (needs to double check), so only forward conversion is needed.

Good catch. Here is even more pythonic way removing AD referrals from ldap search results.

machniak accepted this revision.Apr 3 2019, 8:10 AM
This revision is now accepted and ready to land.Apr 3 2019, 8:10 AM
Closed by commit rPb636df531742: Changes required for pykolab to work with AD (authored by Liutauras Adomaitis <adomaitis@kolabsystems.com>). · Explain WhyApr 3 2019, 4:08 PM
This revision was automatically updated to reflect the committed changes.