-
Notifications
You must be signed in to change notification settings - Fork 0
Implement RootDSE support with LDAP attribute filtering per RFC 4512 #134
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
Conversation
runleveldev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot create a test and confirm that using ldap attributes in a search (such as namingContexts and supportdLDAPVersion) still return the attribute. In addition the special attribute "+" in a search should return all operational attributes. A standard search (attributes "*" requested) shouldn't return any operational attributes however.
I've implemented attribute filtering for RootDSE searches and added comprehensive tests. The implementation now correctly handles:
All tests pass, including the new tests for attribute filtering. See commit ef55a6a. |
runleveldev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot SSSD sends this request for RootDSE discovery, make sure it works:
debug: RootDSE Search - Filter: (objectclass=*), Scope: 0, Attributes: ["*","altServer","namingContexts","supportedControl","supportedExtension","supportedFeatures","supportedLDAPVersion","supportedSASLMechanisms","domainControllerFunctionality","defaultNamingContext","lastUSN","highestCommittedUSN"]
Fixed in commit 2f1efee. The RootDSE handler now correctly handles SSSD's request pattern where Added a test case that verifies this SSSD scenario works correctly. |
Co-authored-by: runleveldev <44057501+runleveldev@users.noreply.github.com> fix: update package-lock.json
Co-authored-by: runleveldev <44057501+runleveldev@users.noreply.github.com>
Co-authored-by: runleveldev <44057501+runleveldev@users.noreply.github.com>
- Implement LDAP attribute filtering for RootDSE per RFC 4512 - Support '+' selector for operational attributes - Support '*' selector for user attributes only - Support specific attribute requests - Add tests for all attribute filtering scenarios - Work around ldapjs attribute filtering by modifying res.attributes list Co-authored-by: runleveldev <44057501+runleveldev@users.noreply.github.com>
…al attributes - Handle SSSD's RootDSE query pattern: * with specific operational attribute names - When * is present with specific attributes, return user attributes + requested operational attributes - Add test for SSSD scenario with ['*', 'namingContexts', 'supportedLDAPVersion', ...] - Update documentation to reflect correct behavior - All 11 engine tests pass Co-authored-by: runleveldev <44057501+runleveldev@users.noreply.github.com>
2f1efee to
1548c58
Compare
runleveldev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
15ae273 to
1240650
Compare
Implementation Plan for RootDSE Support
Understanding the Issue
Implementation Checklist
+= return operational attributes (namingContexts, supportedLDAPVersion)*= return user attributes only (objectClass)*with specific attributes = return user attributes + requested operational attributes (SSSD pattern)+,*, and specific attributes*with specific operational attributesOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.