Skip to content

Conversation

peppelinux
Copy link
Member

@peppelinux peppelinux commented Aug 9, 2019

An Exception handling on missing SATOSA_BASE in context.state[STATE_KEY]["requester"].
Probably also related to #228

If a http request come from an arbitrary link, like

https://disco.example.org/role/idp.ds?entityID=https%3A%2F%2Fproxy.example.org%2FSaml2%2Fmetadata&return=https%3A%2F%2Fexample.org%2FSaml2%2Fdisco

the satosa frontend cannot run SatosaBase._auth_req_callback_func, so it never inizializes state[STATE_KEY] = {"requester": internal_request.requester}.

This PR would introduce a self explanatory error message to user, this permit them to understand the nature of the problem without calling help-desk support.

I admit that this sounds, as it is now, too much hardcoded, I'd like to start a discussion with you to handle in a definitive way this kind of feature.

A good point of discussion could be the possibility to disallow backend's authnRequest if context.state would be inconsistent, I think that this would be a better strategy (also with a human readable message to users that warns on this)

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?

@peppelinux peppelinux changed the title Missing satosa_base exception handling [WiP] Missing satosa_base exception handling Aug 9, 2019
@peppelinux peppelinux changed the title [WiP] Missing satosa_base exception handling [WiP] Inconsistent context.state exception handling Aug 11, 2019
@peppelinux
Copy link
Member Author

Also related to
#228

From that thread there would be some usefull points of discussion I think

@peppelinux peppelinux closed this Mar 5, 2020
@peppelinux peppelinux deleted the missing_satosa_base_excp branch March 5, 2020 11:17
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.

1 participant