(This is a continuation of LDAP code refactoring)
Currently all attributes are decoded right when a search result is received from LDAP server and encoded right before doing add or modify operations. This is bad for a number of reasons:
To make our code more robust, decoding and encoding of attribute values should be done on-demand, when an attribute is accessed in LDAPEntry. It should also be possible to access raw attribute values from LDAPEntry, which should make handling invalid values as well as entry modifications easier.
The attached patches implement the functionality.
attachment freeipa-jcholast-106.1-Make-LDAPEntry-a-wrapper-around-dict-rather-than-a-d.patch
attachment freeipa-jcholast-107.1-Introduce-IPASimpleLDAPObject.decode-method-for-deco.patch
attachment freeipa-jcholast-109.1-Store-both-encoded-and-decoded-values-in-LDAPEntry.patch
attachment freeipa-jcholast-110.1-Make-sure-attributeTypes-updates-are-done-before-obj.patch
attachment freeipa-jcholast-111.1-Remove-legacy-toDict-and-origDataDict-methods-of-LDA.patch
attachment freeipa-jcholast-112.1-Save-raw-attribute-values-of-search-results-in-IPASi.patch
attachment freeipa-jcholast-113.1-Use-raw-attribute-values-when-generating-modlists-in.patch
attachment freeipa-jcholast-121.1-Use-raw-attribute-values-when-adding-a-new-entry-in-.patch
attachment freeipa-jcholast-108.1-Always-use-lists-for-values-in-LDAPEntry-internally.3.patch
3.4 development was shifted by one month, moving tickets to reflect reality better.
master:
941e968 Use encoded values from entry objects directly when adding new entries.[[BR]] e60eda3 Use encoded values from entry objects directly when generating modlists.[[BR]] 78f0ca9 Store encoded attribute values from search results directly in entry objects.[[BR]] a7180ed Remove legacy toDict and origDataDict methods of LDAPEntry.[[BR]] 463407a Make sure attributeTypes updates are done before objectClasses updates.[[BR]] 9ecf4b7 Decode and encode attribute values in LDAPEntry on demand.[[BR]] 5d1d513 Always use lists for values in LDAPEntry internally.[[BR]] 5aadaa6 Introduce IPASimpleLDAPObject.decode method for decoding LDAP values.[[BR]] 4f0814d Make LDAPEntry a wrapper around dict rather than a dict subclass.[[BR]]
Adjusting time plan - 3.4 development was postponed as we focused on 3.3.x testing and stabilization.
df5f4ee Turn LDAPEntry.single_value into a dictionary-like property.
Metadata Update from @jcholast: - Issue assigned to jcholast - Issue set to the milestone: FreeIPA 4.0 - 2013/11
Log in to comment on this ticket.