question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ACS_DEFAULT_REDIRECT_URL has no effect

See original GitHub issue

It seems like LOGIN_REDIRECT_URL overrides ACS_DEFAULT_REDIRECT_URL setting.

On accessing saml2/login/ endpoint with no next parameter, the next_path defaults to LOGIN_REDIRECT_URL https://github.com/IdentityPython/djangosaml2/blob/02f4a1987078a0e1e0e15c24b22157618dab7dbe/djangosaml2/views.py#L135-L137

https://github.com/IdentityPython/djangosaml2/blob/02f4a1987078a0e1e0e15c24b22157618dab7dbe/djangosaml2/views.py#L114-L126

This next_path is used to set value of relay_state here: https://github.com/IdentityPython/djangosaml2/blob/02f4a1987078a0e1e0e15c24b22157618dab7dbe/djangosaml2/views.py#L318-L331

Now in post method of AssertionConsumerServiceView, value of ACS_DEFAULT_REDIRECT_URL is retrieved, but that’s get overridden by the RelayState parameter of POST request, which was set in saml2/login if I am not wrong.

https://github.com/IdentityPython/djangosaml2/blob/02f4a1987078a0e1e0e15c24b22157618dab7dbe/djangosaml2/views.py#L500-L511

Hence ACS_DEFAULT_REDIRECT_URL has no result in this scenario.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
jaap3commented, May 27, 2021

Seeing as I only have a limited amount of time left to spend on this I decided it would be easier to just attempt to resolve this issue now 😃

0reactions
pandafycommented, May 27, 2021

Didn’t get enough time yesterday to look into #279. From the changes I see in https://github.com/IdentityPython/djangosaml2/commit/3be1bbf1530e62e8db169f67afe8023f3c1c98dc, the issue seems to get fixed. Thank you very much @peppelinux and @jaap3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ise: Url redirection not working - Cisco Community
the service is reachable by inputting the policy service ip address on port 8443, authentication is successful, acl downloaded and redirect url pushed ......
Read more >
Simplesamlphp IdP redirect to wrong url after logged in
So far no problem, it works. But once logged in, I would like the user to be redirected to my index.php page but...
Read more >
How do I redirect to a specific page after a successful IdP or ...
When you specify a URL list, the URL stated in the RelayState parameter must exist on the URL list for the user to...
Read more >
How to redirect to specify requestable SSO Urls using ACS ...
i read okta SSO configuration document but not specify how to use ACS index or ACS URL in request to redirect on specific...
Read more >
Using redirects - AWS Amplify Hosting
Redirects enable a web server to reroute navigation from one URL to another. ... Not Found (404) ... Make sure that your ordering...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found