Skip to content

Commit

Permalink
When starting an engine IdP debug authentication, force authenticatio…
Browse files Browse the repository at this point in the history
…n at the IdP

This ensures we have a fresh session of the user to test against, so any
changes to the IdP config will be reflected in this debug result.
  • Loading branch information
thijskh committed Oct 24, 2023
1 parent 75408fb commit 7ab3f8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/EngineBlock/Corto/Module/Service/SingleSignOn.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ protected function _createDebugRequest()
$issuer = new Issuer();
$issuer->setValue($this->_server->getUrl('spMetadataService'));
$sspRequest->setIssuer($issuer);
$sspRequest->setForceAuthn(true);

$request = new EngineBlock_Saml2_AuthnRequestAnnotationDecorator($sspRequest);
$request->setDebug();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ Feature:
And I should see "test"
And I should see "urn:mace:terena.org:attribute-def:schacHomeOrganization"
And I should see "engine-test-stand.openconext.org"

Scenario: A debug AuthnRequest should force the user to relogin
When I go to Engineblock URL "/authentication/sp/debug"
And I select "Second-IdP" on the WAYF
And I pass through EngineBlock
Then the received AuthnRequest should match xpath '/samlp:AuthnRequest[@ForceAuthn="true"]'

0 comments on commit 7ab3f8a

Please sign in to comment.