Skip to content

Commit 1e2beb1

Browse files
committed
Merge branch 'main' into release/6.18
2 parents b410679 + 7761dd0 commit 1e2beb1

File tree

7 files changed

+26
-122
lines changed

7 files changed

+26
-122
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ Bugfixes
7979
* Validate numeric key in ARP settings on metadata push (#1285)
8080
* Set the correct database version in doctrine (#1811)
8181

82+
## 6.15.4
83+
84+
Maintenance:
85+
* Fix composer lockfile (#1785)
86+
* Add qa tooling helper scripts and drop Ant build.xml (#1781)
87+
* Update Devconf installation and docs (#1781)
88+
* Remove confusing key_id from stepup callout logging
89+
8290
## 6.15.3
8391

8492
Maintenance:

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ public function serve($serviceName, Request $httpRequest)
168168
// or another service.
169169
EngineBlock_Corto_Model_Response_Cache::rememberIdp($receivedRequest, $receivedResponse);
170170

171+
$originalAssertions = clone $receivedResponse->getAssertions()[0];
171172
$this->_server->filterInputAssertionAttributes($receivedResponse, $receivedRequest);
172173

173174
// Add the consent step
@@ -213,7 +214,7 @@ public function serve($serviceName, Request $httpRequest)
213214
$authnClassRef,
214215
$nameId,
215216
$sp->getCoins()->isStepupForceAuthn(),
216-
$receivedResponse->getAssertions()[0]
217+
$originalAssertions
217218
);
218219
}
219220

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

Lines changed: 0 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -516,23 +516,8 @@ protected function _transformIdpsForWayf(array $idpEntityIds, $isDebugRequest, $
516516
continue;
517517
}
518518

519-
$additionalInfo = AdditionalInfo::create()->setIdp($identityProvider->entityId);
520-
521519
$isAccessible = $identityProvider->enabledInWayf || $isDebugRequest;
522520

523-
$name = $this->getName($currentLocale, $identityProvider, $additionalInfo);
524-
525-
$wayfIdp = $this->buildIdp(
526-
$name,
527-
$identityProvider->getMdui()->hasLogo() ? $identityProvider->getMdui()->getLogo()->url : '/images/placeholder.png',
528-
$this->getKeywords($currentLocale, $identityProvider),
529-
$identityProvider->entityId,
530-
$isAccessible,
531-
$isDefaultIdP,
532-
null
533-
);
534-
$wayfIdps[] = $wayfIdp;
535-
536521
foreach ($identityProvider->getDiscoveries() as $discovery) {
537522
/** @var Discovery $discovery */
538523
$wayfIdps[] = $this->buildIdp(
@@ -609,96 +594,6 @@ protected function _sendDebugMail(EngineBlock_Saml2_ResponseAnnotationDecorator
609594
$diContainer->getMailer()->send($message);
610595
}
611596

612-
private function getName(string $locale, IdentityProvider $identityProvider, AdditionalInfo $additionalInfo)
613-
{
614-
switch ($locale) {
615-
case "nl":
616-
return $this->getNameNl($identityProvider, $additionalInfo);
617-
case "en":
618-
return $this->getNameEn($identityProvider, $additionalInfo);
619-
case "pt":
620-
return $this->getNamePt($identityProvider, $additionalInfo);
621-
default:
622-
throw new EngineBlockBundleInvalidArgumentException(
623-
sprintf('Trying to get the IdP name for an unsupported language (%s)', $locale)
624-
);
625-
}
626-
}
627-
628-
private function getNameNl(
629-
IdentityProvider $identityProvider,
630-
AdditionalInfo $additionalLogInfo
631-
) {
632-
if ($identityProvider->getMdui()->hasDisplayName('nl')) {
633-
return $identityProvider->getMdui()->getDisplayName('nl');
634-
}
635-
636-
if ($identityProvider->nameNl) {
637-
return $identityProvider->nameNl;
638-
}
639-
640-
EngineBlock_ApplicationSingleton::getLog()->notice(
641-
'No NL displayName and name found for idp: ' . $identityProvider->entityId,
642-
array('additional_info' => $additionalLogInfo->toArray())
643-
);
644-
645-
return $identityProvider->entityId;
646-
}
647-
648-
private function getNameEn(
649-
IdentityProvider $identityProvider,
650-
AdditionalInfo $additionalInfo
651-
) {
652-
if ($identityProvider->getMdui()->hasDisplayName('en')) {
653-
return $identityProvider->getMdui()->getDisplayName('en');
654-
}
655-
656-
if ($identityProvider->nameEn) {
657-
return $identityProvider->nameEn;
658-
}
659-
660-
EngineBlock_ApplicationSingleton::getLog()->notice(
661-
'No EN displayName and name found for idp: ' . $identityProvider->entityId,
662-
array('additional_info' => $additionalInfo->toArray())
663-
);
664-
665-
return $identityProvider->entityId;
666-
}
667-
668-
private function getNamePt(
669-
IdentityProvider $identityProvider,
670-
AdditionalInfo $additionalInfo
671-
) {
672-
if ($identityProvider->getMdui()->hasDisplayName('pt')) {
673-
return $identityProvider->getMdui()->getDisplayName('pt');
674-
}
675-
676-
if ($identityProvider->namePt) {
677-
return $identityProvider->namePt;
678-
}
679-
680-
EngineBlock_ApplicationSingleton::getLog()->notice(
681-
'No PT displayName and name found for idp: ' . $identityProvider->entityId,
682-
array('additional_info' => $additionalInfo->toArray())
683-
);
684-
685-
return $identityProvider->entityId;
686-
}
687-
688-
private function getKeywords(string $locale, IdentityProvider $identityProvider)
689-
{
690-
if ($identityProvider->getMdui()->hasKeywords($locale)) {
691-
return explode(' ', $identityProvider->getMdui()->getKeywords($locale));
692-
}
693-
694-
// Fall back to EN if current language has no keywords
695-
if ($identityProvider->getMdui()->hasKeywords('en')) {
696-
return explode(' ', $identityProvider->getMdui()->getKeywords('en'));
697-
}
698-
699-
return 'Undefined';
700-
}
701-
702597
/**
703598
* @param $serviceName
704599
* @return bool

library/EngineBlock/Corto/ProxyServer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public function sendStepupAuthenticationRequest(
472472
Loa $authnContextClassRef,
473473
NameID $nameId,
474474
bool $isForceAuthn,
475-
Assertion $assertion
475+
Assertion $originalAssertion
476476
) {
477477
$ebRequest = EngineBlock_Saml2_AuthnRequestFactory::createFromRequest(
478478
$spRequest,
@@ -537,7 +537,7 @@ public function sendStepupAuthenticationRequest(
537537
if ($isSendUserAttributesConfigured && $isSendUserAttributesEnabled) {
538538
$stepupUserAttributes = $container->getStepupUserAttributes();
539539
if (!empty($stepupUserAttributes)) {
540-
StepupGsspUserAttributeExtension::add($sspMessage, $assertion, $container->getStepupUserAttributes());
540+
StepupGsspUserAttributeExtension::add($sspMessage, $originalAssertion, $container->getStepupUserAttributes());
541541
}
542542
}
543543

src/OpenConext/EngineBlockFunctionalTestingBundle/Features/Context/Discoveries.feature

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Feature:
2929
| Name | Value | Source |
3030
| urn:mace:dir:attribute-def:eduPersonOrcid | 123456 | voot |
3131

32-
Scenario: The user is asked for consent to share information with the SP showing the discovery name instead of the IdP name
32+
Scenario: The user is asked for consent to share information with the SP showing the discovery name
3333
Given I log in at "Dummy-SP"
3434
And I select IdP by label "Dummy Discovery" on the WAYF
3535
And I pass through EngineBlock
@@ -41,16 +41,3 @@ Feature:
4141
And the response should contain "Proceed to Dummy-SP"
4242
When I give my consent
4343
Then I pass through EngineBlock
44-
45-
Scenario: Showing the IdP name when the main IdP is used instead of the discovery
46-
Given I log in at "Dummy-SP"
47-
And I select IdP by label "Dummy-IdP" on the WAYF
48-
And I pass through EngineBlock
49-
And I pass through the IdP
50-
Then the response should not contain "Do you agree with sharing this data?"
51-
And the response should not contain "Yes, proceed to Dummy-SP"
52-
And the response should contain "Dummy-SP will receive"
53-
And the response should contain "provided by <strong>Dummy-IdP</strong>"
54-
And the response should contain "Proceed to Dummy-SP"
55-
When I give my consent
56-
Then I pass through EngineBlock

src/OpenConext/EngineBlockFunctionalTestingBundle/Features/Context/MockIdpContext.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ public function anIdentityProviderNamed($name, string $discoveryName = null)
8888
$discoveries = [];
8989
if ($discoveryName !== null) {
9090
$discoveries[] = Discovery::create(['en' => $discoveryName], [], null);
91+
} else {
92+
$discoveries[] = Discovery::create(['en' => $name], [], null);
9193
}
9294

9395
$mockIdp = $this->mockIdpFactory->createNew($name);

src/OpenConext/EngineBlockFunctionalTestingBundle/Features/Stepup.feature

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,3 +280,14 @@ Feature:
280280
And I pass through EngineBlock
281281
And I pass through the IdP
282282
Then the received AuthnRequest should not match xpath '/samlp:AuthnRequest/samlp:Extensions/gssp:UserAttributes/saml:Attribute[@Name="urn:mace:dir:attribute-def:mail"]/saml:AttributeValue[text()="j.doe@institution-a.example.org"]'
283+
284+
Scenario: Stepup authentication should pass user attributes when configured even if an ARP is configured
285+
Given feature "eb.stepup.send_user_attributes" is enabled
286+
And the IdP "SSO-IdP" sends attribute "urn:mace:dir:attribute-def:mail" with value "j.doe@institution-a.example.org"
287+
And SP "SSO-SP" requests LoA "http://dev.openconext.local/assurance/loa3"
288+
And SP "SSO-SP" allows no attributes
289+
When I log in at "SSO-SP"
290+
And I select "SSO-IdP" on the WAYF
291+
And I pass through EngineBlock
292+
And I pass through the IdP
293+
Then the received AuthnRequest should match xpath '/samlp:AuthnRequest/samlp:Extensions/gssp:UserAttributes/saml:Attribute[@Name="urn:mace:dir:attribute-def:mail"]/saml:AttributeValue[text()="j.doe@institution-a.example.org"]'

0 commit comments

Comments
 (0)