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

Middleware errors when a vetting type hint is not present #495

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

Middleware errors when a vetting type hint is not present #495

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 Feb 9, 2023 by Michiel Kodde

Background
The following error is raised in MW via SelfService interaction when the vetting hint is not configured.

{"channel":"app","level":"ERROR","message":"Vetting type hint for institution \'institution-b.nl\' was not found","context":{"exception":{"class":"Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException","message":"Vetting type hint for institution \'institution-b.nl\' was not found","code":0,"file":"/opt/openconext/OpenConext-middleware-5.0.7/src/Surfnet/StepupMiddleware/ApiBundle/Controller/VettingTypeHintController.php:67","previous":{"class":"Surfnet\\StepupMiddleware\\ApiBundle\\Exception\\NotFoundException","message":"Vetting type hint not found for institution institution-b.nl","code":0,"file":"/opt/openconext/OpenConext-middleware-5.0.7/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/VettingTypeHintService.php:85"}}},"extra":{"art":"89116","server":"middleware.test2.surfconext.nl","application":"middleware","request_id":"8f718c32e1a45f8a2c739ef18b3e07a9"}}

Steps to reproduce:

Initially the issue arose when an identity vetted a SF token and was presented with the vetting type screen. This would cause the MW to trigger an error that was not dealt with correctly in the SA.

As of february 13th, both Pieter and Michiel are unable to reproduce the issue.

Middleware client bundle interprets this as an errorous situation and in turn throws a NotFoundException which SelfService catches and interprets as: no vetting type hint was set..

An error is written to the Middleware logs though. And that might be somewhat excessive.

*Possible solutions: *

  1. Middleware should not throw a not found exception, but return an empty result (null). This would entail a change to middleware client bundle and self-service.
  2. The log level in middleware could be lowered somehow. That would still change the current behavior.
@phavekes phavekes self-assigned this Dec 1, 2024
@phavekes phavekes added this to Stepup Dec 1, 2024
@github-project-automation github-project-automation bot moved this to New in Stepup Dec 1, 2024
@phavekes phavekes removed their assignment Dec 1, 2024
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