LDAP: honour nested groups for MSAD#11696
Conversation
|
@blueorangutan package |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11696 +/- ##
============================================
- Coverage 16.17% 16.17% -0.01%
Complexity 13297 13297
============================================
Files 5656 5656
Lines 498151 498219 +68
Branches 60441 60451 +10
============================================
- Hits 80588 80579 -9
- Misses 408589 408671 +82
+ Partials 8974 8969 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@rajujith a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 15143 |
rajujith
left a comment
There was a problem hiding this comment.
LGTM.
Nested group users are listed now:
(LL-ACS-KVM) 🐱 > list ldapusers
{
"LdapUser": [
{
"conflictingusersource": "",
"domain": "CN=aduser 1,OU=engineering",
"firstname": "aduser",
"lastname": "1",
"principal": "CN=aduser 1,OU=engineering,DC=jithinraju,DC=in",
"username": "aduser1"
},
{
"conflictingusersource": "",
"domain": "CN=aduser 2,OU=engineering",
"firstname": "aduser",
"lastname": "2",
"principal": "CN=aduser 2,OU=engineering,DC=jithinraju,DC=in",
"username": "aduser2"
},
{
"conflictingusersource": "",
"domain": "CN=aduser 500,OU=Architecture",
"firstname": "aduser",
"lastname": "500",
"principal": "CN=aduser 500,OU=Architecture,DC=jithinraju,DC=in",
"username": "aduser500"
},
{
"conflictingusersource": "",
"domain": "CN=Jithin Raju,OU=Architecture",
"firstname": "Jithin",
"lastname": "Raju",
"principal": "CN=Jithin Raju,OU=Architecture,DC=jithinraju,DC=in",
"username": "jithin"
},
{
"conflictingusersource": "",
"domain": "CN=Kiran Chavala,OU=engineering",
"firstname": "Kiran",
"lastname": "Chavala",
"principal": "CN=Kiran Chavala,OU=engineering,DC=jithinraju,DC=in",
"username": "kiran"
},
{
"conflictingusersource": "",
"domain": "CN=Vishesh Jindal,OU=engineering",
"firstname": "Vishesh",
"lastname": "Jindal",
"principal": "CN=Vishesh Jindal,OU=engineering,DC=jithinraju,DC=in",
"username": "vishesh"
}
],
"count": 6
| usernameFilter.append(")"); | ||
|
|
||
| String memberOfAttribute = _ldapConfiguration.getUserMemberOfAttribute(domainId); | ||
| String memberOfAttribute = getMemberOfAttribute(domainId); |
There was a problem hiding this comment.
@DaanHoogland
there is a method in the same file
protected String getMemberOfAttribute(final Long domainId) {
return _ldapConfiguration.getUserMemberOfAttribute(domainId);
}
which is used only once
if ("GROUP".equals(type)) {
memberOfFilter.append("(").append(getMemberOfAttribute(domainId)).append("=");
memberOfFilter.append(name);
memberOfFilter.append(")");
}
is it correct ?
There was a problem hiding this comment.
yes, but it is overloaded in the AD user manager, so at this point it is not known which one will be called.
...user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/ADLdapUserManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
@DaanHoogland |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15144 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-14424)
|
...user-authenticators/ldap/src/main/java/org/apache/cloudstack/ldap/ADLdapUserManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15154 |
|
Merging based on approvals and test thanks @DaanHoogland @rajujith |
Description
This PR makes sure the right memberOf attribute is retrieved in the case of MSAD ...
Fixes: #10278
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?