Skip to content

backends/saml2: gracefully handle mismatching ACS #433

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

Closed
wants to merge 1 commit into from

Conversation

bajnokk
Copy link
Contributor

@bajnokk bajnokk commented Mar 21, 2023

This is a new attempt to solve #324 . The error message specifically targets the administrator / logs. Even though the exception message has an assumption (the original relay state might be missing for other, more unlikely reasons), but drawing the admin's attention to the mismatching request address and ACS address is a good idea in this case, IMHO.

Commit message follows:

When the IdP redirects to an ACS which has a different address than the one we used for initiating the request, we are unable to verify the RelayState, since the browser does not send the session cookie. In order to make configuration debugging easier, raise an explanatory SATOSAAuthenticationError instead of a KeyError.

While adding a unit test to check for the proper error reporting, some code duplication was refactored.

All Submissions:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what problem you are trying to solve with this PR?
  • Have you added information on what your changes do and why you chose this as your solution?
  • Have you written new tests for your changes?
  • Does your submission pass tests?
  • This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?

When the IdP redirects to an ACS which has a different address than the
one we used for initiating the request, we are unable to verify the
RelayState, since the browser does not send the session cookie. In order
to make configuration debugging easier, raise an explanatory
SATOSAAuthenticationError instead of a KeyError.

While adding a unit test to check for the proper error reporting, some
code duplication was refactored.
@c00kiemon5ter
Copy link
Member

closed by d986464 and 62f8775

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.

2 participants