You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to change all SAML2 URLs to be able to e.g. add a prefix.
Current Behavior
Some URLs are customizable, like Saml2LoginConfigurer.loginProcessingUrl.
While some are not, e.g. Saml2LoginConfigurer.AuthenticationRequestEndpointConfig.filterProcessingUrl (/saml2/authenticate/{registrationId}).
Context
A workaround for adding a path prefix is using the server.servlet.context-path.
But this doesn't work if you want to tweak URLs to be similar to an already existing solution created with the old SAML module.
Although assuming you want /auth as a prefix, and after login you want to redirect to the root / and not /auth/,
you cannot use the default success handler. You need to create a custom one with a redirect strategy which is not context relative.
Reacted by Damian Śnieżek, Denis, Miguel, alruizvi, JuanmaMoGa and Aleksei Mokhov
@JoakimLofgren I think it makes sense to simplify configuring the URL for creating an AuthnRequest.
If we follow the pattern established in OAuth2LoginConfigurer, I think most decisions will be fairly straightforward. For example, it would be nice to do:
Hey, I am kind of stuck on being not able to change default entityId & replyUrl in AuthRequest. My SP is running on http, so the urls for entityId & replyUrl are being generated for http. But by making some firewall changes, publicly website access is only by https. So basically I want the urls in AuthRequest to be https.
@chelseakohli, this would probably be better as a StackOverflow question, so please consider posting there if my answer here doesn't address your question and also update your comment with the StackOverflow link.
You can customize the AuthnRequest by configuring the OpenSamlAuthenticationRequestFactory:
While some are not, e.g. Saml2LoginConfigurer.AuthenticationRequestEndpointConfig.filterProcessingUrl (/saml2/authenticate/{registrationId})
@JoakimLofgren, I've created #10840 to specifically address the authentication request URI. Are there any other endpoints that you would like to see addressed? If not, I'll close this issue in favor of #10840.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Activity
jzheaux commentedon Jul 23, 2020
@JoakimLofgren I think it makes sense to simplify configuring the URL for creating an AuthnRequest.
If we follow the pattern established in
OAuth2LoginConfigurer, I think most decisions will be fairly straightforward. For example, it would be nice to do:Then that would be quite similar to:
Would you be able to submit a PR along those lines to enhance the DSL? It would also be quite nice to update the Kotlin DSL while you are at it.
JoakimLofgren commentedon Jul 29, 2020
Sure. After #8864 is finished.
jzheaux commentedon Dec 3, 2020
After a bit more experimentation with it, I think the following is easier to read:
I like it because it has less hierarchy.
jzheaux commentedon Dec 3, 2020
@JoakimLofgren are you still able to contribute a PR to add support for configuring the
Saml2WebSsoAuthenticationRequestFilterURI?chelseakohli commentedon Apr 12, 2021
Hey, I am kind of stuck on being not able to change default entityId & replyUrl in AuthRequest. My SP is running on http, so the urls for entityId & replyUrl are being generated for http. But by making some firewall changes, publicly website access is only by https. So basically I want the urls in AuthRequest to be https.
jzheaux commentedon Apr 21, 2021
@chelseakohli, this would probably be better as a StackOverflow question, so please consider posting there if my answer here doesn't address your question and also update your comment with the StackOverflow link.
You can customize the
AuthnRequestby configuring theOpenSamlAuthenticationRequestFactory:4 remaining items
bramhaag commentedon Feb 18, 2022
Any progress?
jzheaux commentedon Feb 18, 2022
@JoakimLofgren, I've created #10840 to specifically address the authentication request URI. Are there any other endpoints that you would like to see addressed? If not, I'll close this issue in favor of #10840.
spring-projects-issues commentedon Feb 25, 2022
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
JoakimLofgren commentedon Feb 26, 2022
Sounds good. 👍
add SAML authentication request support to login configurer
add SAML authentication request support to login configurer