Add regression test for return parameter on SP-bound SAML response - #2123
Merged
Merged
Conversation
# If applied, this commit will extend the Bindings behat scenarios so the return parameter is verified alongside RelayState for every SAML flow that posts a response back to the SP. # Why is this change needed? Prior to this change, only RelayState was checked in the SAML POST sent back to the SP. The return parameter had no equivalent coverage, so a regression that reintroduces an empty return field (previously fixed for the Pega Engine API issue) would go unnoticed. # How does it address the issue? This change adds an assertion to each of the six RelayState scenarios in Bindings.feature confirming the process form has no return field when it is posted to the SP, reusing the existing generic process-form field step definitions. # Provide links to any relevant tickets, articles or other resources Closes #2056
johanib
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extends the RelayState Behat scenarios in
Bindings.featureto also assert that thereturnparameter is absent from the SAML POST sent back to the SP, alongside the existing RelayState checks.Why
Only RelayState had test coverage in the SAML POST to the SP. The
returnparameter had none, so a regression reintroducing an emptyreturnfield (previously fixed for the Pega Engine API issue, #1497) would go unnoticed.Details
returnis only ever set internally during the consent flow; by the time the response reaches the actual SP it is (by design, since the 2018 fix) never present. This PR adds an explicit assertion for that behavior to each of the six RelayState scenarios, reusing the existing genericThe process form should not have the "..." fieldstep.Testing
Ran the full default Behat suite locally in the Docker dev environment: 300 scenarios / 5563 steps, all passing.
Closes #2056