Skip to content

Fix: show real SP name on error pages when SP is a trusted proxy#1918

Open
kayjoosten wants to merge 1 commit intomainfrom
feature/issue-1793
Open

Fix: show real SP name on error pages when SP is a trusted proxy#1918
kayjoosten wants to merge 1 commit intomainfrom
feature/issue-1793

Conversation

@kayjoosten
Copy link
Contributor

@kayjoosten kayjoosten commented Feb 27, 2026

When a request goes through a trusted proxy SP, store the real (proxied)
SP entity ID in $_SESSION['currentServiceProvider'] so error pages
(e.g. PEP denial) display the correct SP name instead of the proxy's name.

Also:

  • Add unit tests for the trusted proxy session variable behaviour
  • Fix undefined array key warning in FeedbackController::getFeedbackInfo()
  • Add extra_hosts to docker-compose to prevent devconf HAProxy from intercepting Behat requests during local development

before:
before-fix-proxy-sp-name

after:
after-fix-real-sp-name

solves: issue 1778

  When a request goes through a trusted proxy SP, store the real (proxied)
  SP entity ID in $_SESSION['currentServiceProvider'] so error pages
  (e.g. PEP denial) display the correct SP name instead of the proxy's name.

  Also:
  - Add unit tests for the trusted proxy session variable behaviour
  - Fix undefined array key warning in FeedbackController::getFeedbackInfo()
  - Add extra_hosts to docker-compose to prevent devconf HAProxy from
    intercepting Behat requests during local development
@kayjoosten kayjoosten requested a review from johanib February 27, 2026 09:14
@tvdijen
Copy link
Contributor

tvdijen commented Feb 27, 2026

I'm a little uncomfortable with the naming convention here, because from a SAML POV the stepup-gateway is the real SP (the one we're directly communicating with) and selfservice is the proxied SP (the one the real SP is communicating about on behalf of the proxied SP).

I'm not sure how SURF sees this, but I'm worried this might cause confusion in the future.
In my opinion 'currentServiceProvider' should be the stepup-gateway.

@baszoetekouw baszoetekouw linked an issue Mar 2, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong SP name displayed in PEP screen for RP

2 participants