Skip to content

Commit

Permalink
Move AttributeReleaseAs filter to Output filtering
Browse files Browse the repository at this point in the history
The Consent screen does not have to show the updated attribute name
change. As this is purely to serve the SP in getting the familiar
attributes. The end user should not be concerned with the dialect of the
SP. The attribute is still released, only the name is changed.
  • Loading branch information
MKodde committed Aug 14, 2024
1 parent 8039220 commit 9530940
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 0 additions & 3 deletions library/EngineBlock/Corto/Filter/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ public function getCommands()

// Apply the Attribute Release Policy before we do consent.
new EngineBlock_Corto_Filter_Command_AttributeReleasePolicy(),

// Apply the 'release as' logic
new EngineBlock_Corto_Filter_Command_AttributeReleaseAs()
);

if (!$featureConfiguration->isEnabled('eb.run_all_manipulations_prior_to_consent')) {
Expand Down
3 changes: 3 additions & 0 deletions library/EngineBlock/Corto/Filter/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public function getCommands()
// Then don't continue with the rest of the modifications
new EngineBlock_Corto_Filter_Command_RejectProcessingMode(),

// Apply the ARP 'release_as' logic
new EngineBlock_Corto_Filter_Command_AttributeReleaseAs(),

// Run custom attribute manipulations
new EngineBlock_Corto_Filter_Command_RunAttributeManipulations(
EngineBlock_Corto_Filter_Command_RunAttributeManipulations::TYPE_SP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,11 @@ Feature:
When I log in at "Release As"
And I pass through EngineBlock
And I pass through the IdP
Then the response should not contain "urn:mace:dir:attribute-def:uid"
And the response should contain "UiD"
Then the response should contain "urn:mace:dir:attribute-def:uid"
And the response should not contain "UiD"
When I give my consent
And I pass through EngineBlock
# The release_as logic is applied after consent
Then the response should not contain "urn:mace:dir:attribute-def:uid"
And the response should contain "UiD"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
use SAML2\Constants;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
* @SuppressWarnings("PMD")
*/
class ServiceRegistryFixture
{
Expand Down

0 comments on commit 9530940

Please sign in to comment.