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

Better error in SelfService when user\'s institution is not on the whitelist #509

Open
phavekes opened this issue Dec 1, 2024 · 0 comments

Comments

@phavekes
Copy link
Member

phavekes commented Dec 1, 2024

This issue is imported from pivotal - Originaly created at Mar 11, 2020 by Pieter van der Meulen

Trying to login to SelfService (3.1.0) with an account from an institution that is not on the whitelist gives a generic oops error:

Mar 11 10:52:16 test-app stepup-selfservice[8660]: {"channel":"app","level":"CRITICAL","message":"Uncaught PHP Exception Surfnet\\StepupSelfService\\SelfServiceBundle\\Exception\\RuntimeException: \"Exception when saving Identity \"d7fdf42f-a5f9-407d-b1f8-02fb6febdd4f\": with command \"Surfnet\\StepupMiddlewareClientBundle\\Identity\\Command\\CreateIdentityCommand\", error: \"Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException: Institution \"institution-c.nl\" is not on the whitelist and actor \"\" is not an SRAA, processing of command denied\"\" at /opt/stepup/Stepup-SelfService-3.1.0-20200123094957Z-899924d0139418958a9e502aa52eeea34494053d/src/Surfnet/StepupSelfService/SelfServiceBundle/Service/IdentityService.php line 218","context":{"exception":{"class":"Surfnet\\StepupSelfService\\SelfServiceBundle\\Exception\\RuntimeException","message":"Exception when saving Identity \"d7fdf42f-a5f9-407d-b1f8-02fb6febdd4f\": with command \"Surfnet\\StepupMiddlewareClientBundle\\Identity\\Command\\CreateIdentityCommand\", error: \"Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException: Institution \"institution-c.nl\" is not on the whitelist and actor \"\" is not an SRAA, processing of command denied\"","code":0,"file":"/opt/stepup/Stepup-SelfService-3.1.0-20200123094957Z-899924d0139418958a9e502aa52eeea34494053d/src/Surfnet/StepupSelfService/SelfServiceBundle/Service/IdentityService.php:218"}},"extra":{"art":"38645","server":"sa.test2.surfconext.nl","application":"self-service","request_id":"e085e162478df36c9886c07f39ce5885"}}

Provide a specific error for this case: "Your institution is not authorised to use this service."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: New
Development

No branches or pull requests

1 participant