Details
-
Bug
-
Resolution: Unresolved
-
Blocker
-
COmanage Registry 4.1.1 (The Info MR1)
-
None
Description
The LDAP Provisioner allows a Group Base DN to be configured yet no Attributes that actually use a "group" object class to be configured. This is a routine way to configure a CO that initially only needs person LDAP records but allows a CO admin to later start provisioning group records just be checking the appropriate Attribute object class tick box (e.g. groupOfNames).
In this state version 4.0.x had no issues when expunging a CO Person record.
Version 4.1.x, however, will not allow the expunge to complete because the function assembleAttributes() ends up being called (since a Group Base DN is defined) with a CoGroup object and eventually the stack trace below results:
2023-02-21 18:12:13 Error: [TypeError] array_search(): Argument #2 ($haystack) must be of type array, null given |
Request URL: /registry/co_people/expunge/29 |
Stack Trace:
|
#0 /srv/comanage-registry/app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php(1547): array_search() |
#1 /srv/comanage-registry/app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php(1795): CoLdapProvisionerTarget->assembleAttributes() |
#2 /srv/comanage-registry/app/Model/Behavior/ProvisionerBehavior.php(648): CoLdapProvisionerTarget->provision() |
#3 /srv/comanage-registry/app/Model/Behavior/ProvisionerBehavior.php(833): ProvisionerBehavior->invokePlugin() |
#4 /srv/comanage-registry/app/Model/Behavior/ProvisionerBehavior.php(1437): ProvisionerBehavior->invokePlugins() |
#5 /srv/comanage-registry/app/Model/Behavior/ProvisionerBehavior.php(527): ProvisionerBehavior->provisionGroups() |
#6 /srv/comanage-registry/app/Model/Behavior/ProvisionerBehavior.php(132): ProvisionerBehavior->determineProvisioning() |
#7 /srv/comanage-registry/app/Model/Behavior/ProvisionerBehavior.php(101): ProvisionerBehavior->afterSave() |
#8 /srv/comanage-registry/lib/Cake/Utility/ObjectCollection.php(129): ProvisionerBehavior->afterDelete() |
#9 /srv/comanage-registry/lib/Cake/Event/CakeEventManager.php(244): ObjectCollection->trigger() |
#10 /srv/comanage-registry/app/Model/AppModel.php(809): CakeEventManager->dispatch() |
#11 /srv/comanage-registry/lib/Cake/Model/Model.php(2871): AppModel->delete() |
#12 /srv/comanage-registry/app/Model/CoPipeline.php(770): Model->deleteAll() |
#13 /srv/comanage-registry/app/Model/CoPipeline.php(314): CoPipeline->processDelete() |
#14 /srv/comanage-registry/app/Model/CoOrgIdentityLink.php(238): CoPipeline->execute() |
#15 /srv/comanage-registry/app/Model/CoPerson.php(455): CoOrgIdentityLink->delete() |
#16 /srv/comanage-registry/app/Controller/CoPeopleController.php(512): CoPerson->expunge() |
#17 [internal function]: CoPeopleController->expunge() |
#18 /srv/comanage-registry/lib/Cake/Controller/Controller.php(499): ReflectionMethod->invokeArgs() |
#19 /srv/comanage-registry/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction() |
#20 /srv/comanage-registry/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke() |
#21 /srv/comanage-registry/app/webroot/index.php(96): Dispatcher->dispatch() |
#22 {main} |
At that point the array_search() is being called with
oc = groupOfNames
|
and
Array
|
(
|
[hasMember] => Array
|
(
|
)
|
)
|
The work around is to remove the Group Base DN configuration since effectively it is not being used, but it should not be necessary and is a change in behavior from the 4.0.x releases.