Skip to content

Remove SAML request from URL in wayf#1987

Open
johanib wants to merge 3 commits into
mainfrom
feature/1973-hide-url-in-bar
Open

Remove SAML request from URL in wayf#1987
johanib wants to merge 3 commits into
mainfrom
feature/1973-hide-url-in-bar

Conversation

@johanib

@johanib johanib commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Prior to this change, users would bookmark the wayf. This caused expired/old saml requests from being handled by EB. EB does not have issues with that, but the SP might.

This change prevents users from bookmarking SAML requests.

Resolves #1973

@johanib johanib linked an issue Apr 22, 2026 that may be closed by this pull request
@johanib johanib requested a review from kayjoosten April 22, 2026 14:01
@johanib johanib force-pushed the feature/1973-hide-url-in-bar branch from 51638a6 to bb9e0d0 Compare April 22, 2026 14:09
@johanib johanib marked this pull request as draft April 23, 2026 06:31
@johanib

johanib commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

Blocked by: #1973 (comment)

@kayjoosten kayjoosten force-pushed the feature/1973-hide-url-in-bar branch from 8821434 to dba96a5 Compare June 16, 2026 07:06
johanib and others added 3 commits June 16, 2026 09:13
Prior to this change, users would bookmark the wayf. This caused expired/old saml requests from being handled by EB. EB does not have issues with that, but the SP might.

This change prevents users from bookmarking SAML requests.

Resolves #1703
Prior to this change, when the user would click the wrong IdP in the wayf, then used the back button, an error page would be shown, because the saml request was gone from the url.

This change stores the saml request in the session when visiting the wayf. This way, when the wayf is visited without a request, the last used request will be used.

Fixes #1973
Session-based back-button recovery removed — replaying the stored
SAMLRequest fails with "No authentication request received" because
Corto state is already consumed. pmeulen's decision: show the error,
don't try to fix it.

Flag eb.hide_bookmarkable_url (off by default) controls only the
JS url-replace behaviour via the wayfConfig JSON payload.

Closes #1973
@kayjoosten kayjoosten force-pushed the feature/1973-hide-url-in-bar branch from dba96a5 to ed980dc Compare June 16, 2026 07:16
@kayjoosten kayjoosten marked this pull request as ready for review June 16, 2026 07:22
@kayjoosten kayjoosten force-pushed the feature/1973-hide-url-in-bar branch from a66b618 to ed980dc Compare June 16, 2026 07:51
$this->expectException(MissingParameterException::class);

$requestValidator = Mockery::mock(RequestValidator::class);
$requestValidator->shouldReceive('isValid')->andThrow(new MissingParameterException('The parameter "SAMLRequest" is missing'));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing this tests: is 'isValid' called??? 🤔

Probably good to remove this test

@johanib johanib left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went through it: LGTM

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.

Hide SAMLRequest in url bar

2 participants