OpenConext / OpenConext/Stepup-SelfService

Improve error message when required attributes are missing

Open
#430 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

error-messaging Imported improve error messages low-prio self service
Dominant language
PHP
Stars
2
Forks
5
Avg merge
8d 13h
Merged PRs (30d)
2

Description

This issue is imported from pivotal - Originaly created at Apr 9, 2020 by Peter Havekes

The log shows:

messages:Apr  8 13:57:53 sa-test-app.surfconext.nl stepup-selfservice[119612]: {"channel":"app","level":"ERROR","message":"Uncaught PHP Exception Symfony\\Component\\HttpKernel\\Exception\\HttpException: \"Missing value for required attribute \"commonName\"\" at /opt/stepup/Stepup-SelfService-3.1.0-20200123094957Z-899924d0139418958a9e502aa52eeea34494053d/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php line 190","context":{"exception":{"class":"Symfony\\Component\\HttpKernel\\Exception\\HttpException","message":"Missing value for required attribute \"commonName\"","code":0,"file":"/opt/stepup/Stepup-SelfService-3.1.0-20200123094957Z-899924d0139418958a9e502aa52eeea34494053d/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php:190","previous":{"class":"Surfnet\\StepupSelfService\\SelfServiceBundle\\Exception\\MissingRequiredAttributeException","message":"Missing value for required attribute \"commonName\"","code":0,"file":"/opt/stepup/Stepup-SelfService-3.1.0-20200123094957Z-899924d0139418958a9e502aa52eeea34494053d/src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Provider/SamlProvider.php:122"}}},"extra":{"art":"32881","server":"sa.test.surfconext.nl","application":"self-service","request_id":"aa25f6bba864e2cfb7a9471687a2fea2"}}

But the user sees "Something went wrong; please try again" (see screenshot).
The user should be informed about the missing information.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Surfnet/StepupSelfService/SelfServiceBundle/Security/Authentication/Provider/SamlProvider.php at line 122 and trace how MissingRequiredAttributeException reaches the user-facing error. Inspect the Symfony exception-handling path shown in the log. Done means the missing attribute information is presented to the user instead of only “Something went wrong; please try again.”

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.