Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize RootDse search and add cancellation tokens to async search extensions. #173

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

INEL-IT
Copy link
Contributor

@INEL-IT INEL-IT commented Nov 24, 2022

Get RootDse entry with all attributes in a single request as per LDAP RFC standard and add cancellation tokens to async search extensions.

return (await connection.SearchAsync(
null,
"(objectclass=*)",
new[] { "*", "+", "supportedExtension" },
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't work on unix subsystems. Need to specify all properties

new[]
                     {
                         "namingContexts", "subschemaSubentry", "supportedLDAPVersion", "supportedSASLMechanisms",
                         "supportedExtension", "supportedControl", "supportedFeatures", "vendorName", "vendorVersion"
                     }
                     ```

Copy link
Owner

@flamencist flamencist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix comments

@INEL-IT
Copy link
Contributor Author

INEL-IT commented Dec 1, 2022

Changed so both the wildcard selectors for user and operation attributes as well as an explicit list of most common attributes (both per RFC as well as common vendors like MS, OpenLdap, etc.) is passed to a single search. This seems to work in all situations as per RFC any duplicated attributes should be ignored.
Some references:
Retrieving all attributes:
https://ldapwiki.com/wiki/Retrieving%20All%20Attributes
Determining vendor and version:
https://ldapwiki.com/wiki/Determine%20LDAP%20Server%20Vendor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants