-
Notifications
You must be signed in to change notification settings - Fork 19
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
Ability to perform nested group searches using MemberOf field #33
Comments
After reading through the entire source. |
Hello @Borgquite and @virot. I have this on my backlog and was thinking about mitigation the performance concerns by making the behavior configurable. But I also had talks with AD experts who told me it should be absolutely tolerable performance-wise. |
My plan would be to do a boolean option.
But if we want to have support for Windows 2012 ADs, I would recommend to just code with old fashioned: Just doing Powershell, to give example pre implementation. |
When I started the project, I targeted it for Windows Server 2019 (thus .NET 4.7.2 as this is the pre-installed LTS version), but with support for all Windows OSes in mind that were supported by Microsoft at that time, including Windows Server 2012 R2. I have built a Pester testing framework for everything that cannot be done with Unit tests / requires a fully deployed CA - so basically automatically create an AD Domain with CA and templates and then run against all supported OSes. I'll upload that soon, that should ease the testing a lot. I think it is also time for a contributing document explaining some thoughts that I have architecture-wise. Again, thank you so much for your work! |
@virot has implemented it and is now merged into main. Note that I've also ported the Project to .NET 8 now if you plan to custom-compile. |
@Sleepw4lker @virot Is this still an issue? |
But of course Microsoft, has made it "special" :( Since we are reading the group membership, Tecnically, since we are using msds-memberOfTransitive instead of msds-tokenGroupNames this could affect us. msds-memberOfTransitive should give both Security and Distribution groups.. So do we think any user will be a member of more than 1017 groups? Do we want to require only security groups? |
I know it technially is another issue, but is so close.. "Domain Users" is not part of the MemberOf part, but rather PrimaryGroupID. Should we just resolve that one too, then ALL groups would be accessable. |
@virot My only thought is that you'd be surprised how many groups some ADs have, and the old style 'LDAP_MATCHING_RULE_IN_CHAIN LDAP' (1.2.840.113556.1.4.1941) does not appear to have the 'large number of groups' limitation and works in all versions of Windows Server... But up to you! https://jorgequestforknowledge.wordpress.com/2014/12/15/finding-all-groups-with-a-specific-direct-and-indirect-member-user/ |
@Borgquite Performing a lookup with a LDAP_MATCHING_RULE_IN_CHAIN filter is extremely slow on my side. Do you have an example on how to run this sufficiently fast? Regarding the MR of @virot some things could be changed in my opinion.
Instead of creating a new MR, which changes other contributors code, I would like to discuss the changes here first. |
Happy new year everyone. I changed the logic to use msds-TokenGroupNames now. As this attribute is only available on Windows Server 2016 DCs (regardless of Domain Level), I've decided to handle it as follows:
Edit: I did some additional research and testing on the matter:
|
Noted under the documentation that:
'TameMyCerts uses the MemberOf (https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-ada2/cc24555b-61c7-49a2-9748-167b8ce5a512) Active Directory attribute (against the mapped accounts domain).'
and that one cause is that 'nested' group memberships are not supported.
I wondered if it would be possible to lift this restriction using the LDAP_MATCHING_RULE_IN_CHAIN LDAP search string - so you can perform an LDAP search which returns whether a user is a (nested) member of a given group simply by using:
(memberof:1.2.840.113556.1.4.1941:=cn=Group1,OU=groupsOU,DC=x)
It's part of Active Directory and described here - would make role-based access control a possibility?
Just a thought
The text was updated successfully, but these errors were encountered: