Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop passing server_port to python3-saml #609

Closed
philipdouglas opened this issue Aug 23, 2021 · 2 comments · Fixed by #671
Closed

Stop passing server_port to python3-saml #609

philipdouglas opened this issue Aug 23, 2021 · 2 comments · Fixed by #671
Assignees

Comments

@philipdouglas
Copy link

Expected behaviour

When using python social auth's SAML integration behind a load balancer or reverse proxy, the port used by the intermediary should not be involved when checking that the response from the IdP has arrived at the correct URL.

In the latest release, Python3-saml deprecated the server_port parameter because it was causing the above problem: SAML-Toolkits/python3-saml#276

Actual behaviour

Python-social-auth is still passing the parameter in so the bug is persisting:

'server_port': self.strategy.request_port(),

What are the steps to reproduce this issue?

I was able to reproduce it in our app running inside Heroku's environment, but I wasn't able to create a simpler setup to reproduce it locally.

Any other comments?

I was able to fix the issue for our implementation by subclassing SAMLAuth and overloading _create_saml_auth to stop it passing server_port but I'm not certain whether there will be other side effects of that change for other users.

@digismack digismack self-assigned this Aug 24, 2021
@clementtrebuchet
Copy link

I'm facing the same issue, any updates on this ?

shadowbrush pushed a commit to shadowbrush/social-core that referenced this issue Mar 2, 2022
server_port has been deprecated by python3-saml, see: SAML-Toolkits/python3-saml#276

If the server application is running behind a load balancer or a reverse proxy the request port might not match the SAML configuration.

This will resolve issue python-social-auth#609 - python-social-auth#609
@shadowbrush
Copy link

Provided a PR for this: #671

@nijel nijel linked a pull request Mar 3, 2022 that will close this issue
9 tasks
@nijel nijel closed this as completed in #671 Mar 3, 2022
nijel pushed a commit that referenced this issue Mar 3, 2022
server_port has been deprecated by python3-saml, see: SAML-Toolkits/python3-saml#276

If the server application is running behind a load balancer or a reverse proxy the request port might not match the SAML configuration.

This will resolve issue #609 - #609
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants