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

feat(jans-auth-server): redirect back to RP when session is expired or if not possible show error page #4449

Closed
2 tasks done
yuriyz opened this issue Apr 4, 2023 · 1 comment · Fixed by #4505
Closed
2 tasks done
Assignees
Labels
comp-jans-auth-server Component affected by issue or PR kind-enhancement Issue or PR is an enhancement to an existing functionality kind-feature Issue or PR is a new feature request
Milestone

Comments

@yuriyz
Copy link
Contributor

yuriyz commented Apr 4, 2023

Description

Redirect back to RP when session is expired or if not possible show default error page

Motivation: #4385 (comment)

Test cases and documentation

  • Write unit test to cover added/changed code
  • Update documentation
@yuriyz yuriyz self-assigned this Apr 4, 2023
@yuriyz yuriyz added comp-jans-auth-server Component affected by issue or PR kind-enhancement Issue or PR is an enhancement to an existing functionality labels Apr 4, 2023
@yuriyz yuriyz added this to the 1.0.11 milestone Apr 4, 2023
@mo-auto mo-auto added the kind-feature Issue or PR is a new feature request label Apr 4, 2023
@moabu moabu modified the milestones: 1.0.11, 1.0.12 Apr 5, 2023
@yuriyz yuriyz changed the title feat(jans-auth-server): redirect back to RP when session is expired or if not possible show default error page feat(jans-auth-server): redirect back to RP when session is expired or if not possible show error page Apr 5, 2023
yuriyz added a commit that referenced this issue Apr 6, 2023
@yuriyz
Copy link
Contributor Author

yuriyz commented Apr 7, 2023

During authorization request AS records redirect_uri into rp_origin_id cookie.

AS has configuration property errorHandlingMethod. When error occurs during authentication and AS found rp_origin_id it can:

  • errorHandlingMethod=remote - send error back to RP which gives AS chance to handle error
  • errorHandlingMethod=internal - show error page (no chance for RP to handle it).

That's why in PR default value is changed to errorHandlingMethod=remote. In addition if during permission check unexpected exception occur we log it and deny request. Also all results from external authn custom script during authentication are logged (independently whether script has print statement or not). This should help understand reason in case of fail requests.

Issue is fixed in #4505.

yuriyz added a commit that referenced this issue Apr 7, 2023
…r if not possible show error page #4449 (#4505)

* feat(jans-auth-server): show error with clear message if exception occurs authz check #4449

* feat(jans-auth-server): default errorHandlingMethod to "remote" value and return correct error during handling #4449

* test(jans-auth-server): covered exception case during deny  #4449

* doc(jans-auth-server): corrected doc for errorHandlingMethod #4449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-auth-server Component affected by issue or PR kind-enhancement Issue or PR is an enhancement to an existing functionality kind-feature Issue or PR is a new feature request
Projects
None yet
3 participants