Fix AllowedToDelegate format for Users and Computers (Close #113) #125
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As proposed in #113, this PR implements changes in the delegation handling logic in
computer.pyandmemberships.py. The changes implemented are as follows:resolve_sid().resolve_samname().USERNAMEorCOMPUTERNAME$for example), theallow_filterflag was introduced to allow the use of LDAP wildcards in theresolve_samname()function.delegatehosts_cacheis introduced to keep track of hosts that have already been processed.resolve_ad_entry()function is used to get the object's properties. If a samAccountName was used before, the resolved object properties are used to translate that back to itsobjectID.Tested to work in my environment. Also tested with the latest version of
bloodhound_import(fox-it/bloodhound-import@d52c24f), closing referencing PR fox-it/bloodhound-import#37.