Skip to content

Commit c352ded

Browse files
committed
Clean up support for 'special' eb entities in service registry
In the past, the service regisry(manage) would contain special entities for engineblock itself as an IdP and SP. This is no longer the case for a long time now, the code related to these exceptions can be cleaned up. The service registry only contains remote IdPs and SPs now.
1 parent c984b3d commit c352ded

File tree

4 files changed

+0
-195
lines changed

4 files changed

+0
-195
lines changed

library/EngineBlock/Corto/Adapter.php

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
use OpenConext\EngineBlock\Metadata\MetadataRepository\Filter\RemoveOtherWorkflowStatesFilter;
2222
use OpenConext\EngineBlock\Metadata\MetadataRepository\MetadataRepositoryInterface;
2323
use OpenConext\EngineBlock\Metadata\MetadataRepository\Visitor\DisableDisallowedEntitiesInWayfVisitor;
24-
use OpenConext\EngineBlock\Metadata\MetadataRepository\Visitor\EngineBlockMetadataVisitor;
2524
use OpenConext\EngineBlock\Metadata\Service;
2625

2726
class EngineBlock_Corto_Adapter
@@ -362,8 +361,6 @@ protected function _configureProxyServer(EngineBlock_Corto_ProxyServer $proxySer
362361

363362
$this->configureProxyCertificates($proxyServer);
364363

365-
$this->enrichEngineBlockMetadata($proxyServer);
366-
367364
$proxyServer->setRepository($this->getMetadataRepository());
368365
$proxyServer->setBindingsModule(new EngineBlock_Corto_Module_Bindings($proxyServer));
369366
$proxyServer->setServicesModule(new EngineBlock_Corto_Module_Services($proxyServer));
@@ -479,28 +476,4 @@ protected function configureProxyCertificates(EngineBlock_Corto_ProxyServer $pro
479476

480477
return $proxyServer->getSigningCertificates();
481478
}
482-
483-
/**
484-
* Modify EngineBlocks own metadata entries.
485-
*
486-
* See EngineBlockMetadataVisitor for more information on what is modified
487-
* and why.
488-
*
489-
* @param EngineBlock_Corto_ProxyServer $proxyServer
490-
*/
491-
protected function enrichEngineBlockMetadata(EngineBlock_Corto_ProxyServer $proxyServer)
492-
{
493-
$idpEntityId = $proxyServer->getUrl('idpMetadataService');
494-
$spEntityId = $proxyServer->getUrl('spMetadataService');
495-
$keyPair = $proxyServer->getSigningCertificates();
496-
497-
$visitor = new EngineBlockMetadataVisitor(
498-
$idpEntityId,
499-
$spEntityId,
500-
$keyPair,
501-
EngineBlock_ApplicationSingleton::getInstance()->getDiContainer()->getAttributeMetadata()
502-
);
503-
504-
$this->getMetadataRepository()->appendVisitor($visitor);
505-
}
506479
}

library/EngineBlock/Corto/Module/Service/SingleSignOn.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,6 @@ public function serve($serviceName, Request $httpRequest)
151151
// those that are not allowed.
152152
$candidateIDPs = $this->_server->getRepository()->findAllIdentityProviderEntityIds($scopedIdps);
153153

154-
$posOfOwnIdp = array_search($this->_server->getUrl('idpMetadataService'), $candidateIDPs);
155-
if ($posOfOwnIdp !== false) {
156-
$log->info("Removed ourselves from the candidate IdP list");
157-
unset($candidateIDPs[$posOfOwnIdp]);
158-
// This could be removed after the magic entities are removed completely https://www.pivotaltracker.com/story/show/168249058
159-
}
160-
161154
if (count($scopedIdps) > 0) {
162155
$log->info(
163156
sprintf('%d candidate IdPs after scoping', count($candidateIDPs)),
@@ -497,12 +490,6 @@ protected function _transformIdpsForWayf(array $idpEntityIds, $isDebugRequest, $
497490

498491
$wayfIdps = array();
499492
foreach ($identityProviders as $identityProvider) {
500-
if ($identityProvider->entityId === $this->_server->getUrl('idpMetadataService')) {
501-
// Skip ourselves as a valid Idp
502-
// This could be removed after the magic entities are removed completely https://www.pivotaltracker.com/story/show/168249058
503-
continue;
504-
}
505-
506493
if ($identityProvider->getCoins()->hidden()) {
507494
continue;
508495
}

src/OpenConext/EngineBlock/Metadata/MetadataRepository/IdpsMetadataRepository.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,6 @@ private function convertIdentityProviders(
102102
$collection = new IdentityProviderEntityCollection();
103103

104104
foreach ($idps as $idp) {
105-
// Don't add ourselves
106-
// TODO: remove after the 'magic' entities are removed
107-
// @see: https://www.pivotaltracker.com/story/show/168249058
108-
if ($idp->entityId === $this->urlProvider->getUrl('metadata_idp', false, null, null)) {
109-
continue;
110-
}
111-
112105
// Do not reveal hidden IdP's
113106
if ($idp->getCoins()->hidden()) {
114107
continue;

src/OpenConext/EngineBlock/Metadata/MetadataRepository/Visitor/EngineBlockMetadataVisitor.php

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)